Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #define FILTERSCRIPT
- #if defined FILTERSCRIPT
- #define VERSION "V1.0"
- #define COLOR_RED 0xFF0000FF
- #define COLOR_GREEN 0x00FF00FF
- new RoadBlockDeployed[MAX_PLAYERS];
- new PlayerRB[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n |----------------------------------|");
- printf(" | * Yordan's Sell House System %s * |", VERSION);
- print(" |----------------------------------|\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- RoadBlockDeployed[playerid] = 0;
- DestroyObject(PlayerRB[playerid]);
- return 1;
- }
- #endif
- CMD:shouse(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You need to be a Administrator to use this command!");
- if(RoadBlockDeployed[playerid] == 0)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- new Float:angle;
- GetPlayerFacingAngle(playerid, angle);
- RoadBlockDeployed[playerid] = 1;
- SendClientMessage(playerid, COLOR_GREEN, "Sell House deployed successfully, Destroy it using - /destroysh");
- PlayerRB[playerid] = CreateObject(19470, x, y, z-1.0, 0, 0, angle);
- SetPlayerPos(playerid, x, y, z+1);
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "You already have a deployed House Tabel, Please destroy it - /destroysh");
- }
- return 1;
- }
- CMD:destroysh(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You need to be a Administrator to use this command!");
- if(RoadBlockDeployed[playerid] == 1)
- {
- RoadBlockDeployed[playerid] = 0;
- SendClientMessage(playerid, COLOR_GREEN, "Sell House Tabel destroyed successfully");
- DestroyObject(PlayerRB[playerid]);
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "There isn't a valid Sell House Tabel to destroy");
- }
- return 1;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement