SA-MP Forums Archive
[Ajuda] Existe? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Existe? (/showthread.php?tid=618573)



Existe? - Jorgeeee - 07.10.2016

Sei que existe a funзгo que seta a arma e muniзгo GivePlayerWeapon mais existe alguma que seta somente a muniзгo?


Re: Existe? - ipsLuan - 07.10.2016

Nunca tentei mas tenta usar https://sampwiki.blast.hk/wiki/GetPlayerWeapon.


Re: Existe? - Jorgeeee - 07.10.2016

Quote:
Originally Posted by ipsLuan
Посмотреть сообщение
Код:
 if(GetPlayerWeapon(killerid) == 38) Ban(killerid); //Ban if they have a minigun
o GetPlayerWeapon eu entendi mas oq eu faria para setar a muniзгo ao invйs do Ban(killerid);


Re: Existe? - Whoo - 07.10.2016

basta dar a arma sem muniзгo.

PHP код:
GivePlayerWeapon(playerid380); 



Re: Existe? - Jorgeeee - 07.10.2016

Quote:
Originally Posted by Whoo
Посмотреть сообщение
basta dar a arma sem muniзгo.

PHP код:
GivePlayerWeapon(playerid380); 
eu queria que seta a muniзгo entende, nгo a arma apenas a muniзгo


Re: Existe? - connork - 07.10.2016

https://sampwiki.blast.hk/wiki/SetPlayerAmmo


Re: Existe? - ClaudineiCDS - 08.10.2016

Fiz este code de exemplo, irб adicionar 100 balas para arma que o player estiver na mгo.

PHP код:
CMD:pegarbala(playerid)
{
    
SetPlayerAmmo(playeridGetPlayerWeapon(playerid), 100);
    return 
true;