Dialog not displaying
#2

Hello.
I don't know why this isn't working with this way (tested on my gamemode):
PHP код:
new HasVoted[MAX_PLAYERS];
YCMD:event(playerid,params[], help)
{
    new list[
256];
    if(
HasVoted[playerid] == 0)
    {
        
format(list, sizeof(list), "{8585C2}Terrorists vs Counter Terrorists [TDM]\t %d Votes\n{8585C2}Protect the car [TDM]\n{8585C2}I the Conquer[DM]\n",PlayerInfo[playerid][pAdminlvl]);
        
ShowPlayerDialog(playerid24525DIALOG_STYLE_LIST"{0080FF}Vote for event type",list, "Next""Exit");
    }
    else
    {
        
format(list, sizeof(list), "{8585C2}Terrorists vs Counter Terrorists [TDM]\t %d Votes\n{8585C2}Protect the car [TDM]\n{8585C2}I the Conquer[DM]\n",PlayerInfo[playerid][pAdminlvl]);
        
ShowPlayerDialog(playerid24254DIALOG_STYLE_MSGBOX"{0080FF}Event Voting Results",list, "Ok""Exit");
    }
    return 
1;

but this way is working .. :
PHP код:
new HasVoted[MAX_PLAYERS];
CMD:event(playerid,params[])
{
    new list[
256];
    if(
HasVoted[playerid] == 0)
    {
        
format(list, sizeof(list), "{8585C2}Terrorists vs Counter Terrorists [TDM]\t %d Votes\n{8585C2}Protect the car [TDM]\n{8585C2}I the Conquer[DM]\n",EventVoteType[0]);
        
ShowPlayerDialog(playeridDIALOG_EVENTRESULTDIALOG_STYLE_LIST"{0080FF}Vote for event type",list, "Next""Exit");
    }
    else
    {
        
format(list, sizeof(list), "{8585C2}Terrorists vs Counter Terrorists [TDM]\t %d Votes\n{8585C2}Protect the car [TDM]\n{8585C2}I the Conquer[DM]\n",EventVoteType[0]);
        
ShowPlayerDialog(playeridDIALOG_EVENTRESULTDIALOG_STYLE_MSGBOX"{0080FF}Event Voting Results",list, "Ok""Exit");
    }
    return 
1;

Reply


Messages In This Thread
Dialog not displaying - by Lajko1 - 10.05.2016, 21:17
Re: Dialog not displaying - by Dayrion - 10.05.2016, 22:35

Forum Jump:


Users browsing this thread: 1 Guest(s)