sscanf character
#1

I need this command transfered into sscanf so you can type a password when u register -.- please someone 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;
}
do i just change it to:

Код:
if(sscanf(params, "c")) return SendClientMessage(playerid,RED,"USAGE: /register [pass]");
??

This dont look right to me :S

please help
Reply


Messages In This Thread
sscanf character - by YungGee - 04.02.2011, 08:59
Re: sscanf character - by JamesC - 04.02.2011, 09:24
Re: sscanf character - by YungGee - 04.02.2011, 09:36
Re: sscanf character - by xxmitsu - 04.02.2011, 09:42
Re: sscanf character - by YungGee - 04.02.2011, 09:44

Forum Jump:


Users browsing this thread: 1 Guest(s)