Tazer by a weapon?
#7

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.
Reply


Messages In This Thread
Tazer by a weapon? - by acade - 25.02.2010, 16:56
Re: Tazer by a weapon? - by dice7 - 25.02.2010, 16:59
Re: Tazer by a weapon? - by acade - 25.02.2010, 17:08
Re: Tazer by a weapon? - by acade - 25.02.2010, 17:19
Re: Tazer by a weapon? - by dice7 - 25.02.2010, 17:26
Re: Tazer by a weapon? - by acade - 25.02.2010, 17:34
Re: Tazer by a weapon? - by acade - 25.02.2010, 17:40
Re: Tazer by a weapon? - by dice7 - 25.02.2010, 17:59
Re: Tazer by a weapon? - by acade - 25.02.2010, 20:02
Re: Tazer by a weapon? - by acade - 25.02.2010, 20:26

Forum Jump:


Users browsing this thread: 1 Guest(s)