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



Taking guns - Pasa - 08.12.2012

I am making a script from 0 and i have now a problem with taking guns ( id 9 - Chainsaw and id 1 - Brass Knuckles)
because when i go GivePlayerWeapon(playerid, 9|1,0); the weapon stays in players invertory!

Can somebody help me :S


Re: Taking guns - Pasa - 08.12.2012

i fixed it, i total forgeted the "SetPlayerAmmo" function :/


Re: Taking guns - NicholasA - 08.12.2012

You're doing it wrong, correct format must be:

Код:
GivePlayerWeapon(playerid, weaponid, ammo);
if this didnt help im sorry, you'll have to be more clear next time


Re: Taking guns - Herald_Groove - 08.12.2012

Quote:
Originally Posted by phantomcraft
Посмотреть сообщение
You're doing it wrong, correct format must be:

Код:
GivePlayerWeapon(playerid, weaponid, ammo);
if this didnt help im sorry, you'll have to be more clear next time
That always helps.


Re: Taking guns - Pasa - 08.12.2012

Quote:
Originally Posted by phantomcraft
Посмотреть сообщение
You're doing it wrong, correct format must be:

Код:
GivePlayerWeapon(playerid, weaponid, ammo);
if this didnt help im sorry, you'll have to be more clear next time
i know that is the format!
The "9|1" is the weapon id 9 or id 1 to be more correct that is
GivePlayerWeapon(playerid, 9, 0);
or
GivePlayerWeapon(playerid, 1, 0);
!