23.04.2015, 14:42
The problem with the command is that when I go in game and do /login it says USAGE: (/l)ogin and keeps doing it and won't let me login, why?
The command:
The command:
Код:
CMD:login(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new tmppass[64];
new tmp[64];
new cmdtext[64];
new idx;
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "SERVER: You are already logged in.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "USAGE: (/l)ogin [password]");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
//Encrypt(tmppass);
OnPlayerLogin(playerid, tmppass);
}
return 1;
}

