Player looses weapons
#1

Fixed!
Reply
#2

Hello!

It is normal that you loose your weapons.

Mencent
Reply
#3

Fixed!
Reply
#4

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]);

Reply
#5

Fixed!
Reply
#6

you have make loops show you code ?
Reply
#7

Fixed!
Reply
#8

Send us your code of the callback OnPlayerDeath and OnPlayerSpawn.

Mencent
Reply
#9

Fixed!
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)