06.06.2014, 22:11
Antes, faзa um backup !
pawn Код:
if(dialogid == 1)
{
if(response == 0)
{
SendClientMessage(playerid, TEAM_VAGOS_COLOR, "Ok, Caso queira fazer login posteriormente use /logar [senha]!");
return true;
}
if(response >= 1)
{
if(strlen(inputtext) == 0)
{
SetPlayerCameraPos(playerid, -2864.7883, 264.9134, 23.1133);
SetPlayerCameraLookAt(playerid, -2864.4394, 254.9195, 20.8638);
SetPlayerPos(playerid, -2864.7883, 264.9134, 23.1133);
SetPlayerInterior(playerid, 0);
TextDrawShowForPlayer(playerid,cima2);
TextDrawShowForPlayer(playerid,cima);
TextDrawShowForPlayer(playerid,baixo);
SendClientMessage(playerid, COLOR_AZULBB, "{00b7ff}[Bem Vindo]:{FFFFFF} Sua conta jб estб em nosso banco de dados.");
SendClientMessage(playerid, COLOR_AZULBB, "{00b7ff}[Informaзгo]:{FFFFFF} Digite sua Senha para logar no servidor.");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "Fazendo Seu Login:", "{FFFFFF}Seja Bem Vindo(a)\n{FFFFFF}Conta: {b7ff00}Registrada\n{00b7ff}\nPor Favor Digite Sua Senha Para Logar !", "Logar", "Esperar");
return true;
}
format(gstring,sizeof(gstring),"/logar %s",inputtext);
OnPlayerCommandText(playerid,gstring);
return true;
}
return true;
}
pawn Код:
if (strcmp(cmd, "/logar", true) ==0 )
{
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
{
new tmppass[64];
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк jб estб logado.");
return true;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USE: /logar [Senha]");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "{00b7ff}Testing", "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=\n\n\nBem Vindo ao {00b7ff}Testing\n\n{FFFFFF}Conta: {00FF00}Registrada\n{FFFFFF}Digite Sua Senha para Logar !", "Logar", "Esperar");
return true;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
//Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
}
return true;
}
if (strcmp(cmd, "/registrar", true) ==0 )
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк jб estб logado.");
return true;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, 64, "Contas/%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if (hFile)