Toggle player when shot
#1

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

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

hmm, don't working
Reply
#4

UP

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

Couldn't you just use OnPlayerDeath ?
Reply
#6

Look for OnPlayerShootPlayer ((It's a plugin))
Reply
#7

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
Reply
#8

Hmm, don't work

Код:
}

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

nvm i misread it
Reply
#10

don't work man...

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


Forum Jump:


Users browsing this thread: 1 Guest(s)