Tazer
#1

I'm wondering how can i create in this function when i shoot the player he wont loose any health ?


Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
	if (playerid != INVALID_PLAYER_ID && damagedid != INVALID_PLAYER_ID)
	{
		if (weaponid == 23 && TazerHand[playerid] == 1)
		{
		    if(ReloadingTazer[playerid] > 0)
		    {
		        SCM(playerid, TOMATO, " (info) {FFFFFF}Reloading!");
		        return 1;
			}
		    if(!PlayerTazed[damagedid])
		    {
		    	new string[128];
				PlayerPlaySoundInArea(playerid, 6003);

				PlayerTazed[damagedid] = 1;
				TogglePlayerControllable(damagedid, 0);
				TazerTimer[damagedid] = 10;

				for (new i = 0; i < 3; i ++)
				{
     				ApplyAnimation(damagedid, "PED", "FLOOR_hit_f", 4.0, 1, 0, 0, 0, 0);
				}

				ReloadingTazer[playerid] = 1;
			}
		}
	}
	return 1;
}
Reply


Messages In This Thread
Tazer - by ShoortyFl - 21.06.2014, 21:14
Re: Tazer - by Campbell- - 21.06.2014, 21:19
Re: Tazer - by GeekSiMo - 21.06.2014, 21:21
Re: Tazer - by Campbell- - 21.06.2014, 21:25
Re: Tazer - by GeekSiMo - 21.06.2014, 21:26
Re: Tazer - by Juvanii - 21.06.2014, 22:01

Forum Jump:


Users browsing this thread: 1 Guest(s)