[AJUDA] Mudar musica / logar
#4

Quote:

if (strcmp(cmd, "/logar", false) ==0 )
{
if(IsPlayerConnected(playerid))
{
new tmppass[64];
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "Vocк jб estб logado.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USO: /logar [senha]");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
Encrypt(tmppass);
FixBug[playerid] = 60;
OnPlayerLogin(playerid,tmppass);
}
return 1;
}
if (strcmp(cmd, "/registrar", false) ==0 )
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "|Rpg Rio|: Vocк jб fez o Login");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Contas/%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_YELLOW, "O nickname jб existe, volte com outro.");
fclose(hFile);
return 1;
}
new tmppass[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USO: /registrar [senha] [email]");
return 1;
}
if(strlen(tmp) < 0 || strlen(tmp) > 15)
{
SendClientMessage(playerid, COLOR_GRAD1,"O numero de letras/numeros de sua senha deve estar entre 0 e 15!");
return 1;
}
new senha[15];
strmid(senha,tmp,0,strlen(tmp),255);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USO: /registrar <senha> <email>");
return 1;
}
if(strfind(tmp,"@",true,1)==-1)
{
SendClientMessage(playerid, COLOR_GRAD1,"O email digitado nгo й vбlido.");
return 1;
}
new File:eFile = fopen("Cfg/emails.cfg", io_append);
format(string,256,"%s - %s\r\n", sendername, tmp);
fwrite(eFile,string);
fclose(eFile);
strmid(tmppass, senha, 0, strlen(senha), 255);
Encrypt(tmppass);
OnPlayerRegister(playerid,tmppass);
}
return 1;
}

ta ai espero que vcs achem
Reply


Messages In This Thread
[AJUDA] Mudar musica / logar - by SERRA93 - 07.05.2011, 16:23
Re: [AJUDA] Mudar musica / logar - by [S]trong - 07.05.2011, 16:28
Re: [AJUDA] Mudar musica / logar - by trollv - 07.05.2011, 16:49
Re: [AJUDA] Mudar musica / logar - by SERRA93 - 07.05.2011, 17:14
Re: [AJUDA] Mudar musica / logar - by Shadoww5 - 07.05.2011, 17:33
Re: [AJUDA] Mudar musica / logar - by [S]trong - 07.05.2011, 17:35
Re: [AJUDA] Mudar musica / logar - by [AF]Junior - 07.05.2011, 17:41
Re: [AJUDA] Mudar musica / logar - by DartakousLien - 07.05.2011, 17:45
Re: [AJUDA] Mudar musica / logar - by SERRA93 - 07.05.2011, 21:39
Re: [AJUDA] Mudar musica / logar - by [AF]Junior - 07.05.2011, 22:36

Forum Jump:


Users browsing this thread: 2 Guest(s)