Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:so(playerid, params[])
- {
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
- if(IsPlayerConnected(playerid))
- {
- if(IsACop(playerid))
- {
- if(timersoo[playerid] > 0) return SendClientMessage(playerid, COLOR_WHITE,"You need to wait 5 seconds before use /so again.");
- {
- new id,string[256];
- if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_WHITE, "{AB0000}Usage: {FFFFFF}/so [name/playerid]");
- {
- if(IsACop(id)) return SendClientMessage(playerid, COLOR_GREY, "You can't somate a cop.");
- if (!ProxDetectorS(20.0, playerid, id)) return SendClientMessage(playerid, COLOR_WHITE,"Acel player este prea departe de tine.");
- if(id != INVALID_PLAYER_ID)
- {
- new sendername[25],numelee[25];
- GetPlayerName(id,numelee,sizeof(numelee));
- GetPlayerName(playerid,sendername,sizeof(sendername));
- if (GetPlayerState(id) == 2)
- {
- new speed = Carspeed(id);
- if(speed > 1)
- {
- format(string, sizeof(string), "{FFFF00}(megaphone) Politist %s: {1560BD}%s{FFFF00}, esti urmarit de politie! Trage pe dreapta imediat!", sendername, numelee);
- ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- timersoo[playerid] = 5;
- somatee[playerid] = 0;
- somated[id] = playerid;
- format(somatename[id], 30, sendername);
- soexpire[id] = 180;
- }
- else if(speed == 0)
- {
- if(PlayerInfo[id][pWantedLevel] == 0)
- {
- format(string, sizeof(string), "{FFFF00}(megaphone) Politist %s: {1560BD}%s{FFFF00}, esti urmarit de politie! Ramai pe loc!", sendername, numelee);
- ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- timersoo[playerid] = 5;
- somatee[playerid] = 0;
- somated[id] = playerid;
- format(somatename[id], 30, sendername);
- soexpire[id] = 180;
- }
- else if(PlayerInfo[id][pWantedLevel] > 0)
- {
- format(string, sizeof(string), "{FFFF00}(megaphone) Politist %s: {1560BD}%s{FFFF00}, esti urmarit de politie! Te predai?", sendername, numelee);
- ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- timersoo[playerid] = 5;
- somatee[playerid] = 0;
- somated[id] = playerid;
- format(somatename[id], 30, sendername);
- soexpire[id] = 180;
- }
- }
- }
- else
- {
- if(PlayerInfo[id][pWantedLevel] > 0)
- {
- format(string, sizeof(string), "{FFFF00}(megaphone) Politist %s: {1560BD}%s{FFFF00}, esti urmarit de politie! Te predai?", sendername, numelee);
- ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- timersoo[playerid] = 5;
- somatee[playerid] = 0;
- somated[id] = playerid;
- format(somatename[id], 30, sendername);
- soexpire[id] = 180;
- }
- else if(PlayerInfo[id][pWantedLevel] == 0)
- {
- format(string, sizeof(string), "{FFFF00}(megaphone) Politist %s: {1560BD}%s{FFFF00}, esti urmarit de politie! Opreste-te unde esti!", sendername, numelee);
- ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- timersoo[playerid] = 5;
- somatee[playerid] = 0;
- somated[id] = playerid;
- format(somatename[id], 30, sendername);
- soexpire[id] = 180;
- }
- }
- }
- else return SendClientMessage(playerid, COLOR_WHITE,"Player not connected.");
- }
- }
- }
- else return SendClientMessage(playerid, COLOR_LIGHTRED, "You are not a cop.");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment