Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:__buildrace(playerid, params[])
- {
- if(PlayerInfo[playerid][Level] != 5) return SendClientMessage(playerid, RED, "ERROR: You are not an administrator!");
- if(BuildRace != 0) return SendClientMessage(playerid, RED, "ERROR: There's already someone building a race!");
- if(RaceBusy == 0x01) return SendClientMessage(playerid, RED, "Wait first till race ends!");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, RED, "Please leave your vehicle first!");
- BuildRace = playerid+1;
- ShowDialog(playerid, 599);
- return 1;
- }
- CMD:__startrace(playerid, params[])
- {
- if(PlayerInfo[playerid][Level] != 5) return SendClientMessage(playerid, RED, "ERROR: You are not an administrator!");
- if(AutomaticRace == true) return SendClientMessage(playerid, RED, "ERROR: Not possible. Automatic race is enabled!");
- if(BuildRace != 0) return SendClientMessage(playerid, RED, "There's someone building a race!");
- if(RaceBusy == 0x01 || RaceStarted == 1) return SendClientMessage(playerid, RED, "ERROR: There's a race currently. Wait first till race ends!");
- if(isnull(params)) return SendClientMessage(playerid, RED, "USEAGE: /startrace [racename]");
- LoadRace(playerid, params);
- return 1;
- }
- CMD:__stoprace(playerid, params[])
- {
- if(PlayerInfo[playerid][Level] != 5) return SendClientMessage(playerid, RED, "ERROR: You are not an administrator!");
- if(RaceBusy == 0x00 || RaceStarted == 0) return SendClientMessage(playerid, RED, "ERROR: There's no race to stop!");
- SendClientMessageToAll(COLOR_ORANGE, "An administrator has stopped the current race.");
- StopRace();
- return 1;
- }
- CMD:join(playerid, params[])
- {
- if(InSideHouse[playerid]) return SendClientMessage(playerid,yellow,"* Sorry, you must exit the house (/exith) to use the commands.");
- if(CagedPlayer[playerid]) return SendClientMessage(playerid,yellow,"* Sorry, you cannot use this command while caged.");
- if(ToiletedPlayer[playerid]) return SendClientMessage(playerid,yellow,"* Sorry, you cannot use any commands while in a toilet.");
- if(IsAFK[playerid]) return SendClientMessage(playerid,red,"Sorry, you cannot use this command while in AFK mode");
- if(Minigame[playerid]) { SendClientMessage(playerid,yellow,"* Sorry, you must type /exitm to exit from this Mini Game."); return GameTextForPlayer(playerid, " ~w~ type ~r~~h~/exitm ~w~to exit",3000,3); }
- if(LastShotTime[playerid] != -1) {
- if(GetTickCount() < LastShotTime[playerid]) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot use this command right after you've shot!");
- }
- else if(LastDmgTime[playerid] != -1) {
- if(GetTickCount() < LastDmgTime[playerid]) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You cannot use this command right now as it would result in a death evade!");
- }
- if(Specing[playerid]) { SendClientMessage(playerid,yellow,"* Sorry, you are not supposed to use this command at the moment."); return GameTextForPlayer(playerid, " ~y~ type /specoff to exit",3000,3); }
- if(PlayerInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment!");
- if(RaceStarted == 1) return SendClientMessage(playerid, RED, "Race already started! Wait first till race ends!");
- if(RaceBusy == 0x00) return SendClientMessage(playerid, RED, "ERROR: There's no race to join!");
- if(Joined[playerid] == true) return SendClientMessage(playerid, RED, "ERROR: You already joined a race!");
- SendClientMessage(playerid,COLOR_YELLOW,"**Your vehicle speed boost, instant stop and jump up are disabled.");
- SendClientMessage(playerid,COLOR_YELLOW,"* Once the countdown starts, your weapons will be disarmed.");
- SendClientMessage(playerid,0xDC143CAA,"WARNING: Do not annoy racers and do not try to cheat while racing or you will be punished by the server admins!");
- if(IsPlayerInAnyVehicle(playerid))
- {
- SetTimerEx("SetupRaceForPlayer", 2500, 0, "e", playerid);
- RemovePlayerFromVehicle(playerid);
- Joined[playerid] = true;
- InRace[playerid] = 1;
- }
- else {
- Joined[playerid] = true;
- InRace[playerid] = 1;
- SetupRaceForPlayer(playerid);}
- return 1;
- }
- CMD:__startautorace(playerid, params[])
- {
- if(PlayerInfo[playerid][Level] != 5) return SendClientMessage(playerid, RED, "ERROR: You are not an administrator!");
- if(RaceBusy == 0x01 || RaceStarted == 1) return SendClientMessage(playerid, RED, "There's a race currently. Wait first till race ends!");
- if(AutomaticRace == true) return SendClientMessage(playerid, RED, "It's already enabled!");
- LoadRaceNames();
- LoadAutoRace(RaceNames[random(TotalRaces)]);
- AutomaticRace = true;
- SendClientMessage(playerid, GREEN, "* You stared auto race. The filterscript will start a random race everytime the previous race is over!");
- return 1;
- }
- CMD:__stopautorace(playerid, params[])
- {
- if(PlayerInfo[playerid][Level] != 5) return SendClientMessage(playerid, RED, "ERROR: You are not an administrator!");
- if(AutomaticRace == false) return SendClientMessage(playerid, RED, "It's already disabled!");
- AutomaticRace = false;
- return 1;
- }
Add Comment
Please, Sign In to add comment