OnDialogResponse
#2

Quote:
Originally Posted by aDo7
Посмотреть сообщение
Hello guy,
I have some problem with OnDialogResponse i cant make it and i asked a lot of people to help me with it but no one want to help so i hope today i find any one can help me to make OnDialogResponse for my cmd:ads

Ads Commands:

PHP код:
CMD:ads(playeridparams[]) 
{
    return 
cmd_advertisements(playeridparams);
}
[
code]CMD:advertisements(playeridparams[]) {
    if(
gPlayerLogged{playerid} == 0) {
        
SendClientMessageEx(playeridCOLOR_GREY"You're not logged in.");
    }
    else if(
GetPVarType(playerid"Injured")) {
        
SendClientMessageEx(playeridCOLOR_GREY"You can't use advertisements while injured.");
    }
    else if(
PlayerCuffed[playerid] != 0) {
        
SendClientMessageEx(playeridCOLOR_GREY"You can't use advertisements right now.");
    }
    else if(
PlayerInfo[playerid][pJailTime] > 0) {
        
SendClientMessageEx(playeridCOLOR_GREY"You can't use advertisements while in jail.");
    }
    else 
ShowPlayerDialog(playeridDIALOG_ADMAINDIALOG_STYLE_LIST"Advertisements""List Advertisements\nSearch Advertisements\nPlace Advertisement\nPlace Priority Advertisement""Select""Cancel");
 return 
1;
}[/
code
Код:
But i lost OnDialogResponse and i cant make one for it :/ please help, because i closed my server for this reason.
Код:

CMD:ads(playerid, params[]) { 
    return cmd_advertisements(playerid, params); 
} 

CMD:advertisements(playerid, params[]) 
{ 
    if(gPlayerLogged{playerid} == 0) 
    { 
        ShowPlayerDialog(playerid, 1337, DIALOG_STYLE_MSGBOX, "Notice", "You are not logged in", "Close", "");
    } 
    else if(GetPVarType(playerid, "Injured")) 
    { 
        ShowPlayerDialog(playerid, 1338, DIALOG_STYLE_MSGBOX, "Notice", "You can't use advertisements while injured", "Close", "");
    } 
    else if(PlayerCuffed[playerid] != 0) 
    { 
        ShowPlayerDialog(playerid, 1339, DIALOG_STYLE_MSGBOX, "Notice", "You can't use advertisement right now", "Close", "");
    } 
    else if(PlayerInfo[playerid][pJailTime] > 0) 
    { 
        ShowPlayerDialog(playerid, 1340, DIALOG_STYLE_MSGBOX, "Notice", "You can't use advertisements while in jailed, "Close", "");
    } 
    else ShowPlayerDialog(playerid, DIALOG_ADMAIN, DIALOG_STYLE_LIST, "Advertisements", "List Advertisements\nSearch Advertisements\nPlace Advertisement\nPlace Priority Advertisement", "Select", "Cancel"); 
    return 1; 
}
Edit im not yet finish just wait

Код:
 	if(dialogid == DIALOG_ADMAIN)
	{
		if(response)
		{
			switch(listitem)
			{
				case 0:
				{
					ShowPlayerDialog(playerid, 1441, DIALOG_STYLE_MSGBOX, "List Advertisements", "Change this", "Close", "");
				}
				case 1:
				{
					ShowPlayerDialog(playerid, 1442, DIALOG_STYLE_MSGBOX, "Search Advertisements", "Change this", "Close", "");
				}
				case 2:
				{
					ShowPlayerDialog(playerid, 1443, DIALOG_STYLE_MSGBOX, "Place Advertisement", "Change this", "Close", "");
				}
				case 3:
				{
					ShowPlayerDialog(playerid, 1444, DIALOG_STYLE_MSGBOX, "Place Priority Advertisement", "Change this", "Close", "");
				}
			}
		}
	}
Reply


Messages In This Thread
OnDialogResponse - by aDo7 - 20.11.2013, 11:03
Re: OnDialogResponse - by kbalor - 20.11.2013, 11:10
Re: OnDialogResponse - by aDo7 - 20.11.2013, 11:15
Re: OnDialogResponse - by newbie scripter - 20.11.2013, 11:21
Re: OnDialogResponse - by aDo7 - 20.11.2013, 11:26
Re: OnDialogResponse - by aDo7 - 20.11.2013, 11:39
Re: OnDialogResponse - by aDo7 - 20.11.2013, 11:48
Re: OnDialogResponse - by newbie scripter - 20.11.2013, 11:57
Re: OnDialogResponse - by aDo7 - 20.11.2013, 12:01
Re: OnDialogResponse - by newbie scripter - 20.11.2013, 12:25

Forum Jump:


Users browsing this thread: 7 Guest(s)