SA-MP Forums Archive
Check if player have weapon Golf Club - 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: Check if player have weapon Golf Club (/showthread.php?tid=600505)



Check if player have weapon Golf Club - luccagomes15 - 09.02.2016

How to check if player have Golf Club using function GetPlayerWeaponData

Код:
GetPlayerWeaponData
Код:
if(playerhavegolfclub) {
}
else if(playerdonthavegolfclub) {
}
Код:
Golf Club
weapon id: 2
slot: 1
model: 333



Re: Check if player have weapon Golf Club - GangstaSunny - 09.02.2016

PHP код:
new WeaponIDAmmo;
GetPlayerWeaponData(playerid1WeaponIDAmmo); 
"WeaponID" now stores the weaponid which is in slot one.

PHP код:
if(WeaponID == 2)//Golf Club 



Re: Check if player have weapon Golf Club - luccagomes15 - 09.02.2016

Quote:
Originally Posted by GangstaSunny
Посмотреть сообщение
PHP код:
new WeaponIDAmmo;
GetPlayerWeaponData(playerid1WeaponIDAmmo); 
"WeaponID" now stores the weaponid which is in slot one.

PHP код:
if(WeaponID == 2)//Golf Club 
ty! +rep