Dialog Help.
#1

just Curious How do i make that a 3 selection option for a location.. to spawnplayer

Los Santos = Button1 Las Ventures = Button2 San Fierro = Button3

ShowPlayerDialog(playerid, 1, 0, "Location Selection", "Where you like to go", "Los Santos", "Las Ventures","San Fierro");
Reply
#2

You can only have 2 buttons. But try this method:
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Location Selection", "Los Santos\nLas Venturas\nSan Fierro", "Select", "Cancel");

public OnDialogResponse(...)
{
    if(dialogid == 1 && response) // Checking if the dialogid == 1 and if he responded positive
    {
        switch(listitem) // listitem is the options you have on dialog_style_list
        {
            case 0: { SetPlayerPos(playerid, /* Los Santos Coordinates */); } // He selected the first option
            case 1: { SetPlayerPos(playerid, /* Las Venturas Coordinates */); } // 2nd
            case 2: { SetPlayerPos(playerid, /* San Fierro Coordinates */); } // 3rd
        }
    }
    return 1;
}
Reply
#3

Ok ill try that thanks i had my first command similar to that but as Listitem 1 2 3 hehe hope it works thanks for the help
Reply
#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
#5

Hello Anyone Please Help Is needed Gotta Feed my Harddrive with more Codes ////\\\\\ Bump! /////\\\\
Reply
#6

Echo Anyone Out There...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)