Ok, I've copied my tazer command but now I can taze across the map.
Is their away to change this
pawn Код:
new suspect = GetClosestPlayer(playerid);
to the person who has been shot, not the nearest?
Thanks again.
This is my code:
Код:
if(newkeys & KEY_FIRE)
{
if(GetPlayerWeapon(playerid == 23))
{
new string[128];
new suspect = GetClosestPlayer(playerid);
format(string, sizeof(string), "Tazed by %s for 60 seconds.", GetPlayerNameEx(playerid));
SendClientMessage(suspect, COLOR_RED, string);
format(string, sizeof(string), "You tazed %s 60 seconds.", GetPlayerNameEx(suspect));
SendClientMessage(playerid, COLOR_WHITE, string);
TogglePlayerControllable(suspect, 0);
PlayerTazed[suspect] = 1;
SetTimerEx("UntazePlayer", 60000, false, "i", suspect);
PlayerPlayerActionMessage(playerid,suspect,15.0,"has just tazed");
}
return 1;
}
return 1;
I can get any weapon out and taze as well as anywhere across the map.