why dosnt this work?
#1

this dosnt register it dosnt create a dini
i dont get any errors or warnings
pawn Код:
dcmd_register(playerid,params[])
{
    #pragma unused params
    new file[128],n[MAX_PLAYER_NAME];
    GetPlayerName(playerid,n,MAX_PLAYER_NAME);
    format(file,sizeof(file),"MyAdmin/Users/%s.ini",n);
    if(dini_Exists(file)) return SendClientMessage(playerid,YELLOW,"You are already registered!");
    if(PInfo[playerid][Regged] == 1) return SendClientMessage(playerid,LIGHTBLUE,"You are already registered!");
    if(PInfo[playerid][Logged] == 1) return SendClientMessage(playerid,red,"You are already registered, and logged in!");
    ShowPlayerDialog(playerid,10,DIALOG_STYLE_INPUT,"Register","Welcome \n We see you want to register\nPlease enter a password below","Register","Cancel");
    return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new file[128],n[MAX_PLAYER_NAME];
    GetPlayerName(playerid,n,MAX_PLAYER_NAME);
    format(file,sizeof(file),"MyAdmin/Users/%s.ini",n);
    if(dialogid == 9)
    {
        dini_Create(file);
        dini_Set(file,"Password",inputtext);
        dini_IntSet(file,"Regged",1);
        dini_IntSet(file,"Logged",0);
        dini_IntSet(file,"Level",0);
        dini_IntSet(file,"Muted",0);
        dini_IntSet(file,"Jailed",0);
        dini_IntSet(file,"Frozen",0);
        dini_IntSet(file,"Skin",0);
        dini_IntSet(file,"Dueling",0);
        dini_IntSet(file,"Score",GetPlayerScore(playerid));
        SendClientMessage(playerid,LIGHTBLUE,"Congratulations, you have just registered, please /login");
        PInfo[playerid][Regged] = 1;
        }
    return 1;
}
Reply


Messages In This Thread
why dosnt this work? - by dark_clown - 07.11.2010, 18:08
Re: why dosnt this work? - by willsuckformoney - 07.11.2010, 18:12
Re: why dosnt this work? - by dark_clown - 07.11.2010, 18:13
Re: why dosnt this work? - by DeathOnaStick - 07.11.2010, 18:15
Re: why dosnt this work? - by dark_clown - 07.11.2010, 18:15
Re: why dosnt this work? - by DeathOnaStick - 07.11.2010, 18:17
Re: why dosnt this work? - by dark_clown - 07.11.2010, 18:17
Re: why dosnt this work? - by DeathOnaStick - 07.11.2010, 18:20
Re: why dosnt this work? - by dark_clown - 07.11.2010, 18:21
Re: why dosnt this work? - by The_Moddler - 07.11.2010, 18:27
Re: why dosnt this work? - by dark_clown - 07.11.2010, 18:30
Re: why dosnt this work? - by dark_clown - 07.11.2010, 20:11
Re: why dosnt this work? - by WillyP - 07.11.2010, 20:14
Re: why dosnt this work? - by The_Moddler - 07.11.2010, 23:22

Forum Jump:


Users browsing this thread: 1 Guest(s)