[AJUDA] Skin
#1

Aee pessoal, quando eu do /gmx no meu serv as skin dos kra q tгo on n salva. ja tentei po no OnGameModeExit pra salva skin, ja tentei po no comando pra salva a skin + n daaaa... ajudem:

pawn Код:
if(strcmp(cmd, "/gmx", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 2800)
        {
            if(AdminInfo[playerid][aTrabalhando] == 1)
            {
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    pap_SalvarInt(i, "Skin", GetPlayerSkin(playerid));
                }
                LimparChat(999);
                format(string, sizeof(string), "[ADMIN] %s deu GMX no servidor.", sendername);
                SendClientMessageToAll(COLOR_FADE5, string);
                GameTextForAll("~g~G~y~M~b~X~w~!", 1000, 0);
                GameModeExit();
                return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo esta logado como admin. (Use: /ta)");
                return 1;
            }
        }
        else if(PlayerInfo[playerid][pAdmin] > 0 && PlayerInfo[playerid][pAdmin] < 2800)
        {
            SendClientMessage(playerid, COLOR_GRAD2, "Vocк й cargo baixo.");
            return 1;
        }
        else if(PlayerInfo[playerid][pAdmin] == 0)
        {
            SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo й admin.");
            return 1;
        }
    }
Reply
#2

isso tem que ter qualquer coisa parecida com OnPlayerStatusUpdate. pk voce ta a dar RR e nao esta a guardar
Reply
#3

Muda por:

pawn Код:
for(new i = 0; i < (MAX_PLAYERS+1); i++)
                {
                    pap_SalvarInt(i, "Skin", GetPlayerSkin(i));
                }
Reply
#4

Faz aquilo que SubZero disse...

SubZero que estava aqui estudando com um Grupo e chegamos a uma conclusгo de que definir a Array Externamente no Loop й a Melhor Maneira,Loop da Voltas..

pawn Код:
new i;
#define SLOTS 500 //- Nъmero de Slots -//
for(i = 0 ; i <= MAX_PLAYERS; i++)//+1,ele teria que calcular,nгo, nгo buga '<='
{
     pap_SalvarInt(i, "Skin", GetPlayerSkin(i));
}
Reply
#5

ei Drakon ai vocк definiu SLOTS para nada por que vocк continuou a usar o MAX_PLAYERS, ficaria assim, axo:
pawn Код:
new i;
#define SLOTS 500 //Nъmero de Slots
for(i = 0 ; i <= SLOTS; i++)
{
     pap_SalvarInt(i, "Skin", GetPlayerSkin(i));
}
Reply
#6

Valeu LIP, nem me Liguei

This forum requires that you wait 120 seconds between posts. Please try again in 43 seconds.
Reply
#7

Quote:
Originally Posted by DraKiNs
Посмотреть сообщение
Valeu LIP, nem me Liguei

This forum requires that you wait 120 seconds between posts. Please try again in 43 seconds.
Cara, eu jб tive problemas com aquilo, nгo faz diferenзa com +1 ou <=
Como eu jб tive bugs assim, eu coloco +1.

Se quiser:

pawn Код:
#if defined MAX_PLAYERS
#undef MAX_PLAYERS
#define MAX_PLAYERS 501
#endif
Pronto.. sу deixar < MAX_PLAYERS
Reply
#8

Nem um deu serto
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)