SA-MP Forums Archive
When someone got gun he have unlimited ammu - 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: When someone got gun he have unlimited ammu (/showthread.php?tid=609859)



When someone got gun he have unlimited ammu - Progamerisrael1 - 17.06.2016

For example when LSPD's member takes gun from the locker he got unlimited ammu,
How I fix it?


Re: When someone got gun he have unlimited ammu - FuNkYTheGreat - 17.06.2016

GivePlayerWeapon(playerid, 36, 9999); /// 36 is the id of Sniper and 9999 means Unlimited Ammo.


Re: When someone got gun he have unlimited ammu - Progamerisrael1 - 17.06.2016

Quote:
Originally Posted by FuNkYTheGreat
Посмотреть сообщение
GivePlayerWeapon(playerid, 36, 9999); /// 36 is the id of Sniper and 9999 means Unlimited Ammo.
So, what's it GivePlayerValidWeapon(giveplayerid ? it's the same?


Re: When someone got gun he have unlimited ammu - Progamerisrael1 - 17.06.2016

Please someone help me, it's very important for me.


Re: When someone got gun he have unlimited ammu - FuNkYTheGreat - 17.06.2016

Yes it is same Function.


Re: When someone got gun he have unlimited ammu - GangstaSunny - 17.06.2016

Seems like you are scripting inside a GodFather.
GivePlayerValidWeapon is not a standard SA-MP function. "giveplayerid" just means the playerid who the server will give the weapons to. Please post the command and the GivePlayerValidWeapon function to let me help you as best as possible.


Re: When someone got gun he have unlimited ammu - Progamerisrael1 - 17.06.2016

Quote:
Originally Posted by GangstaSunny
Посмотреть сообщение
Seems like you are scripting inside a GodFather.
GivePlayerValidWeapon is not a standard SA-MP function. "giveplayerid" just means the playerid who the server will give the weapons to. Please post the command and the GivePlayerValidWeapon function to let me help you as best as possible.
What you want me to post? Can you tell me what to type in the 'find', thank you very much


Re: When someone got gun he have unlimited ammu - FuNkYTheGreat - 17.06.2016

My Opinion:
Use GivePlayerWeapon indeed GivePlayerValidWeapon. because giveplayerweapon is SA-MP own Function,


Re: When someone got gun he have unlimited ammu - GangstaSunny - 17.06.2016

@FuNkYTheGreat
We dont know his script. Maybe he will ban a player if he will not use the script-sided function.

@Progamerisrael1
Search for the function "GivePlayerValidWeapon" in your script and post it. Also post the function which would be execuded if a cop is taken guns out of the locker.


Re: When someone got gun he have unlimited ammu - FuNkYTheGreat - 17.06.2016

in his script GaiveplayerValidWeapon = GiveplayerWeapon