[Ajuda] Carregar armas
#1

Olб, estou com problema no meu sistema de salvar armas, alguйm poderia me ajudar?

Ele estб salvando, mas o problema estб sendo na hora de carregar a arma, desde jб obrigado.

pawn Код:
stock ResetWeapons(playerid)
{
    ResetPlayerWeapons(playerid);
}

stock RemoveWeapons(playerid)
{
    for(new i = 0; i < 13; i++)
    {
        GetWeapons[playerid][i][0] = 0;
        GetWeapons[playerid][i][1] = 0;
    }
    ResetPlayerWeapons(playerid);
}

stock LoadWeapons(playerid)
{
    KillTimer(TimerReceive[playerid][0]);
    ReceivingWeapon[playerid] = 1;
    ResetWeapons(playerid);
    for(new i = 0; i < 13; i++)
    {
        if(GetWeapons[playerid][i][0] != 0 && GetWeapons[playerid][i][1] != 0)
            GivePlayerWeapon(playerid, GetWeapons[playerid][i][0], GetWeapons[playerid][i][1]);
    }
    SaveWeapons(playerid);
    TimerReceive[playerid][0] = SetTimerEx("ZerarRecebendoArma", 10000, 0, "d", playerid);
}

stock SaveWeapons(playerid)
{
    for(new i = 0; i < 13; i++)
    {
        new w = 0, a = 0;
        GetPlayerWeaponData(playerid, i, w, a);
        if(a <= 0)
        {
            GetWeapons[playerid][i][0] = 0;
            GetWeapons[playerid][i][1] = 0;
        }
        else if(a < 0xFFFF || i < 2)
        {
            GetWeapons[playerid][i][0] = w;
            GetWeapons[playerid][i][1] = a;
        }
    }
}
Reply


Messages In This Thread
Carregar armas - by Rodox - 12.09.2012, 18:23
Re: Carregar armas - by Crueliz0n - 12.09.2012, 18:33
Re: Carregar armas - by Rodox - 12.09.2012, 18:47
Re: Carregar armas - by DartakousLien - 12.09.2012, 19:21
Re: Carregar armas - by Rodox - 13.09.2012, 04:17
Re: Carregar armas - by DartakousLien - 13.09.2012, 11:04
Re: Carregar armas - by Rodox - 13.09.2012, 16:19
Re: Carregar armas - by Rodox - 14.09.2012, 00:25

Forum Jump:


Users browsing this thread: 2 Guest(s)