hitno pomoc molim vas

Započeo Ante_Dracar aka Lopa, Avgust 18, 2010, 10:08:14 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

evo imam cromafia gm i doveo sam ga do savrsenstva i imam 1 problem dakle sad mi je prijatelj usao na serveri i rekao mi da mi ne valja login dakle prvo mora upisat krivi passs pa zatim pravilni   pliz pomoc   nezzz uopce jeli to too...
//-------------------------------[Login]--------------------------------------------------------------------------
if (strcmp(cmd, "/login", true) ==0 )
{
    if(IsPlayerConnected(playerid))
    {
        new tmppass[64];
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "SERVER: Vec ste logirani.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "KORISTITE: /login <lozinka>");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
}
return 1;
}
if (strcmp(cmd, "/register", true) ==0 )
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "SERVER: Vec ste logirani.");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_YELLOW, "To ime vec postoji, molimo uzmite drugo ime.");
fclose(hFile);
return 1;
}
        new tmppass[64];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "KORISTITE: /register <lozinka>");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
Encrypt(tmppass);
OnPlayerRegister(playerid,tmppass);
}
return 1;
}