System save/load weapons
#1

Hello, I'm having some problems on my system to save and load my weapon system, it took a change and still not working properly, could help me? Sorry my bad english, and now thanks.

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
#2

Up :/
Reply
#3

whats the problem?

1. dont bump your posts
2. did you call those stock functions in any call back?
3. wheres your saving system?
4. dont use stocks.. use enumerators to save / load the weapons and a saving system as well
Reply
#4

Quote:
Originally Posted by CROSS_Hunter
Посмотреть сообщение
whats the problem?

1. dont bump your posts
2. did you call those stock functions in any call back?
3. wheres your saving system?
4. dont use stocks.. use enumerators to save / load the weapons and a saving system as well
Hello, I'm managing to save the weapons, but they are not loading ...
Reply
#5

Quote:
Originally Posted by CROSS_Hunter
Посмотреть сообщение
whats the problem?

1. dont bump your posts
2. did you call those stock functions in any call back?
3. wheres your saving system?
4. dont use stocks.. use enumerators to save / load the weapons and a saving system as well
So fucking true
Reply
#6

up ;x
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)