Weapons aren't loading correctly.
#1

Hey there,

When a player spawns in on the server, his weapons are set to the default which is fine, however, when he quits, his stats are updated and it's fine inside the database. The default set to 0 so when his stats are loaded correctly and he spawns, his weapons are then set back to default. Why could this be?

pawn Код:
GivePlayerWeapons(playerid)
{
    if(PlayerInfo[playerid][pGun1] != 0)
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun1], PlayerInfo[playerid][pGun1Ammo]);
    if(PlayerInfo[playerid][pGun2] != 0)
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun2], PlayerInfo[playerid][pGun2Ammo]);
    if(PlayerInfo[playerid][pGun3] != 0)
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun3], PlayerInfo[playerid][pGun3Ammo]);
    if(PlayerInfo[playerid][pGun4] != 0)
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun4], PlayerInfo[playerid][pGun4Ammo]);
    if(PlayerInfo[playerid][pGun5] != 0)
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun5], PlayerInfo[playerid][pGun5Ammo]);
    if(PlayerInfo[playerid][pGun6] != 0)
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun6], PlayerInfo[playerid][pGun6Ammo]);
    if(PlayerInfo[playerid][pGun7] != 0)
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun7], PlayerInfo[playerid][pGun7Ammo]);
    if(PlayerInfo[playerid][pGun8] != 0)
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun8], PlayerInfo[playerid][pGun8Ammo]);
    if(PlayerInfo[playerid][pGun9] != 0)
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun9], PlayerInfo[playerid][pGun9Ammo]);
    if(PlayerInfo[playerid][pGun10] != 0)
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun10], PlayerInfo[playerid][pGun10Ammo]);
    if(PlayerInfo[playerid][pGun11] != 0)
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun11], PlayerInfo[playerid][pGun11Ammo]);
    else GivePlayerWeapon(playerid, 24, 160); GivePlayerWeapon(playerid, 26, 84); GivePlayerWeapon(playerid, 28, 370);
}

I'm grateful for any form of help.

Thanks.
Reply


Messages In This Thread
Weapons aren't loading correctly. - by Isolated - 11.07.2013, 17:56
Re: Weapons aren't loading correctly. - by Misiur - 11.07.2013, 18:56
Re: Weapons aren't loading correctly. - by Isolated - 11.07.2013, 22:49
Re: Weapons aren't loading correctly. - by ToiletDuck - 12.07.2013, 01:41

Forum Jump:


Users browsing this thread: 1 Guest(s)