COMMAND:login(playerid,params[]) { if(isnull(params)) return NoSuccess(playerid,"Usage: /login <password>"); format(str,256,"%s.txt",pname[playerid]); if(!dini_Exists(str)) return NoSuccess(playerid,"[Notification] You did not Register yet. Please use /register <password> to Register a new account!"); if(Login[playerid] == 1) return NoSuccess(playerid,"[Notification] You have already been logged in!"); if(strcmp(params,ReturnPasswort(pname[playerid]),false)) return NoSuccess(playerid,"[Notification] You have entered an invalid password!"); LoadPlayer(playerid); Login[playerid] = 1; SendClientMessage(playerid,neongruen,"[Notification] You have successfully been logged in!"); return 1; }
public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if(success) { printf("[COMMAND] Command %s from %s was successfully loaded.",cmdtext,pname[playerid]); } else { printf("[CMD] Command %s from %s was »not« successfully loaded.",cmdtext,pname); format(str,144,"[Notification] That Command does not exists. Please re-try, or use /help.",cmdtext); NoSuccess(playerid,str); } return 1; }
Hello everyone. I have made the following command:
Код:
COMMAND:login(playerid,params[]) { if(isnull(params)) return NoSuccess(playerid,"Usage: /login <password>"); format(str,256,"%s.txt",pname[playerid]); if(!dini_Exists(str)) return NoSuccess(playerid,"[Notification] You did not Register yet. Please use /register <password> to Register a new account!"); if(Login[playerid] == 1) return NoSuccess(playerid,"[Notification] You have already been logged in!"); if(strcmp(params,ReturnPasswort(pname[playerid]),false)) return NoSuccess(playerid,"[Notification] You have entered an invalid password!"); LoadPlayer(playerid); Login[playerid] = 1; SendClientMessage(playerid,neongruen,"[Notification] You have successfully been logged in!"); return 1; } Or is it because of something else? Please help me. Thanks. Greetings, CrazyManiac. |