SA-MP Forums Archive
Guns from nowhere - 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: Guns from nowhere (/showthread.php?tid=471966)



Guns from nowhere - Infility - 26.10.2013

Hello,

my server have one trouble. Random player when he connected, or spawned get guns from nowhere. In server gamemode is not code where I give guns. Where are problem? In OnPlayerUpdate I'm insert code where set guns ammo to 0 if player has that gun, but it's not work.

Guns, which players get (id): 1, 2, 3, 7, 8, 10, 11, 12, 13, 14, 15.
Thanks for the help.


Re: Guns from nowhere - Konstantinos - 26.10.2013

Check for the AddPlayerClass, there are parameters for giving weapons. Set the last 6 parameters to 0.


Re: Guns from nowhere - Infility - 26.10.2013

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Check for the AddPlayerClass, there are parameters for giving weapons. Set the last 6 parameters to 0.
Parameters sets to -1, maybe there is problem?


Re: Guns from nowhere - Twizted - 26.10.2013

What do you mean? AddPlayerClass should look like this:

pawn Код:
AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
If you don't want the players to spawn with weapons, just do something like this:

pawn Код:
AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, 0, 0, 0, 0, 0, 0); //don't change the last six digits (the zeros).



Re: Guns from nowhere - Infility - 26.10.2013

I mean that weapons parameters sets to -1. But players don't allways get guns. It's like random.


Re: Guns from nowhere - Infility - 10.11.2013

UP, AddPlayerClass where is weapon parameters I set to 0, but still I get random guns.


Re: Guns from nowhere - Twizted - 10.11.2013

Well, message me your Skype and I'll look through your code (if it's not too big); we'll eventually find a solution.


Re: Guns from nowhere - Infility - 25.11.2013

Now, when player been respawned right away system shows that player have minigun and etc. guns and players geted ban.

Why players geted various guns? It's not only my server problem, one more server owner say to me that they have same problem. Thanks for you're help.


Re: Guns from nowhere - Infility - 25.11.2013

UP!!