OneShotOneKill - 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: OneShotOneKill (
/showthread.php?tid=337083)
OneShotOneKill -
Unknown1195 - 24.04.2012
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLos t,Float:ArmourLost)
{
SetPlayerHealth(Target,0);
SetPlayerArmour(Target,0);
return 1;
}
Hey guys I have this small script where making that 1 shot is enough to kill a player, but the problem is that it works for all guns can some one help me to make if only for gun id 33 and 34 please?
Re: OneShotOneKill -
Crazymax - 24.04.2012
pawn Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
if(GetPlayerWeapon(Shooter)==33||GetPlayerWeapon(Shooter)==34){
SetPlayerHealth(Target,0);
SetPlayerArmour(Target,0);
}
return 1;
}
Re: OneShotOneKill -
MP2 - 24.04.2012
Just set their health to 1 when they spawn..
Respuesta: OneShotOneKill -
Marricio - 24.04.2012
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
if(weaponid == 33 || weaponid == 34 )
SetPlayerHealth( playerid, 0 );
return 1;
}
Maybe?
Re: OneShotOneKill -
Face9000 - 24.04.2012
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
if(weaponid == 33 || weaponid == 34) SetPlayerHealth(playerid, 0.0);
return 1;
}
EDIT: Damn,too slow.