SA-MP Forums Archive
GetPlayerWeapon? - 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: GetPlayerWeapon? (/showthread.php?tid=387929)



GetPlayerWeapon? - tomsalmon - 26.10.2012

Hey, I tried to do this:

PHP код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
if(
Taser[Shooter] == 1)
{
if(
GetPlayerWeapon(Shooter) != 23) return 0;
ApplyAnimation(Target"CRACK""crckdeth2"4.010000);
new 
Float:H;
GetPlayerHealth(Target,H);
SetPlayerHealth(Target,5);
}
return 
1;

i want the code will work only when the player shoot with weapon id - 23 (Deagle)

it will work? if not, how to fix that? Thanks for helpers!


Re: GetPlayerWeapon? - park4bmx - 26.10.2012

Isnt Deagle weapon ID 24 ?