18.02.2012, 02:50
Код:
if (strcmp(cmd, "/login", true) ==0 ) { if (gPlayerLogged[playerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in."); return 1; } if (gPlayerAccount[playerid] == 0) { SendClientMessage(playerid, COLOR_LIGHTRED, "[SERVER]: You do not have an account, type /register <password>"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /login [password]"); return 1; } format(string, sizeof(string), "users/%s.ini", PlayerName(playerid)); new File: hFile = fopen(string, io_read); if (hFile) { fclose(hFile); OnPlayerLogin(playerid,tmp); return 1; } return 1; }
Can you send me the code for it if you know how to, please :P