04.02.2011, 08:59
I need this command transfered into sscanf so you can type a password when u register -.- please someone help
do i just change it to:
??
This dont look right to me :S
please help
Код:
CMD:register(playerid, params[]) { new file[128],name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,MAX_PLAYER_NAME); format(file,sizeof(file),"Admin/Accounts/%s.txt",name); if(dini_Exists(file)) return SendClientMessage(playerid,RED,">> Your Already Registered!"); if(pInfo[playerid][Registered] == 1) return SendClientMessage(playerid,RED,">> Your Already Registered!"); if(pInfo[playerid][LoggedIn] == 1) return SendClientMessage(playerid,RED,">> Your Already Registered And Logged In!"); if(strlen(params) == 0) return SendClientMessage(playerid,RED,"USAGE: /register [password]");//This line { if(!dini_Exists(file)) { dini_Create(file); dini_Set(file,"Password",params); dini_IntSet(file,"Registered",1); dini_IntSet(file,"LoggedIn",0); dini_IntSet(file,"Level",0); dini_IntSet(file,"Score",0); dini_IntSet(file,"Money",0); SendClientMessage(playerid,YELLOW,">> You Have Successfully Registered! Please /login"); pInfo[playerid][Registered] = 1; return true; } } return true; }
Код:
if(sscanf(params, "c")) return SendClientMessage(playerid,RED,"USAGE: /register [pass]");
This dont look right to me :S
please help