SA-MP Forums Archive
Player looses weapons - 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: Player looses weapons (/showthread.php?tid=571543)



Player looses weapons - Sc0pion - 19.04.2015

Fixed!


Re: Player looses weapons - Mencent - 19.04.2015

Hello!

It is normal that you loose your weapons.

Mencent


Re: Player looses weapons - Sc0pion - 19.04.2015

Fixed!


Re: Player looses weapons - Azula - 19.04.2015

PHP код:
#define MAX_WEPS 20
new Wep[MAX_WEPS][MAX_PLAYERS];
new 
ammo[MAX_WEPS][MAX_PLAYERS];
On player death
for (new 0!= sizeof(MAX_WEPS); i++)
{
    
GetPlayerWeaponData(playeridiWep[i][playerid], ammo[i][playerid]);
}
on player spawn
for (new 0!= sizeof(MAX_WEPS); i++)
{
    
GivePlayerWeapon(playerid,Wep[i][playerid], ammo[i][playerid]);




Re: Player looses weapons - Sc0pion - 19.04.2015

Fixed!


Re: Player looses weapons - Azula - 19.04.2015

you have make loops show you code ?


Re: Player looses weapons - Sc0pion - 19.04.2015

Fixed!


Re: Player looses weapons - Mencent - 19.04.2015

Send us your code of the callback OnPlayerDeath and OnPlayerSpawn.

Mencent


Re: Player looses weapons - Sc0pion - 02.05.2015

Fixed!


Re: Player looses weapons - icra - 02.05.2015

If you don't want to share your code there's no problem,
anyway the code Azula gave you seems correct, and the errors you discovered shouldn't matter much with it.
Probably you're wrong adapting it to your gamemode.