dialog wont show up.. Help please
#1

Well basically, the dialog is supposed to show up when a player spawns a civilian and choose the role "Theif" but idk wahts wrong, coz it does not shows up..
if i use SendClientMessage it does work, but i want it in dialog please tell me what wrong am i doing ??
Please help..





pawn Код:
new rname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, rname, sizeof(rname));
    if(GetPlayerMenu(playerid) == Roles)
    {
        switch(row)
        {
            case 0: // Thief
            {
                SetPlayerTeam(playerid, THIEF);
                ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX ,"Theif","You made your choice\nYou are now a Thief\nAs a Thief, you need to rob things\nTo see your role's commands, /rcommands","Ok","Cancel");
                ChoosingRole[playerid] = 0;
                TogglePlayerControllable(playerid, true);
                GivePlayerWeapon(playerid, 4, 1);
                GivePlayerWeapon(playerid, 24, 100);
                GivePlayerWeapon(playerid, 29, 250);
            }
Reply
#2

You need to use different DIALOG ID, as seems like you having two dialogs using the same ID. (In youre case, that dialog ID is 0.)
Reply
#3

Do for example OnPlayerSpawn

Do this but change to your team system.

pawn Код:
if(gTeam[playerid] == TEAM_THIEF)
    {
    ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX ,"Theif","You made your choice\nYou are now a Thief\nAs a Thief, you need to rob things\nTo see your role's commands, /rcommands","Ok","Cancel");
    }
Reply
#4

Quote:
Originally Posted by mobiliz
Посмотреть сообщение
Do for example OnPlayerSpawn

Do this but change to your team system.

pawn Код:
if(gTeam[playerid] == TEAM_THIEF)
    {
    ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX ,"Theif","You made your choice\nYou are now a Thief\nAs a Thief, you need to rob things\nTo see your role's commands, /rcommands","Ok","Cancel");
    }
And please dont listen to this guy... ^
Reply
#5

To Organize your Dialog IDS you can use:

pawn Код:
#define DIALOG_THIEF 0 // <----- 0 is the dialog id
This way is better to prevent Collision between 2 Dialogs with the same ID

and then use
pawn Код:
ShowPlayerDialog(playerid,DIALOG_THIEF,DIALOG_STYLE_MSGBOX ,"Theif","You made your choice\nYou are now a Thief\nAs a Thief, you need to rob things\nTo see your role's commands, /rcommands","Ok","Cancel");
Simple..
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)