Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/tazer", true) ==0 || strcmp(cmd, "/ta", true) ==0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gTeam[playerid] == 2 || IsACop(playerid))
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessage(playerid, COLOR_WHITE, "{FF0000}GRESKA:{FFFFFF}Nemozete da go koristite tazerot dodeka ste vo avtomobil.");
- return 1;
- }
- if(KnockedDown[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_WHITE, "{FF0000}GRESKA:{FFFFFF}Nemozete da tazirate bidejki ste na zemja.");
- return 1;
- }
- if(PlayerTied[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_WHITE, "{FF0000}GRESKA:{FFFFFF}Zavrzan ste.");
- return 1;
- }
- if(ReduceTime[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Mora da pocekate 5 sekundi za da ja koristite povtorno.");
- return 1;
- }
- new suspect = GetClosestPlayer(playerid);
- if(IsPlayerConnected(suspect))
- {
- if(PlayerCuffed[suspect] > 0)
- {
- SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}Igracot vekje ima lisici ili ima tazer.");
- return 1;
- }
- if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
- {
- if(gTeam[suspect] == 2)
- {
- SendClientMessage(playerid, COLOR_WHITE, "{FF0000}GRESKA:{FFFFFF}Nemozete da tazirate PD/SWAT/MVR.");
- return 1;
- }
- if(IsPlayerInAnyVehicle(suspect))
- {
- SendClientMessage(playerid, COLOR_WHITE, "{FF0000}GRESKA:{FFFFFF}Nemozete da tazirate dokolku covekot e vo avtomobil.");
- return 1;
- }
- GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new randt = random(4)+1;
- if(randt == 1)
- {
- format(string, sizeof(string), "* %s udira so svojot tazer na %s, no promasuva.", sendername ,giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- }
- else
- {
- format(string, sizeof(string), "{37F906}INFO:{FFFFFF}%s ve tazira na 10 sekundi.", sendername);
- SendClientMessage(suspect, COLOR_WHITE, string);
- format(string, sizeof(string), "{37F906}INFO:{FFFFFF}Go taziravte %s-a na 10 sekundi.", giveplayer);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "* %s udira so tazer na %s i go pogoduva.", sendername ,giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GameTextForPlayer(suspect, "~r~Sokiran", 2500, 3);
- TogglePlayerControllable(suspect, 0);
- PlayerCuffed[suspect] = 1;
- PlayerCuffedTime[suspect] = 15;
- ReduceTime[playerid] = 1;
- SetTimerEx("ReduceTimer", 5000, false, "i", playerid);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "{FF0000}GRESKA:{FFFFFF}Nema nikoj vo vasata blizina.");
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "{FF0000}GRESKA:{FFFFFF}Ne ste PD/SWAT/MVR.");
- }
- }//not connected
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement