05.07.2014, 02:00
Код:
dcmd_saveallstats(playerid,params[]) { #pragma unused params if(PInfo[playerid][Level] < 4) return SendClientMessage(playerid,red,error); for(new i = 0; i < MAX_PLAYERS;i++) { if(IsPlayerConnected(i)) { SaveStats(i); SendClientMessage(i,green,"» Stats saved!"); } } return 1; } dcmd_rape(playerid,params[]) { new id,Float:x,Float:y,Float:z,string[150]; if(gTeam[playerid] != TEAM_RAPIST) return SendClientMessage(playerid,red,"PH-BOT: You must be a "lgreen"rapist"); if(sscanf(params,"u",id)) return SendHelpMessage(playerid,"/rape [id]","This will rape the input id"); if(Raped[playerid][1] == 1) return SendClientMessage(playerid,red,"You have recently used /rape"); if(Raped[id][2] == 1) return SendClientMessage(playerid,red,"That player has been recently raped"); if(id == playerid) return SendClientMessage(playerid,red,"You can't rape yourself!"); GetPlayerPos(id,x,y,z); if(!IsPlayerInRangeOfPoint(playerid,7.0,x,y,z)) return SendClientMessage(playerid,red,"You aren't near that player!"); TogglePlayerControllable(id,0); Raped[id][0] = SetTimerEx("Unfreezerape",3000,false,"i",id); Raped[id][4] = SetTimerEx("Clearraped",60000,false,"i",id); Raped[playerid][5] = SetTimerEx("Clearraped2",60000,false,"i",playerid); Raped[playerid][1] = 1; Raped[id][2] = 1; new rand = random(2); switch(rand) { case 1: { SendFMessageToAll(red,""lgreen"Rapist "lyellow2"%s "lgreen"has infected "lyellow2"%s "lgreen"with chlamydia.",GetPName(playerid),GetPName(id)); format(string,sizeof(string),"Rapist %s has infected %s with chlamydia.",GetPName(playerid),GetPName(id)); SendCopMessage(blue,string); HasClamidia[id] = 1; } } return 1; } dcmd_rob(playerid,params[]) { #define SCM SendClientMessage new Float:health,string[128],robbedcash, robbedname[MAX_PLAYER_NAME], robbername[MAX_PLAYER_NAME],id,Float: x,Float: y,Float: z; if(gTeam[playerid] == TEAM_POLICE) return SCM(playerid,red,"PH-BOT: "lgrey"You are a "lyellow2"cop"lgrey", so you can't rob!"); if(sscanf(params,"u",id)) return SCM(playerid,orange,"USAGE: /rob [playerid]"); GetPlayerPos(id,x,y,z); GetPlayerHealth(id,health); GetPlayerName(playerid, robbername, sizeof(robbername)); GetPlayerName(id, robbedname, sizeof(robbedname)); format(string,sizeof(string),"PH-BOT: "lgrey"You aren't close enough to "lyellow2"%s"lgrey"!",robbedname); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,"PH-BOT: "lgrey"The ID specified is not connected!"); if(RecentlyRobbed[id] == 1) return SCM(playerid,red,"PH-BOT: "lgrey"That player has already been recently robbed!"); if(RobbedRecently[playerid] == 1) return SCM(playerid,red,"PH-BOT: "lgrey"Please wait before robbing anyone again!"); if(id == playerid) return SendClientMessage(playerid,red,"PH-BOT: "lgrey"You can't rob yourself..."); if(!IsPlayerInRangeOfPoint(playerid,6.0,x,y,z)) return SendClientMessage(playerid,red,string); if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid,red,"PH-BOT: "lgrey"Please get out of your vehicle"); if(IsPlayerInAnyVehicle(id)) return SCM(playerid,red,"PH-BOT: "lgrey"This player is in a vehicle"); if(PInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,red,"PH-BOT: "lgrey"You are jailed, and you can't rob."); if(health <= 0) return SendClientMessage(playerid,red,"PH-BOT: "lgrey"This player is dead!"); if(wallet[id] > 0) { wallet[id]--; SendFMessage(id,red,"*** %s has tried to rob you, you have $%d left on your wallet!",robbername,wallet[id]); SendFMessage(playerid,red,"** %s has a wallet. You failed to rob him!",robbedname); PlayerPlaySound(id,1190,0.0,0.0,0.0); PlayerPlaySound(playerid,1190,0.0,0.0,0.0); ClearRobbed[0] = SetTimerEx("robbedrecently",120000,false,"i",playerid); ClearRobbed[1] = SetTimerEx("recentlyrobbed",120000,false,"i",id); RecentlyRobbed[id] = 1; RobbedRecently[playerid] = 1; SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+3); return 1; } if(GetPlayerMoney(id) > 50) { robbedcash = random(GetPlayerMoney(id)); } else return SendClientMessage(playerid,red,"PH-BOT: "lgrey"That player is poor!"); format(string, sizeof(string), "*** You've robbed "lgrey"$%d"lyellow" from "lgrey"%s(ID:%d)"lyellow"!", robbedcash, GetPName(id), id); SendClientMessage(playerid, yellow, string); format(string, sizeof(string), "*** You have been robbed "lgrey"$%d"lyellow" from "lgrey"%s(ID:%d)"lyellow"!", robbedcash,robbername,playerid); SendClientMessage(id, yellow, string); format(string, sizeof(string), "******** "lyellow"%s(ID:%d) has robbed "lgrey"$%d"lyellow" from "lgrey"%s(ID:%d)"lyellow"! ********", robbername,playerid, robbedcash,GetPName(id),id); SendCopMessage(red,string); GivePlayerMoney(playerid, robbedcash); GivePlayerMoney(id, -robbedcash); ClearRobbed[0] = SetTimerEx("robbedrecently",120000,false,"i",playerid); ClearRobbed[1] = SetTimerEx("recentlyrobbed",120000,false,"i",id); RecentlyRobbed[id] = 1; RobbedRecently[playerid] = 1; SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+3); return 1; } dcmd_gps(playerid,params[]) { #pragma unused params if(IsPlayerInMission[playerid]) return SendClientMessage(playerid,red,"» You can't use "lyellow2"/gps "lred"while in a mission"); if(PInfo[playerid][hasgps] == 0) return SendClientMessage(playerid,red,"» You don't have a "lyellow2"gps"lred"! "lorange"Head over to a"lgreen"trucking shop"lorange"to buy one"); ShowPlayerDialog(playerid,Gpsdialog,2,""lyellow2"GPS","Car dealer","Choose","Cancel"); return 1; } dcmd_arrest(playerid,params[]) { new id,Float:x,Float:y,Float:z; if(gTeam[playerid] != TEAM_POLICE) return SendClientMessage(playerid,red,"PH-BOT: "lgrey"You aren't a police man!"); if(sscanf(params,"u",id)) return SendClientMessage(playerid,blue,"USAGE: "lyellow2"/arrest <nick/id>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,"That player isn't connected!"); GetPlayerPos(id,x,y,z); if(!IsPlayerInRangeOfPoint(playerid,10.0,x,y,z)) return SendClientMessage(playerid,red,"PH-BOT: "lgrey"You aren't near that player"); if(GetPlayerWantedLevel(id) < 3) return SendClientMessage(playerid,red,"That player is not suspected enough!"); SendFMessage(id,orange,"» Police man "lyellow2"%s(ID:%d)"lorange" has arrested you!",GetPName(playerid),playerid); GameTextForPlayer(id,"~r~~h~Arrested!",4000,3); SendFMessage(playerid,orange,"» You have arrested "lyellow2"%s(ID:%d)"lorange"! (-$1500)",GetPName(id),id); SendFMessageToAll(orange,"» Police man "lyellow2"%s(ID:%d)"lorange" has arrested "lyellow2"%s(ID:%d)"lorange"!",GetPName(playerid),playerid,GetPName(id),id); GivePlayerMoney(playerid,1500); GivePlayerMoney(id,-1500); PInfo[playerid][arrestedppl]++; Jailplayer(id); SetPlayerWantedLevel(id,0); return 1; } dcmd_suspects(playerid,params[]) { #pragma unused params new string[350],count = 0; for(new i = 0;i < MAX_PLAYERS;i++) { if(IsPlayerConnected(i)) { if(GetPlayerWantedLevel(i) == 1) { count++; format(string,sizeof(string),"%s"lorange"%s(ID:%d)(Wanted Level: %d) \n",string,GetPName(i),i,GetPlayerWantedLevel(i)); ShowPlayerDialog(playerid,2351,0,""lyellow"ONLINE SUSPECTS",string,"Hide",""); } if(GetPlayerWantedLevel(i) == 2) { count++; format(string,sizeof(string),"%s"lyellow"%s(ID:%d)(Wanted Level: %d) \n",string,GetPName(i),i,GetPlayerWantedLevel(i)); ShowPlayerDialog(playerid,2351,0,""lyellow"ONLINE SUSPECTS",string,"Hide",""); } if(GetPlayerWantedLevel(i) >= 3) { count++; format(string,sizeof(string),"%s"lred"%s(ID:%d)(Wanted Level: %d) \n",string,GetPName(i),i,GetPlayerWantedLevel(i)); ShowPlayerDialog(playerid,2351,0,""lyellow"ONLINE SUSPECTS",string,"Hide",""); } } } if(count == 0) { SendClientMessage(playerid,red,"PH-BOT: "lgrey"No suspects online!"); } return 1; } dcmd_pay(playerid,params[]) { #pragma unused params new rand = random(GetPlayerMoney(playerid)),Float:x,Float:y,Float:z,string[100]; while(rand > GetPlayerMoney(playerid)) if(gTeam[playerid] != TEAM_POLICE) return SendClientMessage(playerid,red,"PH-BOT: "lgrey"You aren't a police man!"); if(hastickettopay[playerid] == 0) return SendClientMessage(playerid,red,"You dont have a ticket to pay!"); if(GetPlayerWantedLevel(playerid) > 2) return SendClientMessage(playerid,red,""lgrey"You cant pay your ticket! You have a high wanted level"lyellow2"(/arrest)"); format(string,sizeof(string),""lred"You aren't near "lyellow2"%s",GetPName(Ticketid[playerid])); GetPlayerPos(Ticketid[playerid],x,y,z); if(IsPlayerInRangeOfPoint(playerid,10.0,x,y,z)) return SendClientMessage(playerid,red,string); GivePlayerMoney(Ticketid[playerid],rand); GivePlayerMoney(playerid,-rand); KillTimer(Ticket[playerid]); hastickettopay[playerid] = 0; SendFMessage(playerid,red,"",GetPName(Ticketid[playerid]),rand); SendFMessage(Ticketid[playerid],red,"%s has paid $%i for his ticket",GetPName(playerid),rand); return 1; } dcmd_ticket(playerid,params[]) { new id,string[150]; if(gTeam[playerid] != TEAM_POLICE) return SendClientMessage(playerid,red,"PH-BOT: "lgrey"You aren't a police man!"); if(sscanf(params,"u",id)) return SendClientMessage(playerid,red,"USAGE: "lgrey"/ticket [id]"); if(GetPlayerWantedLevel(id) == 0) return SendClientMessage(playerid,red,"PH-BOT: "lgrey"That player doesn't need a ticket!"); if(GetPlayerWantedLevel(id) > 2) return SendClientMessage(playerid,red,""lgrey"That player needs to be arrested!"lyellow2"(/arrest)"); format(string,sizeof(string),"WARNING: "lgrey"Cop "lyellow2"%s(ID:%d) "lgrey"gave you a "lred"ticket"lgrey"! You have "lyellow2"60 "lgrey"seconds to pay!"lyellow2"(/pay)",GetPName(playerid),playerid); SendClientMessage(id,red,string); SendFMessage(playerid,red,"» "lorange"You gave "lyellow2"%s(ID:%d)"lorange"a ticket, he has "lyellow2"60 "lorange"seconds to pay!",GetPName(id),id); Ticket[id] = SetTimerEx("ticket",60000,false,"i",id); Ticketid[id] = playerid; hastickettopay[playerid] = 1; return 1; } dcmd_taxi(playerid,params[]) { #pragma unused params new string[128]; if(!IsTeamOnline(TEAM_DRIVER)) return SendClientMessage(playerid,red,"PH-BOT: "lgrey"There aren't any "lyellow2"taxi drivers"lgrey" online, please try again later!"); if(PInfo[playerid][calledtaxi] == 1) return SendClientMessage(playerid,red,"PH-BOT: "lgrey"You have already called a "lyellow2"taxi"lgrey", please stay where you are and wait for it to arrive!"); if(gTeam[playerid] == TEAM_DRIVER) return SendClientMessage(playerid,red,"Taxi drivers can't call taxi's!"); format(string,sizeof(string),"%s(ID:%d) has requested a "lyellow2"taxi"lblue", check the "lred"red"lblue" marker on the map!",GetPName(playerid),playerid); SendDriverMessage(blue,string); for(new i = 0; i < MAX_PLAYERS;i++) { if(gTeam[i] == TEAM_DRIVER) { SetPlayerMarkerForTeam(playerid,i,red); } } SendClientMessage(playerid,green,"» Taxi called, please stay where you are! "lgreen"Use /cancelorder to cancel your request!"); PInfo[playerid][calledtaxi] = 1; return 1; } dcmd_cancelorder(playerid,params[]) { #pragma unused params new string[128]; if(PInfo[playerid][calledtaxi] == 0) return SendClientMessage(playerid,red,"PH-BOT: "lgrey"You haven't made any "lyellow2"taxi request"lgrey"! Use "lyellow2"/taxi"lgrey"!"); PInfo[playerid][calledtaxi] = 0; SendClientMessage(playerid,green,"» Order "lred"canceled"lgreen"!"); format(string,sizeof(string),"» %s(ID:%d) has "lred"canceled "lblue"his taxi order!",GetPName(playerid),playerid); SendDriverMessage(blue,string); SetPlayerMarkerForTeam(TEAM_DRIVER,playerid,SetPlayerTeamColor(playerid)); return 1; } dcmd_fare(playerid,params[]) { new price2,pmodelid = GetVehicleModel(GetPlayerVehicleID(playerid)); if(gTeam[playerid] != TEAM_DRIVER) return SendClientMessage(playerid,red,"PH-BOT: "lgrey"You aren't a "lyellow2"taxi driver"lgrey"!"); if(PInfo[playerid][onduty] == 1) return SendClientMessage(playerid, red,"PH-BOT: "lyellow2"You're already on duty, please leave your car!"); if(sscanf(params,"i",price2)) return SendClientMessage(playerid,red,"USAGE: "lgrey"/fare "lyellow2"[cost]") && SendClientMessage(playerid,red,""lblue"FUNCTION: "lgrey"This will set a price for each 10 seconds a player is in your taxi!"); if(!IsTaxi(playerid,pmodelid)) return SendClientMessage(playerid,red,"PH-BOT:"lgrey"You must be in a "lyellow2"taxi"lgrey"!"); if(price2 > 500) return SendClientMessage(playerid,red,""lwhite"*"lred"That's to much for 10 seconds!"lwhite"*"); PInfo[playerid][fare2] = price2; PInfo[playerid][onduty] = 1; SendFMessageToAll(green,""lgreen"» Driver "lyellow2"%s(ID:%i) "lgreen"is now on duty! Fare: "lorange"%i "lgreen"per "lorange"10 seconds"lgreen"!",GetPName(playerid),playerid,price2); return 1; } dcmd_work(playerid,params[]) { #pragma unused params new pvehiclemodel = GetVehicleModel(GetPlayerVehicleID(playerid)); if(!IsWorkingVeh(playerid,pvehiclemodel)) return SendClientMessage(playerid,red,"PH-BOT: "lgrey"You need a "lyellow2"working car"lgrey" to make missions!"); if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) && IsTruck(playerid,pvehiclemodel)) return SendClientMessage(playerid,red,"PH-BOT: "lgrey"You need to attach a "lyellow2"trailer "lgrey"to do missions!"); if(IsPlayerInMission[playerid] == 1) return SendClientMessage(playerid, 0xFF0000AA, "PH-BOT: "lgrey"You are already in a mission! Please use "lyellow2"/cancelmission"lgrey" if you would like to cancel it!"); // prevents them from starting another mission new string[350]; if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) { if(GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))) == 435) { workingvehicle[playerid] = GetPlayerVehicleID(playerid); new rand = random(sizeof(Trailer1Missions)); CreatePlayerMission(playerid, Trailer1Missions[rand][Text],Trailer1Missions[rand][UseTrailerCheck], Trailer1Missions[rand][MissionPay], Trailer1Missions[rand][loadx],Trailer1Missions[rand][loady], Trailer1Missions[rand][loadz], Trailer1Missions[rand][unloadx],Trailer1Missions[rand][unloady], Trailer1Missions[rand][unloadz]); format(string, sizeof(string), "MISSION: {00F5FF}%s", Trailer1Missions[rand][MissionName]); SendClientMessage(playerid,orange,string); TextDrawSetString(info[playerid],Trailer1Missions[rand][MissionName]); } if(GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))) == 450) { workingvehicle[playerid] = GetPlayerVehicleID(playerid); new rand = random(sizeof(Trailer2Missions)); CreatePlayerMission(playerid, Trailer2Missions[rand][Text],Trailer2Missions[rand][UseTrailerCheck], Trailer2Missions[rand][MissionPay], Trailer2Missions[rand][loadx],Trailer2Missions[rand][loady], Trailer2Missions[rand][loadz], Trailer2Missions[rand][unloadx],Trailer2Missions[rand][unloady], Trailer2Missions[rand][unloadz]); format(string, sizeof(string), "MISSION: {00F5FF}%s", Trailer2Missions[rand][MissionName]); SendClientMessage(playerid,orange,string); TextDrawSetString(info[playerid],Trailer2Missions[rand][MissionName]); } if(GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))) == 584) { workingvehicle[playerid] = GetPlayerVehicleID(playerid); new rand = random(sizeof(Trailer4Missions)); CreatePlayerMission(playerid, Trailer4Missions[rand][Text],Trailer4Missions[rand][UseTrailerCheck], Trailer4Missions[rand][MissionPay], Trailer4Missions[rand][loadx],Trailer4Missions[rand][loady], Trailer4Missions[rand][loadz], Trailer4Missions[rand][unloadx],Trailer4Missions[rand][unloady], Trailer4Missions[rand][unloadz]); format(string, sizeof(string), "MISSION: {00F5FF}%s", Trailer4Missions[rand][MissionName]); SendClientMessage(playerid,orange,string); TextDrawSetString(info[playerid],Trailer4Missions[rand][MissionName]); } if(GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))) == 591) { workingvehicle[playerid] = GetPlayerVehicleID(playerid); new rand = random(sizeof(Trailer3Missions)); CreatePlayerMission(playerid, Trailer3Missions[rand][Text],Trailer3Missions[rand][UseTrailerCheck], Trailer3Missions[rand][MissionPay], Trailer3Missions[rand][loadx],Trailer3Missions[rand][loady], Trailer3Missions[rand][loadz], Trailer3Missions[rand][unloadx],Trailer3Missions[rand][unloady], Trailer3Missions[rand][unloadz]); format(string, sizeof(string), "MISSION: {00F5FF}%s", Trailer3Missions[rand][MissionName]); SendClientMessage(playerid,orange,string); TextDrawSetString(info[playerid],Trailer3Missions[rand][MissionName]); } } if(IsVan(playerid,GetVehicleModel(GetPlayerVehicleID(playerid)))) { workingvehicle[playerid] = GetPlayerVehicleID(playerid); new rand = random(sizeof(VanMissions)); CreatePlayerMission(playerid, VanMissions[rand][Text],VanMissions[rand][UseTrailerCheck], VanMissions[rand][MissionPay], VanMissions[rand][loadx],VanMissions[rand][loady], VanMissions[rand][loadz], VanMissions[rand][unloadx],VanMissions[rand][unloady], VanMissions[rand][unloadz]); format(string, sizeof(string), "MISSION: "lyellow2"%s", VanMissions[rand][MissionName]); SendClientMessage(playerid,orange,string); TextDrawSetString(info[playerid],VanMissions[rand][MissionName]); } if(IsTaxi(playerid,GetVehicleModel(GetPlayerVehicleID(playerid)))) { LoadCP[playerid] = 1; new rand = random(sizeof(Taximissions)); SetPlayerCheckpoint(playerid,Taximissions[rand][Firstx],Taximissions[rand][Firsty],Taximissions[rand][Firstz],4.0); format(string, sizeof(string), "MISSION: "lyellow2"%s", Taximissions[rand][Mtext]); SendClientMessage(playerid,orange,string); TInfo[playerid][Pay] = Taximissions[rand][Pay]; TInfo[playerid][Lastx] = Taximissions[rand][Lastx]; TInfo[playerid][Lasty] = Taximissions[rand][Lasty]; TInfo[playerid][Lastz] = Taximissions[rand][Lastz]; } if(GPSon[playerid] == 1) { SetPlayerGPS(playerid,0); } SendClientMessage(playerid,lightgreen,"» Follow the "lred"Red"lgreen" marked location on the map to load!"); IsPlayerInMission[playerid] = 1; TogglePlayerAllDynamicCPs(playerid, 0); return 1; } dcmd_help(playerid,params[]) { #pragma unused params new string[1550]; format(string,sizeof(string),"\t"lyellow2"Hey,%s! Welcome to the help page of Philippine Trucking!\n\nWe have several jobs in our server:\n* Trucker \n"lblue"* Police \n"lorange"* Assistance \n"lgreen"* Driver \n",GetPName(playerid)); strcat(string,"Trucker is the most common job in this server: Just spawn, get a truck(van), attach a trailer and type /work! \nYou'll have to deliver different loads from different points to other. \nBy doing that you are gaining money and score, which can be used for buying your own vehicle, house, and more! \n"); strcat(string,""lblue"To be a police man you need at least 50 score, which can be earned by doing trucking missions. \nYou'll need to catch players breaking the rules, such as not following speed limits, robbing people etc. \nYou can first use /ticket to give them a ticket, or /arrest if they got a higher wanted level! \n"); strcat(string,""lorange"The assistance job is easy: just spawn as an assistance man, get in your tow truck and wait for help requests! \nYou can fix any vehicle by typing /fixcar, fill it up by typing /fuelcar, or press 2 to tow a vehicle while near one! \n"); strcat(string,""lgreen"By being a taxi driver, you should transport players to where you they want to. \nYou can type /fare while in a taxi to set up your fare, and wait for players! \nYou get paid every 10 seconds a passanger is in your vehicle if you are on duty. \n"); strcat(string,"\t"lred"Other:\n\n "lred"/phelp - "lyellow"Accurate help about your job! \n/credits - see the founders of Philippine Trucking! \n/cmds - See the list of the available commands on the server! \n/rules - See the server rules!\n\n\t\t"lred"www.nsg-gaming.net"); ShowPlayerDialog(playerid,5555,0,""lyellow"GENERAL HELP",string,"Hide",""); return 1; } dcmd_cmds(playerid,params[]) { #pragma unused params ShowPlayerDialog(playerid,Cmdsdialog,2,"Commands","Trucker Commands \nPolice Commands \nAssistance Commands \nTaxi Driver Commands \nGeneral Commands","Select","Close"); return 1; } dcmd_rules(playerid,params[]) { #pragma unused params ShowPlayerDialog(playerid,4664,0,""lgreen2"Philippine Trucking Rules","\t\t"lorange"Rules\n\n1.Do not use any 3rd party programs which give you advantages on other players.\n2.Do not advertise any other servers or sites.\n3.Do not insult or disrespect anyone here.\n4.No discussion about pornography and sexism.\n5.Do not abuse any bugs.\n6.Do not ram or block anyone on the road.\n7.By playing here, you agree those rules and admins will take action if you do not follow them.","ACCEPT",""); return 1; } dcmd_credits(playerid,params[]) { #pragma unused params new string[300]; format(string,sizeof(string),"Gamemode coding - Typo; \nMapping - Typo \nsscanf plugin, INI include - ******; \nStreamer plugin - Incognito;\n\nAnd %s for playing in Philippine Trucking!",GetPName(playerid)); ShowPlayerDialog(playerid,4665,0,"Server Credits",string,"Hide",""); return 1; } dcmd_phelp(playerid,params[]) { #pragma unused params new string[800]; if(gTeam[playerid] == TEAM_TRUCKERS) { format(string,sizeof(string),"\t\t\t"lred"Truckers\n\n"lyellow2" As a trucker, you should deliver loads with either vans or trucks.\n To start your career, just attach a trailer to your truck, or get in a van, and type "lred"/work"lyellow2"! \n"); format(string,sizeof(string),"%s You can type "lyellow"/cancelmission"lyellow2" to cancel your mission(takes -$1,000 for lost goods) or "lred"/detach"lyellow2" to detach the trailer from your truck(if any).\n",string); format(string,sizeof(string),"%s If you are in trouble, but the aren't any assistance mans online, you can type "lred"/rescueme"lyellow2". \n You can call assistance through your "lred"/phone "lyellow2"or, "lred"/sos"lyellow2". \n You should also be careful not to damage the load, or you will be paid less!\n\n\t\t\t"lred"Have "lblue"fun"lyellow"!",string); ShowPlayerDialog(playerid,Truckerz,0,""lyellow"TRUCKERS HELP",string,"Hide",""); } if(gTeam[playerid] == TEAM_ASSISTANCE) { format(string,sizeof(string),"\t\t\t"lred"Assistance\n\n"lyellow2"As an assistance man, you have to help players in trouble.\nWhen someone calls for help, you will be send a message and you will see that player as a red marker on the map.\n"); format(string,sizeof(string),"%s You can type "lyellow"/fuelcar"lyellow2" while near a vehicle to fill it up, or "lyellow"/fixcar"lyellow2"to fix it.\n Press "lyellow"2"lyellow2" on your keyboard to tow a vehicle while near one!\n\t\t\t"lred"Have "lblue"Fun"lyellow"!",string); ShowPlayerDialog(playerid,Assistancez,0,""lyellow"ASSISTANCE HELP",string,"Hide",""); } if(gTeam[playerid] == TEAM_POLICE) { format(string,sizeof(string),"\t\t\t"lred"Police\n\n"lyellow2"As a cop, you have to ticket and arrest players breaking the rules. \nYou can type "lyellow"/ticket "lyellow2"to ticket the player specified, or "lyellow"/arrest"lyellow2" to arrest a player.\nYou can type "lyellow"/suspects"lyellow2" to view all the suspects!"); ShowPlayerDialog(playerid,Policez,0,""lyellow"POLICE HELP",string,"Hide",""); } if(gTeam[playerid] == TEAM_DRIVER) { format(string,sizeof(string),"\t\t\t"lred"Drivers\n\n"lyellow2"As a driver, you should transport players which are requiring your service.\nTo start working, you should go in a taxi and type "lred"/fare"lyellow".\nWhen players call you, you will see them as a red marker on the map.\n\t\t\t"lred"Have"lblue" Fun"lyellow"!"); ShowPlayerDialog(playerid,1797,0,""lyellow"DRIVERS HELP",string,"Hide",""); } return 1; } //========================= [ ADMIN SYSTEM ] =================================== dcmd_createshop(playerid,params[]) { #pragma unused params new string[128],ID = Shopcount; if(PInfo[playerid][Level] < 4) return SendClientMessage(playerid,red,error); new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); format(string,sizeof(string),"Admin/Shops/%i.ini",BankCount); INI_Open(string); INI_WriteFloat("Posx",x); INI_WriteFloat("Posy",y); INI_WriteFloat("Posz",z); INI_Save(); INI_Close(); binfo[ID][Posx] = x; binfo[ID][Posy] = y; binfo[ID][Posz] = z; format(string,sizeof(string),"*** Shop ID %d has been created!",Shopcount); SendClientMessage(playerid,green,string); Create3DTextLabel("Trucking shop",yellow,binfo[ID][Posx],binfo[ID][Posy],binfo[ID][Posz],65.0,0,1); tscp[ID] = CreateDynamicCP(sinfo[ID][Posx],sinfo[ID][Posy],sinfo[ID][Posz],2.0,-1,-1,-1); Shopcount++; PlaySound(playerid,1100); return 1; } dcmd_createbank(playerid,params[]) { #pragma unused params new string[128],ID = BankCount; if(PInfo[playerid][Level] < 4) return SendClientMessage(playerid,red,error); new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); format(string,sizeof(string),"Admin/Banks/%i.ini",BankCount); INI_Open(string); INI_WriteFloat("Posx",x); INI_WriteFloat("Posy",y); INI_WriteFloat("Posz",z); INI_Save(); INI_Close(); binfo[ID][Posx] = x; binfo[ID][Posy] = y; binfo[ID][Posz] = z; format(string,sizeof(string),"*** Bank ID %d has been created!",BankCount); SendClientMessage(playerid,green,string); Create3DTextLabel("Bank",yellow,binfo[ID][Posx],binfo[ID][Posy],binfo[ID][Posz],65.0,0,1); BankP[ID] = CreateDynamicPickup(1274, 23, binfo[ID][Posx],binfo[ID][Posy],binfo[ID][Posz], 0, 0,-1,100.0); BankExit[ID] = CreateDynamicPickup(1274, 23, 2305.8223,-16.1381,26.7496, ID, 0,-1,100.0); Create3DTextLabel("Bank exit",yellow,2305.8223,-16.1381,26.7496,65.0,ID,1); BankCount++; PlaySound(playerid,1100); return 1; } dcmd_acmds(playerid,params[]) { #pragma unused params ShowPlayerDialog(playerid,Admincmds,2,""lgreen2"Please Choose Your Level:",""lblue"Level 1 \n"lgreen"Level 2 \n"lgreen2"Level 3 \n"lyellow2"Level 4 \n"lorange"Level 5","Choose","Close"); return 1; } dcmd_setweather(playerid,params[]) { new weather,string[100]; if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,red,error); if(sscanf(params,"i",weather)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/setweather <weather ID>"); SetWeather(weather); format(string,sizeof(string),"» Administrator %s(ID:%d) has set the global weather to "lblue"%i"lgreen2"!",GetPName(playerid),playerid,weather); SendClientMessageToAll(green2,string); PlaySoundForAll(1098); return 1; } dcmd_cc(playerid,params[]) { #pragma unused playerid, params new str[128]; if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,red,error); for(new i = 0; i < 200; i++) SendClientMessage(playerid,-1," "); format(str, sizeof(str), "Admininstrator %s(ID:%d) has cleared the chat!",GetPName(playerid), playerid); SendClientMessageToAll(-1,str); return 1; } dcmd_settime(playerid,params[]) { new hour, string[128]; if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,red,error); if(sscanf(params,"i",hour)) return SendClientMessage(playerid,0xAFFF00FF,"USAGE: "lyellow2"/settime <hour>") && SendClientMessage(playerid,0xAFFF00FF,"FFUNCTION: "lblue"Sets the global time to the hour specified!"); if(hour < 0 || hour > 24) return SendClientMessage(playerid,red,"PH-BOT: "lgreen2"Invalid time! Use ranges from 0 to 24 only!"); Hours = hour; SetWorldTime(hour); PlaySoundForAll(1098); format(string,sizeof(string),"*** Administrator %s(ID:%d) has set the global time to "lblue"%i"lgreen2"!",GetPName(playerid),playerid,hour); SendClientMessageToAll(blue,string); return 1; } dcmd_kick(playerid,params[]) { new id,reason[128],string[250]; if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,red,error); if(sscanf(params,"us[128]",id,reason)) return SendClientMessage(playerid,0xAFFF00FF,"USAGE: "lyellow2"/kick <playerid> <reason>"); if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,red,notconnected); format(string,sizeof(string),"*** %s(ID:%d) has been kicked by Administrator %s(ID:%d) for %s",GetPName(id),id,GetPName(playerid),playerid,reason); SendClientMessageToAll(red,string); PlaySoundForAll(1141); format(string,sizeof(string),"\t\t"lred"YOU HAVE BEEN KICKED - READ THE FOLLOWING DETAILS! \n\n"lyellow"YOUR NAME: "lorange"%s \n"lyellow"ADMIN NAME:"lorange" %s \n"lyellow"REASON: "lorange"%s \n\n\t\t"lred"This is NOT a ban so you may rejoin!",GetPName(id),GetPName(playerid),reason); ShowPlayerDialog(id,9000,0,""lred"KICKED",string,"Hide",""); Kick(id); return 1; } dcmd_setlevel(playerid,params[]) { new id,lvl,string[128]; if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,red,error); if(sscanf(params,"ui",id,lvl)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/setlevel <id> <level>"); if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,red,notconnected); format(string,sizeof(string),"*** %s(ID:%d) has set your admin level to %d!",GetPName(playerid),playerid,lvl); SendClientMessage(id,green,string); if(PInfo[id][Level] < lvl) { GameTextForPlayer(id,"~g~~h~~h~Promoted!",4000,3); PlaySound(id,1057); } if(PInfo[id][Level] > lvl) { GameTextForPlayer(id,"~r~~h~Demoted!",4000,3); PlaySound(playerid,1085); } format(string,sizeof(string),"*** You've set %s(ID:%d)'s level to %d!",GetPName(id),id,lvl); SendClientMessage(playerid,green,string); PInfo[id][Level] = lvl; return 1; } dcmd_ban(playerid,params[]) { new id,reason[128],string[380],ip[16],ipp[16],file[128]; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error); if(sscanf(params,"us[128]",id,reason)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/ban <id> <reason>"); if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,red,notconnected); format(string,sizeof(string),"*** %s(ID:%d) has been banned by Administrator %s(ID:%d) for %s",GetPName(id),id,GetPName(playerid),playerid,reason); SendClientMessageToAll(red,string); new d,mm,y,h,m; getdate(d,mm,y); gettime(h,m); format(string,sizeof(string),"\t\t"lred"YOU HAVE BEEN BANNED - READ THE FOLLOWING DETAILS! \n\n"lyellow"YOUR NAME: %s \nADMIN NAME: %s \nREASON WHY YOU GOT BANNED: %s \nDATE AND TIME: %d.%d.%d at %d:%d \n\n\t\t"lorange"If you wish to make an unban appeal, please take a screenshot of this box and go to www.nsg-gaming.net.",GetPName(id),GetPName(playerid),reason,d,mm,y,h,m); ShowPlayerDialog(id,9001,0,""lred"BANNED",string,"Hide",""); GetPlayerIp(playerid,ipp,16); GetPlayerIp(id,ip,16); PlaySoundForAll(1009); format(file,sizeof(file),"Admin/Bans/%s.ini",ip); INI_Open(file); INI_WriteString("Player",GetPName(id)); INI_WriteString("PlayerIP",ip); INI_WriteString("Admin",GetPName(playerid)); INI_WriteString("AdminIP",ipp); INI_WriteString("Reason",reason); INI_Save(); INI_Close(); format(file,sizeof(file),"Admin/Users/%s.ini",GetPName(id)); INI_Open(file); INI_WriteInt("Banned",1); INI_Save(); INI_Close(); Kick(id); return 1; } dcmd_unban(playerid,params[]) { #pragma unused params if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error); ShowPlayerDialog(playerid,Unbandialog,1,""lgreen"UNBAN A PLAYER","Please type the ip of the player you want to "lgreen"unban"lwhite": \n","Unban","Close"); return 1; } dcmd_givemoney(playerid,params[]) { new id,amount,string[128]; if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,red,error); if(sscanf(params,"ui",id,amount)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/givemoney <id / name> <amount>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); GivePlayerMoney(id,amount); format(string,sizeof(string),"» Administrator %s(ID:%d) gave you "lblue"$%d"lgreen" cash!",GetPName(playerid),playerid,amount); SendClientMessage(id,green,string); format(string,sizeof(string),"» You gave %s(ID:%d) "lblue"$%d"lgreen" cash!",GetPName(id),id,amount); SendClientMessage(playerid,green,string); PlaySound(id,1058); PlaySound(playerid,1058); return 1; } dcmd_sethealth(playerid,params[]) { new id,amount,string[128]; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error); if(sscanf(params,"ui",id,amount)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/sethealth <id/name> <amount of health>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); SetPlayerHealth(id,amount); format(string,sizeof(string),"» You have set %s(ID:%d)'s health to %i",GetPName(id),id,amount); SendClientMessage(playerid,blue,string); return 1; } dcmd_setarmour(playerid,params[]) { new id,amount,string[128]; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error); if(sscanf(params,"ui",id,amount)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/setarmour <id/name> <amount of armour>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); SetPlayerArmour(id,amount); format(string,sizeof(string),"» You have set %s(ID:%d)'s armour to %i",GetPName(id),id,amount); SendClientMessage(playerid,blue,string); return 1; } dcmd_akill(playerid,params[]) { new id,Float:health; if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,red,error); if(sscanf(params,"u",id)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/akill <id>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); GetPlayerHealth(id,health); if(health <= 0) return SendClientMessage(playerid,red,"PH-BOT: "lyellow2"That player is already dead!"); SetPlayerHealth(id,0); SendFMessage(playerid,green2,"» You have killed %s(ID:%d)",GetPName(id),id); SendFMessage(id,green2,"» You have been killed by Administrator %s(ID:%d)",GetPName(playerid),playerid); return 1; } dcmd_setplayercompletedmissions(playerid,params[]) { new id,amount,string[128]; if(PInfo[playerid][Level] < 4) return SendClientMessage(playerid,red,error); if(sscanf(params,"ui",id,amount)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/setplayercompletedmissions <id/name> <amount of completed missions>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); PInfo[id][Missionspassed] = amount; SetPlayerScore(id,amount); format(string,sizeof(string),"» Administrator %s(ID:%d) has set your completed missions to %d",GetPName(playerid),playerid,amount); SendClientMessage(id,green2,string); format(string,sizeof(string),"» You have set %s(ID:%d)'s completed missions to %d",GetPName(id),id,amount); SendClientMessage(playerid,green2,string); return 1; } dcmd_resetplayermissions(playerid,params[]) { new id; if(PInfo[playerid][Level] < 4) return SendClientMessage(playerid,red,error); if(sscanf(params,"u",id)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/resetplayermissions <id/name>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); if(PInfo[id][Missionspassed] == 0) return SendClientMessage(playerid,red,"PH-BOT: "lyellow2"That player hasn't done any missions!"); PInfo[id][Missionspassed] = 0; SetPlayerScore(id,0); SendFMessage(id,green2,"» Administrator %s(ID:%d) has reset your missions count!",GetPName(playerid),playerid); SendFMessage(playerid,green2,"» You have reset %s(ID:%d)'s missions count!",GetPName(id),id); return 1; } dcmd_cancelpmission(playerid,params[]) { new id; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error); if(sscanf(params,"u",id)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/cancelpmission <id/name>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); IsPlayerInMission[id] = 0; CancelPlayersCurrentMission(id); SendFMessage(playerid,green2,"» You have canceled %s(ID:%d)'s current mission!",GetPName(id),id); SendFMessage(id,green2,"» Administrator %s(ID:%d) has canceled your current mission!",GetPName(playerid),playerid); return 1; } dcmd_setwantedlvl(playerid,params[]) { new id,lvl,string[128]; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error); if(sscanf(params,"ui",id,lvl)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/setwantedlvl <id/name> <wanted level>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); if(lvl < 0 || lvl > 6) return SendClientMessage(playerid,red,"PH-BOT: "lyellow2"Invalid wanted level! Range from 0 to 6."); SetPlayerWantedLevel(id,lvl); format(string,sizeof(string),"» You have set "lblue"%s(ID:%d)'s"lgreen2" wanted level to "lblue"%d"lgreen2"!",GetPName(id),id,lvl); SendClientMessage(playerid,green2,string); format(string,sizeof(string),"» Admin "lblue"%s(ID:%d)"lgreen2" has set your wanted level to "lblue"%i"lgreen2"!",GetPName(playerid),playerid,lvl); SendClientMessage(id,green2,string); return 1; } dcmd_me(playerid,params[]) { new msg[128],string[128]; if(sscanf(params,"s[128]",msg)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/me <message>"); format(string,sizeof(string),"» %s(ID:%d) %s",GetPName(playerid),playerid,msg); SendClientMessageToAll(green2,string); return 1; } dcmd_stats(playerid,params[]) { new id,string[400],str2[64],hasph[MAX_PLAYERS][10],jail[MAX_PLAYERS][10],miss[MAX_PLAYERS][10],file[128]; if(sscanf(params,"u",id)) return SendHelpMessage(playerid,"/stats <id/name>","Shows the stats of the player specified!"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,error); format(str2,sizeof(str2),"%s(ID:%d)'s stats",GetPName(id),id); format(file,sizeof file, "Admin/Users/%s.ini",GetPName(playerid)); INI_Open(file); if(PInfo[id][hasphone] == 1) { hasph[id] = "Yes"; } else if(PInfo[id][hasphone] == 0) { hasph[id] = "No"; } if(IsPlayerInMission[id] == 1) { miss[id] = "Yes"; } else { miss[id] = "No"; } if(PInfo[id][Jailed] == 1) { jail[id] = "Yes"; } else { jail[id] = "No"; } UpdateRank(id); format(string,sizeof(string),"Score: %i \nMoney: %i \nTrucking missions done: %i \nMissions done: %i \nMissions failed: %i \n\nRank: %s \nDistance traveled: %iKM \nPeople Arrested: %i \nHas phone?: %s\nCurrently in jail: %s \nCurrently doing a mission?: %s",GetPlayerScore(id),GetPlayerMoney(id),INI_ReadInt("Truckingdone"),PInfo[id][Missionspassed],PInfo[id][Missionsfailed],pRank[playerid],pKMs[id],PInfo[id][arrestedppl],hasph[id],jail[id],miss[id]); ShowPlayerDialog(playerid,5686,0,str2,string,"Hide",""); INI_Close(); return 1; } dcmd_ip(playerid,params[]) { new id,ip[17],string[65]; if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,red,error); if(sscanf(params,"u",id)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/ip <id/name>"); GetPlayerIp(id,ip,17); format(string,sizeof(string),"» %s(ID:%d)'s IP: %s",GetPName(id),id,ip); SendClientMessage(playerid,green2,string); return 1; } dcmd_get(playerid,params[]) { new id,Float:x,Float:y,Float:z; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error); if(sscanf(params,"u",id)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/get <id/name>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); GetPlayerPos(playerid,x,y,z); SetPlayerInterior(id,GetPlayerInterior(playerid)); if(!IsPlayerInAnyVehicle(id)) { SetPlayerPos(id,x+2,y,z); SetPlayerInterior(playerid,GetPlayerInterior(id)); } else { SetVehiclePos(GetPlayerVehicleID(id),x+2,y,z); } SendFMessage(playerid,green2,"» You have successfully teleported "lblue"%s(ID:%d)"lgreen2" to your location!",GetPName(id),id); return 1; } dcmd_goto(playerid,params[]) { new id,Float:x,Float:y,Float:z,string[128]; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error); if(sscanf(params,"u",id)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/goto <id/name>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); GetPlayerPos(id,x,y,z); SetPlayerInterior(playerid,GetPlayerInterior(id)); if(!IsPlayerInAnyVehicle(playerid)) { SetPlayerPos(playerid,x+2,y,z); } else { SetVehiclePos(GetPlayerVehicleID(playerid),x+2,y,z); PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid),0); } format(string,sizeof(string),"» You have successfully teleported to "lblue"%s(ID:%d)"lgreen"!",GetPName(id),id); SendClientMessage(playerid,green,string); return 1; } dcmd_admins(playerid,params[]) { #pragma unused params new string[450],count = 0; for(new i = 0;i < MAX_PLAYERS; i++) { if(PInfo[i][Level] > 2) { format(string,sizeof(string),"%s"lgreen2"%s(ID:%d)[Level: %d] \n",string,GetPName(i),i,PInfo[i][Level]); ShowPlayerDialog(playerid,4565,0,"Admins Online",string,"Hide",""); count++; } else if(count == 0) { ShowPlayerDialog(playerid,4565,0,"Admins Online",""lred"No Admins Online!","Close",""); } } return 1; } dcmd_setmoney(playerid,params[]) { new id,amount,string[128]; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error); if(sscanf(params,"ui",id,amount)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/setmoney «id/name» «amount»"); if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,red,notconnected); ResetPlayerMoney(id); GivePlayerMoney(id,amount); format(string,sizeof(string),"» Admin "lblue"%s(ID:%d)"lgreen" has set your cash to "lblue"$%d"lgreen"!",GetPName(playerid),playerid,amount); SendClientMessage(id,green,string); format(string,sizeof(string),"» You have set "lblue"%s(ID:%d)"lgreen"'s cash to "lblue"$%d"lgreen"!",GetPName(id),id,amount); SendClientMessage(playerid,green,string); PlaySound(id,1058); PlaySound(playerid,1058); return 1; } dcmd_jail(playerid,params[]) { new id,string[128]; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error); if(sscanf(params,"u",id)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/jail <id>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); Jailplayer(id); format(string,sizeof(string),"» Administrator %s(ID:%d) has jailed %s(ID:%d) for 3 minutes.",GetPName(playerid),playerid,GetPName(id),id); SendClientMessageToAll(red,string); PlaySound(playerid,1002); PlaySound(id,1002); return 1; } dcmd_unjail(playerid,params[]) { new id,string[128]; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error); if(sscanf(params,"u",id)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/unjail <id>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); releaseplayer(id); format(string,sizeof(string),"» %s(ID:%d) has been released from jail by Administrator %s(ID:%d).",GetPName(id),id,GetPName(playerid),playerid); SendClientMessageToAll(darkgreen,string); PlaySound(id,1057); KillTimer(Jailtimer[id]); return 1; } dcmd_freeze(playerid,params[]) { new id,string[128]; if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,red,error); if(sscanf(params,"u",id)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/freeze <id>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); Freezeplayer(id); format(string,sizeof(string),"» %s(ID:%d) has been frozen by Administrator %s(ID:%d)",GetPName(id),id,GetPName(playerid),playerid); SendClientMessageToAll(red,string); PlaySound(id,1084); return 1; } dcmd_unfreeze(playerid,params[]) { new id,string[128]; if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,red,error); if(sscanf(params,"u",id)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/unfreeze <id>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); TogglePlayerControllable(id,1); PInfo[id][Frozen] = 0; GameTextForPlayer(id,"~g~~h~~h~Unfrozen",4000,3); format(string,sizeof(string),"» %s(ID:%d) has been unfrozen by Administrator %s(ID:%d)",GetPName(id),id,GetPName(playerid),playerid); SendClientMessageToAll(darkgreen,string); KillTimer(Freezetimer[id]); PlaySound(id,1057); return 1; } dcmd_slap(playerid,params[]) { new id,Float:x,Float:y,Float:z,Float:health,string[128]; if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,red,error); if(sscanf(params,"u",id)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/slap <id>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); GetPlayerPos(id,x,y,z); SetPlayerPos(id,x,y,z+14); GetPlayerHealth(id,health); format(string,sizeof(string),"» %s(ID:%d) has been slapped by Administrator %s(ID:%d) [%f Health Left]",GetPName(id),id,GetPName(playerid),playerid,health); SendClientMessageToAll(orange,string); PlaySoundForAll(1190); PlaySound(id,1190); return 1; } dcmd_heal(playerid,params[]) { new id,string[128]; if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,red,error); if(sscanf(params,"u",id)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/heal <id>"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); SetPlayerHealth(playerid,100); format(string,sizeof(string),"» You have been healed by Administrator %s(ID:%d)",GetPName(playerid),playerid); SendClientMessage(id,green,string); format(string,sizeof(string),"» You have healed %s(ID:%d)",GetPName(id),id); SendClientMessage(playerid,green,string); return 1; } dcmd_healall(playerid,params[]) { #pragma unused params new string[128]; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error); for(new i = 0;i < MAX_PLAYERS;i++) { if(IsPlayerConnected(i)) { SetPlayerHealth(i,100); PlaySound(i,1057); } } format(string,sizeof(string),"» Administrator %s(ID:%d) has healed everyone!",GetPName(playerid),playerid); SendClientMessageToAll(green,string); return 1; } dcmd_armourall(playerid,params[]) { #pragma unused params new string[128]; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error); for(new i = 0;i < MAX_PLAYERS;i++) { if(IsPlayerConnected(i)) { SetPlayerArmour(i,100); PlaySound(i,1057); } } format(string,sizeof(string),"» Administrator %s(ID:%d) has restored everyone's armour!",GetPName(playerid),playerid); SendClientMessageToAll(green,string); return 1; } dcmd_giveallmoney(playerid,params[]) { #pragma unused params new amount,string[128]; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error); if(sscanf(params,"i",amount)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/giveallmoney <amount>"); for(new i = 0;i < MAX_PLAYERS;i++) { if(IsPlayerConnected(i)) { GivePlayerMoney(i,amount); PlaySound(i,1057); } } format(string,sizeof(string),"» Administrator %s(ID:%d) gave everyone $%d cash!",GetPName(playerid),playerid,amount); SendClientMessageToAll(green,string); return 1; } dcmd_announce(playerid,params[]) { new text[128],string[128]; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error); if(sscanf(params,"s[128]",text)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/announce <message>"); format(string,sizeof(string),"~w~%s",text); GameTextForAll(string,4000,3); return 1; } dcmd_setname(playerid,params[]) { #define SHM SendHelpMessage new id,name[MAX_PLAYER_NAME],oldname[MAX_PLAYER_NAME],string[160]; if(PInfo[playerid][Level] < 4) return SendClientMessage(playerid,red,error); if(sscanf(params,"us[24]",id,name)) return SHM(playerid,"/setname <id/name> <new name>","Sets a new name for the player specified!"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,notconnected); GetPlayerName(id,oldname,sizeof(oldname)); SetPlayerName(id,name); format(string,sizeof(string),"» Administrator %s(ID:%d) has changed "lblue"%s(ID:%d)'s "lgreen2"name to "lblue"%s"lgreen2"!",GetPName(playerid),playerid,oldname,id,GetPName(id)); SendClientMessageToAll(green2,string); return 1; } //============================ [VIP Cmds] ===================================== dcmd_fix(playerid,params[]) { #pragma unused params if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,red,viperror); if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"* You need to be in a vehicle to use this command!"); RepairVehicle(GetPlayerVehicleID(playerid)); SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0); SendClientMessage(playerid,green,"* Vehicle fixed!"); return 1; }