SA-MP Forums Archive
[AJUDA] Bug no Gamemode - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] Bug no Gamemode (/showthread.php?tid=325858)



[AJUDA] Bug no Gamemode - GuiihCamargo - 15.03.2012

Galera esses dias atrбs meu servidor estб acontecendo um ъnico bug... Quando alguem entra no servidor ele ganha admin , agora me falaram que й depois de algum administrador sair... Como faзo pra salvar mesmo quando o cara sai com alguns dos casos ex:
Voltade Prуpria
Kick ou Ban
Queda de conexгo ou crash

Agora queria ver se й porque um adm saio ou os publics OnPlayerConnect e Disconnect estгo salvando algo errado..
Sem mais delongas irei postar as duas publics!

pawn Код:
public OnPlayerConnect(playerid)
{
TogglePlayerSpectating(playerid, true);
ForceClassSelection(playerid);
SetPVarInt(playerid, "Intro", 0);
SetTimerEx("ShowIntro", 1000, 0, "d", playerid);
blockpm[playerid] = 0;
PlayerInfo[playerid][LoginsFalsos] = 0;
dini_Int(file,"LevelAdmin");
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
dini_IntSet(file, "DM", 0);
TextDrawShowForPlayer(playerid, topblack);
TextDrawShowForPlayer(playerid, backblack);
CPSERVICE_actualcp[playerid] = 0;
AFK[playerid]=0;
multar[playerid]= 0;
autoescola[playerid] = 0;
pAdmin[playerid] = 0;
nogame[playerid] = 0;
noevento[playerid] = 0;
PlayerInfo[playerid][Logged] = 0;
vip[playerid] = 0;
guard[playerid] = 0;
GPS_Spawned[playerid] = 0;
DMLiberado[playerid] = 0;
Mute[playerid] = 0;
SpawnPlayer(playerid);
//news
new Pname[MAX_PLAYER_NAME];
new string[256];
new sstring[256];
//============================================================================================================
if(dini_Int("nickban.ini",PlayerName(playerid)) == 1)
{
SendClientMessage(playerid, 0x11B1FFAA, "Vocк foi banido Motivo: Vocк estб banido!");
format(sstring, sizeof(sstring), "%s (%d) Foi banido |Motivo|: Conta estб banida!", aname,playerid);
SendClientMessageToAll(0x11B1FFAA, sstring);
Kick(playerid);
return 1;
}
if(dini_Int("banidos.ini",PlayerName(playerid)) == 1)
{
SendClientMessage(playerid, 0x11B1FFAA, "Vocк foi kickado |Motivo|: Conta estб banida!");
format(sstring, sizeof(sstring), "%s (%d) Foi kickado |Motivo|: Conta estб banida", aname,playerid);
SendClientMessageToAll(0x11B1FFAA, sstring);
Kick(playerid);
return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
StopAudioStreamForPlayer(playerid);
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
dini_IntSet(file, "Admin", pAdmin[playerid]);
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(file,sizeof(file),"Contas/%s.ini",name);
dini_IntSet(file, "Admin", pAdmin[playerid]);
new Pname[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid, Pname, sizeof(Pname));
switch(reason)
{
case 0: format(string, sizeof(string), "» %s saiu do servidor (Queda de conexгo)", Pname);
case 1: format(string, sizeof(string), "» %s saiu do servidor (Vontade Prуpria)", Pname);
case 2: format(string, sizeof(string), "» %s saiu do servidor (Kickado ou Banido)", Pname);
}
Mute[playerid] = 0;
SendClientMessageToAll(C_Temac, string);
TextDrawHideForPlayer(playerid, Relogio);
new Interior;
Interior = GetPlayerInterior(playerid);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
CPSERVICE_actualcp[playerid] = 0;
new grana;
grana = GetPlayerMoney(playerid);
dini_IntSet(file, "Dinheiro", grana);
dini_IntSet(file,"Continuar",1);
dini_FloatSet(file,"ContinuarX",Float:X);
dini_FloatSet(file,"ContinuarY",Float:Y);
dini_FloatSet(file,"ContinuarZ",Float:Z);
dini_IntSet(file,"ContinuarI",Interior);
dini_IntSet(file, "convitent", 0);
dini_IntSet(file, "Entrevista", 0);
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 || pAdmin[playerid] == 6)
{
new AdminName[MAX_PLAYER_NAME];
GetPlayerName(playerid, AdminName, sizeof(AdminName));
format(string, sizeof(string), "~w~%s: ~r~ADM ~p~OFFLINE", AdminName);
for(new i=0; i<MAX_PLAYERS; i++)
{
GameTextForPlayer(i, string , 5000, 3);
}
}
if(InCall[playerid]==1)
{
if(playerid==sender)
{
InCall[gc]=0,GetCall[gc]=0; InCall[sender]=0,GetCall[sender]=0;
SetPlayerSpecialAction(gc,SPECIAL_ACTION_STOPUSECELLPHONE);
format(str3,128,"%s desligou o celular!",GetName(sender));
SendClientMessage(gc,GRAY,str3);
} else if(playerid == gc)
{
InCall[gc]=0,GetCall[gc]=0; InCall[sender]=0,GetCall[sender]=0;
SetPlayerSpecialAction(sender,SPECIAL_ACTION_STOPUSECELLPHONE);
format(str3,128,"%s estб fora de area por sair da Cidade!",GetName(gc));
SendClientMessage(sender,GRAY,str3);
}
}
minutos[playerid] = 0;
Conversa[playerid] = 0;
NaFaculdade[playerid] = 0;
return 1;
}



Re: [AJUDA] Bug no Gamemode - Jeffrey_Hatrix Jeffrey_ - 15.03.2012

Tenta por
pawn Код:
pAdmin[playerid] = 0;
No inicio do OnPlayerConnect...

Posta toda a public OnPlayerConnect pra mim ver.


Re: [AJUDA] Bug no Gamemode - GuiihCamargo - 15.03.2012

Quote:
Originally Posted by Jeffrey_Hatrix Jeffrey_
Посмотреть сообщение
Tenta por
pawn Код:
pAdmin[playerid] = 0;
No inicio do OnPlayerConnect...

Posta toda a public OnPlayerConnect pra mim ver.
Se vocк nгo percebeu ela estб inteira atй o return 1;


Re: [AJUDA] Bug no Gamemode - Jeffrey_Hatrix Jeffrey_ - 15.03.2012

Quote:
Originally Posted by GuiihCamargo
Посмотреть сообщение
pawn Код:
public OnPlayerConnect(playerid)
{
TogglePlayerSpectating(playerid, true);
ForceClassSelection(playerid);
SetPVarInt(playerid, "Intro", 0);
SetTimerEx("ShowIntro", 1000, 0, "d", playerid);
blockpm[playerid] = 0;
PlayerInfo[playerid][LoginsFalsos] = 0;
dini_Int(file,"LevelAdmin");
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
dini_IntSet(file, "DM", 0);
TextDrawShowForPlayer(playerid, topblack);
TextDrawShowForPlayer(playerid, backblack);
CPSERVICE_actualcp[playerid] = 0;
AFK[playerid]=0;
multar[playerid]= 0;
autoescola[playerid] = 0;
pAdmin[playerid] = 0;
nogame[playerid] = 0;
noevento[playerid] = 0;
PlayerInfo[playerid][Logged] = 0;
vip[playerid] = 0;
guard[playerid] = 0;
GPS_Spawned[playerid] = 0;
DMLiberado[playerid] = 0;
Mute[playerid] = 0;
SpawnPlayer(playerid);
//news
new Pname[MAX_PLAYER_NAME];
new string[256];
new sstring[256];
//============================================================================================================
if(dini_Int("nickban.ini",PlayerName(playerid)) == 1)
{
SendClientMessage(playerid, 0x11B1FFAA, "Vocк foi banido Motivo: Vocк estб banido!");
format(sstring, sizeof(sstring), "%s (%d) Foi banido |Motivo|: Conta estб banida!", aname,playerid);
SendClientMessageToAll(0x11B1FFAA, sstring);
Kick(playerid);
return 1;
}
if(dini_Int("banidos.ini",PlayerName(playerid)) == 1)
{
SendClientMessage(playerid, 0x11B1FFAA, "Vocк foi kickado |Motivo|: Conta estб banida!");
format(sstring, sizeof(sstring), "%s (%d) Foi kickado |Motivo|: Conta estб banida", aname,playerid);
SendClientMessageToAll(0x11B1FFAA, sstring);
Kick(playerid);
return 1;
}
Quote:
Originally Posted by GuiihCamargo
Посмотреть сообщение
Se vocк nгo percebeu ela estб inteira atй o return 1;
Impossivel, porque o return 1; estб valendo para a condiзгo que envolve dini e nгo o fim da CallBack OnPlayerConnect. Se vocк nгo percebeu, ela estб incompleta da forma que postou, poste a callback completa porfavor.


Re: [AJUDA] Bug no Gamemode - GuiihCamargo - 16.03.2012

Tб ae:
pawn Код:
public OnPlayerConnect(playerid)
{
TogglePlayerSpectating(playerid, true);
ForceClassSelection(playerid);
SetPVarInt(playerid, "Intro", 0);
SetTimerEx("ShowIntro", 1000, 0, "d", playerid);
blockpm[playerid] = 0;
PlayerInfo[playerid][LoginsFalsos] = 0;
dini_Int(file,"LevelAdmin");
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
dini_IntSet(file, "DM", 0);
TextDrawShowForPlayer(playerid, topblack);
TextDrawShowForPlayer(playerid, backblack);
CPSERVICE_actualcp[playerid] = 0;
AFK[playerid]=0;
pAdmin[playerid] = 0;
multar[playerid]= 0;
autoescola[playerid] = 0;
nogame[playerid] = 0;
noevento[playerid] = 0;
PlayerInfo[playerid][Logged] = 0;
vip[playerid] = 0;
guard[playerid] = 0;
GPS_Spawned[playerid] = 0;
DMLiberado[playerid] = 0;
Mute[playerid] = 0;
SpawnPlayer(playerid);
//news
new Pname[MAX_PLAYER_NAME];
new string[256];
new sstring[256];
//============================================================================================================
if(dini_Int("nickban.ini",PlayerName(playerid)) == 1)
{
SendClientMessage(playerid, 0x11B1FFAA, "Vocк foi banido Motivo: Vocк estб banido!");
format(sstring, sizeof(sstring), "%s (%d) Foi banido |Motivo|: Conta estб banida!", aname,playerid);
SendClientMessageToAll(0x11B1FFAA, sstring);
Kick(playerid);
return 1;
}
if(dini_Int("banidos.ini",PlayerName(playerid)) == 1)
{
SendClientMessage(playerid, 0x11B1FFAA, "Vocк foi kickado |Motivo|: Conta estб banida!");
format(sstring, sizeof(sstring), "%s (%d) Foi kickado |Motivo|: Conta estб banida", aname,playerid);
SendClientMessageToAll(0x11B1FFAA, sstring);
Kick(playerid);
return 1;
}

//============================================================================================================
GetPlayerName(playerid, Pname, sizeof(Pname));
format(string, sizeof(string), "{00FF00}» Bem-Vindo(a) %s (%d), {00FFFF}Muito Obrigado {FF1493}por nos {00FF7F}Escolher.", Pname,playerid);
SendClientMessageToAll(COLOR_GREEN,string);
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xA86400AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
SendClientMessage(playerid, 0x0081D8AA, "» Seja bem vindo(a) ao servidor!");
SendClientMessage(playerid, 0xE9FFE8AA, "» Para ver os comandos /comandos");
SendClientMessage(playerid, 0x0081D8AA, "» Para ver as regras /regras");
SendClientMessage(playerid, 0xE9FFE8AA, "» Para ver os crйditos /creditos");
SendClientMessage(playerid, 0x0081D8AA, "» Tenha Um Bom Jogo!");
SendClientMessage(playerid, 0xA86400AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");

//icones
SetPlayerMapIcon(playerid, 1, 1942.0170,-1775.6377,13.6406, 55, 0); //Posto 1
SetPlayerMapIcon(playerid, 2, 1006.5010,-936.5832,42.3281, 55, 0); //Posto 2
SetPlayerMapIcon(playerid, 3, -90.9854,-1170.5535,2.3909, 55, 0); //Posto 3
SetPlayerMapIcon(playerid, 4, -1675.9628,411.4728,6.7439, 55, 0); //Posto 4
SetPlayerMapIcon(playerid, 5, -2410.6328,978.8200,45.4609,55, 0); //Posto 5
SetPlayerMapIcon(playerid, 6, 2202.2441,2475.3787,10.8203,55, 0); //Posto 6
SetPlayerMapIcon(playerid, 7, 2112.8740,920.8792,10.8203, 55, 0); //Posto 7
SetPlayerMapIcon(playerid, 8, 1596.6265,2198.6599,10.7254, 55, 0); //Posto 8
SetPlayerMapIcon(playerid, 11, 316.0611,-2007.8269,-0.6277, 9, 0); //area de pesca
SetPlayerMapIcon(playerid, 12, 202.4053,-1875.5461,3.7082, 20, 0); //area de vender peixes
SetPlayerMapIcon(playerid, 13, 369.8319,-1670.0024,32.7266, 19, 0); //Fim da auto-escola
SetPlayerMapIcon(playerid, 14, -44.7421,-1232.7123,6.1583, 16, 0); //area de carga
SetPlayerMapIcon(playerid, 15, -39.1540,-1356.1106,2.4084, 62, 0); //venda de carga
SetPlayerMapIcon(playerid, 16, -60.2428,-1593.1473,2.6107, 50, 0); //venda de carga
//outros
SetPlayerMapIcon(playerid, 22, -319.2404,1049.3226,25.0135, 22, 0); //Hospital
SetPlayerMapIcon(playerid, 23, -176.3886,1035.3271,24.0391, 25, 0); //loja de utilidades
SetPlayerMapIcon(playerid, 23, 613.0466,-494.9978,16.3359, 25, 0); //loja de utilidades
SetPlayerMapIcon(playerid, 25, -311.2843,1303.6816,53.6643, 35, 0); //Prefeitura
//lavajatos
SetPlayerMapIcon(playerid, 28, 1911.3218,-1775.3804,13.3828, 56, 0); //Lava Jato 1
SetPlayerMapIcon(playerid, 29, 2458.9067,-1460.9100,24.0000, 56, 0); //Lava Jato 2
SetPlayerMapIcon(playerid, 30, 1017.6859,-917.2276,42.1797, 56, 0); //Lava jato 3
SetPlayerMapIcon(playerid, 31, -111.0689,1130.1112,19.7422, 56, 0); //Lava jato 4
SetPlayerMapIcon(playerid, 34, 70.4469,1218.4811,18.8124, 55, 0); //Posto FC
//news bairros
SetPlayerMapIcon(playerid, 41, 1555.4916,-1675.6893,16.1953, 30, 0); // icone delegacia ls
SetPlayerMapIcon(playerid, 42, 1481.1309,-1771.2568,18.7958, 23, 0); // icone prefeitura ls
SetPlayerMapIcon(playerid, 43, 1160.4045,-1693.9617,14.0507, 45, 0); // icone shopping ls
SetPlayerMapIcon(playerid, 44, 1172.2400,-1323.0621,15.4024, 22, 0); // icone hospital market
SetPlayerMapIcon(playerid, 45, 2033.7764,-1402.7045,17.2910, 22, 0); // icone hospital de jefferson ls
SetPlayerMapIcon(playerid, 53, 1363.4012,-1649.7007,13.3828, 27, 0); //Oficina
SetPlayerMapIcon(playerid, 54, 615.7462,1689.9661,6.9922, 55, 0); //Posto 9
SetPlayerMapIcon(playerid, 56, 2638.4482,1100.8029,10.9609, 55, 0); //Posto 10
SetPlayerMapIcon(playerid, 57, 1382.3641,459.0780,20.3452, 55, 0); //Posto 11
SetPlayerMapIcon(playerid, 59, 655.5922,-565.3943,16.3359, 55, 0); //Posto 11
SetPlayerMapIcon(playerid, 60, 1081.0103,-1697.9812,13.5469, 2, 0); //Faculdade LS
SetPlayerMapIcon(playerid, 62, 1831.9088,-1842.1598,13.5781, 25, 0); //Loja utilidades
/*SetPlayerMapIcon(playerid, 68, 1285.5574,-1329.1753,13.5494, 52, 0); //caixa eletronico
SetPlayerMapIcon(playerid, 70, 1242.8236,-1704.6500,13.5469, 52, 0); //caixa eletronico
SetPlayerMapIcon(playerid, 71, 1477.3513,-1710.3250,14.3525, 52, 0); //caixa eletronico
SetPlayerMapIcon(playerid, 72, 1722.3969,-1718.2037,13.5305, 52, 0); //caixa eletronico
SetPlayerMapIcon(playerid, 74, 2140.6582,-1168.6848,23.9922, 52, 0); //caixa eletronico
SetPlayerMapIcon(playerid, 75, 537.4147,-1761.8303,14.3161, 52, 0); //caixa eletronico*/

SetPlayerMapIcon(playerid, 76, 1214.2291,-1668.3817,11.7968, 54, 0); //academia
SetPlayerMapIcon(playerid, 77, 1957.5521,-2183.6658,13.5469, 58, 0); //viagens
SetPlayerMapIcon(playerid, 78, 1789.1100,-1384.3800,15.7600, 31, 0); //hotel
SetPlayerMapIcon(playerid, 79, 1582.2100,-1634.9400,13.5600, 12, 0);//map sistema de cameras
//SetPlayerMapIcon(playerid, 80, 1221.2400,-1814.6000,16.5900, 34, 0); //radio
SetPlayerMapIcon(playerid, 78, 1498.49,-1583.44,13.5507, 33, 0); //lan house map icon
SetPlayerMapIcon(playerid, 80, 1219.0600,-1811.7100,16.5900, 62, 0); //instituto de registro
SetPlayerMapIcon(playerid, 81, 1113.7200,-1836.7800,16.6000, 47, 0); //loja dotz
SetPlayerMapIcon(playerid, 82, 1836.9819,-1682.4353,13.3252, 17, 0); //boate
SetPlayerMapIcon(playerid, 83, 1365.6290,-1280.0418,13.5468, 6, 0); //amu nation '='
//SetPlayerMapIcon(playerid, 73, 1368.8425,-1312.6780,13.5469, 52, 0); //caixa eletronico
//SetPlayerMapIcon(playerid, 69, 1411.9891,-1701.3759,13.5395, 52, 0); //caixa eletronico
//SetPlayerMapIcon(playerid, 63, 1804.5730,-1711.6149,13.5415, 17, 0); //Bar ls
//SetPlayerMapIcon(playerid, 32, 1403.4479,-1649.3298,13.3789, 27, 0); //oficina
//SetPlayerMapIcon(playerid, 26, -145.0847,1224.3251,23.6328, 17, 0); //bar


//outros
SetSpawnInfo(playerid, 1, dini_Int(file, "Skin"), dini_Int(file, "CasaX"), dini_Int(file, "CasaY"), dini_Int(file, "CasaZ"),0, 0, 0, 0, 0, 0, 0);
return 1;
}
@EDIT
e tambйm para ajudar o comando /setadmin:
pawn Код:
if(strcmp(cmd,"/setadmin", true)==0)
{
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
    if(pAdmin[playerid] == 6 || IsPlayerAdmin(playerid))
    {
        new plid, leveladm;
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) {
            SendClientMessage(playerid, Vermelho, "(INFO) Digite: /setadmin [id] [Level]");
            return 1;
        }
        plid = strval(tmp);
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, Vermelho, "(INFO) Digite: /setadmin [id] [Level]");
            return 1;
        }
        leveladm = strval(tmp);
        if(leveladm>=7)
        {
            SendClientMessage(playerid, Vermelho, "(INFO) Niveis permitidos: 0 a 6.");
            return 1;
        }
        new pname[MAX_PLAYER_NAME];
        GetPlayerName(plid, pname, MAX_PLAYER_NAME);
        if(IsPlayerConnected(plid)) {
            if(leveladm>=1) {
                pAdmin[plid] = leveladm;
                dini_IntSet(file, "LevelAdmin",leveladm);
//                dini_IntSet(file, "LevelAdm",leveladm);
                format(string, sizeof(string), "(INFO) O Admin Rcon %s (%d) (») Promoveu: %s (%d) para administrador (») Level: %d", aname,playerid,pname,plid,leveladm);
                SendClientMessageToAll(tcadm, string);
                format(string, sizeof(string), "{00FF7F}(INFO) Vocк foi promovido a Admin Level %d por : %s!", leveladm,aname);
                SendClientMessage(plid,-1, string);
                SetPlayerSkin(plid,217);
                if(leveladm>1) {
                //-x
                }
            }
            if(leveladm == 0)
            {
                pAdmin[plid] = 0;
                dini_IntSet(file, "LevelAdmin",0);
//                dini_IntSet(file, "LevelAdm",0);
                format(string, sizeof(string), "(INFO) O Admin Rcon %s (%d) (») Retirou admin do jogador: %s (ID: %d)", aname,playerid,pname,plid);
                SendClientMessageToAll(tcadm, string);
                format(string, sizeof(string), "{00FF7F}(INFO) %s , retirou seu admin!",aname);
                SendClientMessage(plid,-1, string);
                SetPlayerSkin(plid,0);
                if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
            }
            return 1;
        }
        else {
            SendClientMessage(playerid, Vermelho, "(INFO) Jogador nгo conectado.");
            return 1;
        }
    }
}



Re: [AJUDA] Bug no Gamemode - steeldark - 16.03.2012

axo q seu problema estб aqui:

pawn Код:
PlayerInfo[playerid][LoginsFalsos] = 0;
dini_Int(file,"LevelAdmin");// << vc pega um file, ja formatado anteriormente.
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
tipo, esse file q o dini pega ai, pode ser de um outro player q entrou no caso o adm.. sakas?

tipo eu entrei ai o file fico formatado com /contas/gabriel.txt
ai outro entra ele da load em gabriel.txt, antes de formatar novamente com o novo nome.
sugestгo:

pawn Код:
PlayerInfo[playerid][LoginsFalsos] = 0;
// dini_int tava aki
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
//mude pra k
dini_Int(file,"LevelAdmin");