dialog wont show up.. Help please -
0utLaW_ - 06.09.2012
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);
}
Re: dialog wont show up.. Help please -
ddnbb - 06.09.2012
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.)
Re: dialog wont show up.. Help please -
mobiliz - 06.09.2012
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");
}
Re: dialog wont show up.. Help please -
ddnbb - 06.09.2012
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... ^
Re: dialog wont show up.. Help please -
CROSS_Hunter - 06.09.2012
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..