10.01.2012, 14:52
Ola queria uma ajuda aqui, quando estou no meu pc eu entro normal no servidor ai quando eu ponho no hosting bugs o login manda registrar sabendo que a conta jб esta registrada depois vocк loga ai nгo da o spawn se vocк apertar as cetas ele volta ao registrar alguйm pode me ajudar com isso ?
cуdigo:
PS: testei no hosting windows e linux
cуdigo:
pawn Код:
//-------------------------------[Login]--------------------------------------------------------------------------
if (strcmp(cmd, "/logar", true) ==0 )
{
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
{
new tmppass[64];
if(gPlayerLogged[playerid] == 1)
{
MSGPLAYER(playerid, COLOR_GREY, " Vocк jб estб logado.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
new loginstring[256];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
MSGPLAYER(playerid, COLOR_GRAD1, "USE: /logar [Senha]");
MSGPLAYER(playerid, COLOR_GRAD2, "(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-)");
format(loginstring,sizeof(loginstring),"{BFC0C2}((=-=-=-=-=-=-=-=-=-=({87CEEB}B.S.G{BFC0C2})=-=-=-=-=-=-=-=-=-=-=))\n\n{f2fafa}Seja Bem vindo: {7CFC00}%s\n\n{f2fafa}Digite sua Senha para Logar !!!\n\n{BFC0C2}((=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=))",loginname);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT,"Stronda Games RPG ®",loginstring,"Logar","Cancelar");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
}
return 1;
}
if (strcmp(cmd, "/registrar", true) ==0 )
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 1)
{
MSGPLAYER(playerid, COLOR_GREY, " Vocк jб estб logado.");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 64, "contas/%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if (hFile)
{
new loginstring[256];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
MSGPLAYER(playerid, COLOR_YELLOW, "Este Nick jб existe, use outro.");
fclose(hFile);
MSGPLAYER(playerid, COLOR_GRAD2, "(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-)");
format(loginstring,sizeof(loginstring),"{BFC0C2}((=-=-=-=-=-=-=-=-=-=({87CEEB}B.S.G{BFC0C2})=-=-=-=-=-=-=-=-=-=-=))\n\n{f2fafa}Seja Bem vindo: {7CFC00}%s\n\n{f2fafa}Digite sua Senha para Resgistrar !!!\n\n{BFC0C2}((=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=))",loginname);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT,"Stronda Games RPG ®",loginstring,"Registrar","Cancelar");
return 1;
}
new tmppass[64];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
new loginstring[256];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
MSGPLAYER(playerid, COLOR_GRAD1, "USE: /registrar [Senha]");
MSGPLAYER(playerid, COLOR_YELLOW, "-==> Use Nome_Sobrenome ( Ex: KoriinGa_EviL ) <==-");
MSGPLAYER(playerid, COLOR_GRAD2, "(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-)");
format(loginstring,sizeof(loginstring),"{BFC0C2}((=-=-=-=-=-=-=-=-=-=({87CEEB}B.S.G{BFC0C2})=-=-=-=-=-=-=-=-=-=-=))\n\n\n{f2fafa}Seja Bem vindo: {7CFC00}%s\n\n{f2fafa}Digite sua Senha para Resgistrar !!!\n\n{BFC0C2}((=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=))",loginname);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT,"Stronda Games RPG ®",loginstring,"Registrar","Cancelar");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
Encrypt(tmppass);
OnPlayerRegister(playerid,tmppass);
}
return 1;
}