Dialog Help.
#4

Could Someone help me here please i want it to write Text and not Numeric numbers i had it working earlier then the Mode released Oh crap i was a post to look for numbers then it messed up and only registers numbers for example i wanted it to Write John instead tould me my error messages about Can not contain numbers text only so i put 23John it wrote 23 in my user ini file

I changed the strval to strlen On dialog and changed the forward function to dini_intSet To dini_Set

It fixed the above error but Now there a new problem Its Counting My text So my Firstname = Was apost to be John But was Firstname=4

pawn Код:
if(dialogid == 5)
    {
        new name[MAX_PLAYER_NAME], file[256], string[128];
        GetPlayerName(playerid, name, sizeof(name));
        format(file, sizeof(file), SERVER_USER_FILE, name);
        SetPlayerInterior(playerid,1);
        SetPlayerPos(playerid, 1.3173,29.7461,1199.6012);
        SpawnPlayer(playerid);
        if(!strlen(inputtext))
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "Your  Firstname Cannot Contain Numbers or be Blank Text Only");
            ShowPlayerDialog(playerid,5,DIALOG_STYLE_INPUT,"Firstname","What is your firstname?","Submit","Cancel");
            return 1;
        }
        if(!response){ Kick(playerid); PlayerInfo[playerid][pReg] = 1; return 1; }
        if(strlen(inputtext) == 0)
        {
            SendClientMessage(playerid, ORANGE, "Invalid Name Max letters 20.");
            ShowPlayerDialog(playerid,5,DIALOG_STYLE_INPUT,"Firstname","What is your firstname?","Submit","Cancel");
            return 1;
        }
        FirstNameSection(playerid, strlen(inputtext));
        PlayerPlaySound(playerid, 1132, 0.0, 0.0, 0.0);
        TogglePlayerControllable(playerid, 0);
        format(string, 128, "Okay So You're First Names is %s ", inputtext);
        SendClientMessage(playerid, DARKBLUE, string);
        ShowPlayerDialog(playerid,6,DIALOG_STYLE_INPUT,"Lastname","What is your lastname?","Submit","Cancel");
    }
forward FirstNameSection(playerid, Firstname);
My Forward Function
pawn Код:
public FirstNameSection(playerid, Firstname)
{
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), SERVER_USER_FILE, name);
    PlayerInfo[playerid][pFirstname] = Firstname;
    dini_Set(file, "Firstname",PlayerInfo[playerid][pFirstname]);
    return 1;
}
Reply


Messages In This Thread
Dialog Help. - by Buzzbomb - 12.11.2010, 22:03
Re: Dialog Help. - by [L3th4l] - 12.11.2010, 22:07
Re: Dialog Help. - by Buzzbomb - 12.11.2010, 22:35
Re: Dialog Help. - by Buzzbomb - 12.11.2010, 23:26
Re: Dialog Help. - by Buzzbomb - 13.11.2010, 00:03
Re: Dialog Help. - by Buzzbomb - 13.11.2010, 00:39

Forum Jump:


Users browsing this thread: 1 Guest(s)