Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:su(playerid, params[])
- {
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
- if(IsPlayerConnected(playerid))
- {
- if(IsACop(playerid))
- {
- if(SomatePermission[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, "{3385FF}Wait 5 seconds to use again /so.");
- {
- new id,string[256];
- if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF9900}Scrie: {33CCFF}/su <Name/Playerid>");
- {
- if (!ProxDetectorS(40.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] = SetTimerEx("SetSomate", 5000, 1, "i", playerid);
- somatee[playerid] = 0;
- SomatePermission[playerid] = 0;
- somated[id] = playerid;
- format(somatename[id], 30, sendername);
- soexpire[playerid] = SetTimerEx("SomateExpire", 180000, 0, "i", id);
- }
- 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] = SetTimerEx("SetSomate", 5000, 1, "i", playerid);
- somatee[playerid] = 0;
- SomatePermission[playerid] = 0;
- somated[id] = playerid;
- format(somatename[id], 30, sendername);
- soexpire[playerid] = SetTimerEx("SomateExpire", 180000, 0, "i", id);
- }
- 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] = SetTimerEx("SetSomate", 5000, 1, "i", playerid);
- somatee[playerid] = 0;
- SomatePermission[playerid] = 0;
- somated[id] = playerid;
- format(somatename[id], 30, sendername);
- soexpire[playerid] = SetTimerEx("SomateExpire", 180000, 0, "i", id);
- }
- }
- }
- 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] = SetTimerEx("SetSomate", 5000, 1, "i", playerid);
- somatee[playerid] = 0;
- SomatePermission[playerid] = 0;
- somated[id] = playerid;
- format(somatename[id], 30, sendername);
- soexpire[playerid] = SetTimerEx("SomateExpire", 180000, 0, "i", id);
- }
- 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] = SetTimerEx("SetSomate", 5000, 1, "i", playerid);
- somatee[playerid] = 0;
- SomatePermission[playerid] = 0;
- somated[id] = playerid;
- format(somatename[id], 30, sendername);
- soexpire[playerid] = SetTimerEx("SomateExpire", 180000, 0, "i", id);
- }
- }
- }
- 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
Advertisement