Weaponsystem don't load
#3

Think you don't get it.

I have put everything IN the gamemode not in a filterscript.
@ onplayerspawn
pawn Код:
LoadWeapons(playerid);
@ onplayerlogin @ the login dialog
pawn Код:
LoadWeapons(playerid);
The loadweapons stock
pawn Код:
stock LoadWeapons(playerid)
{
    if(IsPlayerNPC(playerid))return 1;
    GetPlayerName(playerid, PlayerName[playerid], MAX_PLAYER_NAME);//In the hope the account bug gets fixed

    format(PlayerFile, sizeof(PlayerFile), "/accounts/%s.sav", PlayerName[playerid]);
    if (dini_Exists(PlayerFile))
    {
        PlayerInfo[playerid][pWeapon0] = dini_Int(PlayerFile, "Weapon0");
        PlayerInfo[playerid][pWeapon1] = dini_Int(PlayerFile, "Weapon1");
        PlayerInfo[playerid][pWeapon2] = dini_Int(PlayerFile, "Weapon2");
        PlayerInfo[playerid][pWeapon3] = dini_Int(PlayerFile, "Weapon3");
        PlayerInfo[playerid][pWeapon4] = dini_Int(PlayerFile, "Weapon4");
        PlayerInfo[playerid][pWeapon5] = dini_Int(PlayerFile, "Weapon5");
        PlayerInfo[playerid][pWeapon6] = dini_Int(PlayerFile, "Weapon6");
        PlayerInfo[playerid][pWeapon7] = dini_Int(PlayerFile, "Weapon7");
        PlayerInfo[playerid][pWeapon8] = dini_Int(PlayerFile, "Weapon8");
        PlayerInfo[playerid][pWeapon9] = dini_Int(PlayerFile, "Weapon9");
        PlayerInfo[playerid][pWeapon10] = dini_Int(PlayerFile, "Weapon10");
        PlayerInfo[playerid][pWeapon11] = dini_Int(PlayerFile, "Weapon11");
        PlayerInfo[playerid][pWeapon12] = dini_Int(PlayerFile, "Weapon12");
        PlayerInfo[playerid][pAmmo0] = dini_Int(PlayerFile, "Ammo0");
        PlayerInfo[playerid][pAmmo1] = dini_Int(PlayerFile, "Ammo1");
        PlayerInfo[playerid][pAmmo2] = dini_Int(PlayerFile, "Ammo2");
        PlayerInfo[playerid][pAmmo3] = dini_Int(PlayerFile, "Ammo3");
        PlayerInfo[playerid][pAmmo4] = dini_Int(PlayerFile, "Ammo4");
        PlayerInfo[playerid][pAmmo5] = dini_Int(PlayerFile, "Ammo5");
        PlayerInfo[playerid][pAmmo6] = dini_Int(PlayerFile, "Ammo6");
        PlayerInfo[playerid][pAmmo7] = dini_Int(PlayerFile, "Ammo7");
        PlayerInfo[playerid][pAmmo8] = dini_Int(PlayerFile, "Ammo8");
        PlayerInfo[playerid][pAmmo9] = dini_Int(PlayerFile, "Ammo9");
        PlayerInfo[playerid][pAmmo10] = dini_Int(PlayerFile, "Ammo10");
        PlayerInfo[playerid][pAmmo11] = dini_Int(PlayerFile, "Ammo11");
        PlayerInfo[playerid][pAmmo12] = dini_Int(PlayerFile, "Ammo12");
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapon0],PlayerInfo[playerid][pAmmo0]);
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapon1],PlayerInfo[playerid][pAmmo1]);
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapon2],PlayerInfo[playerid][pAmmo2]);
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapon3],PlayerInfo[playerid][pAmmo3]);
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapon4],PlayerInfo[playerid][pAmmo4]);
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapon5],PlayerInfo[playerid][pAmmo5]);
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapon6],PlayerInfo[playerid][pAmmo6]);
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapon7],PlayerInfo[playerid][pAmmo7]);
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapon8],PlayerInfo[playerid][pAmmo8]);
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapon9],PlayerInfo[playerid][pAmmo9]);
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapon10],PlayerInfo[playerid][pAmmo10]);
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapon11],PlayerInfo[playerid][pAmmo11]);
        GivePlayerWeapon(playerid, PlayerInfo[playerid][pWeapon12],PlayerInfo[playerid][pAmmo12]);
    }
    return 1;
}
Reply


Messages In This Thread
Weaponsystem don't load - by jorambo - 15.03.2011, 17:27
Re: Weaponsystem don't load - by Jochemd - 15.03.2011, 17:29
Re: Weaponsystem don't load - by jorambo - 15.03.2011, 17:32
Re: Weaponsystem don't load - by Jochemd - 15.03.2011, 17:34
Re: Weaponsystem don't load - by jorambo - 15.03.2011, 17:39
Re: Weaponsystem don't load - by Jochemd - 15.03.2011, 17:41
Re: Weaponsystem don't load - by jorambo - 16.03.2011, 20:58
Re: Weaponsystem don't load - by Hashski - 16.03.2011, 21:01
Re: Weaponsystem don't load - by jorambo - 16.03.2011, 21:22
Re: Weaponsystem don't load - by Hashski - 16.03.2011, 22:16

Forum Jump:


Users browsing this thread: 3 Guest(s)