SA-MP Forums Archive
Toggle player when shot - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Toggle player when shot (/showthread.php?tid=417270)



Toggle player when shot - TuTh - 20.02.2013

How i can toggle a player when he's shooting?


Re: Toggle player when shot - DaRk_RaiN - 20.02.2013

pawn Код:
//Put this at the bottom of your script.
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
          TogglePlayerControllable(playerid,0);
          return 1;
     }



Re: Toggle player when shot - TuTh - 20.02.2013

hmm, don't working


Re: Toggle player when shot - TuTh - 01.03.2013

UP

@DaRk_RaiN i need another function. that functian toggle a player when his life falls


Re: Toggle player when shot - freddy smyth - 01.03.2013

Couldn't you just use OnPlayerDeath ?


Re: Toggle player when shot - ikbenremco - 01.03.2013

Look for OnPlayerShootPlayer ((It's a plugin))


Re: Toggle player when shot - Apenmeeuw - 01.03.2013

pawn Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
    return 1;
}
put the stuff in there.

also use this include:

https://dl.dropbox.com/u/81961893/OPSP.inc


Re: Toggle player when shot - TuTh - 04.03.2013

Hmm, don't work

Код:
}

public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
	if(PlayerInfo[Shooter][pGunLic] == 0)
	{
        TogglePlayerControllable(Shooter,0);
	}
	return 1;



Re: Toggle player when shot - Maraudeur - 04.03.2013

nvm i misread it


Re: Toggle player when shot - TuTh - 04.03.2013

don't work man...

i want this thing: when a player without weapons license use a weapon, he must be blocked when shot