CMD:ad(playerid, params[])
{
SendClientMessageEx(playerid, COLOR_WHITE, "The /ad command has been removed - use /ads or /advertisements.");
return 1;
}
CMD:ads(playerid, params[]) {
return cmd_advertisements(playerid, params);
}
CMD:advertisements(playerid, params[]) {
if(gPlayerLogged{playerid} == 0) {
SendClientMessageEx(playerid, COLOR_GREY, "You're not logged in.");
}
else if(GetPVarType(playerid, "Injured")) {
SendClientMessageEx(playerid, COLOR_GREY, "You can't use advertisements while injured.");
}
else if(PlayerCuffed[playerid] != 0) {
SendClientMessageEx(playerid, COLOR_GREY, "You can't use advertisements right now.");
}
else if(PlayerInfo[playerid][pJailTime] > 0) {
SendClientMessageEx(playerid, COLOR_GREY, "You can't use advertisements while in jail.");
}
else ShowPlayerDialog(playerid, DIALOG_ADMAIN, DIALOG_STYLE_LIST, "Advertisements", "List Advertisements\nSearch Advertisements\nPlace Advertisement\nPlace Priority Advertisement", "Select", "Cancel");
return 1;
}
Do you have anything in: OnDialogResponse ? |
Have a read through this, basically when you click on one of the options, OnDialogResponse is called.. Looke |
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG_ADMAIN) { if(!response) {ShowPlayerDialog(playerid, DIALOG_ADMAIN, DIALOG_STYLE_LIST, "Advertisements", "List Advertisements\nSearch Advertisements\nPlace Advertisement\nPlace Priority Advertisement", "Select", "Cancel"); } if(response) { if(listitem == 0) { //List Stuff Here } if(listitem == 1) { //Search Stuff Here } if(listitem == 2) { //Place stuff here } if(listitem == 3) { //Priority stuff Here } } return 1; } return 0; }
if(listitem == 0) { //List Stuff Here } if(listitem == 1) { //Search Stuff Here } if(listitem == 2) { //Place stuff here } if(listitem == 3) { //Priority stuff Here } } return 1; } |
if(listitem == 3) { //Place Priority Advertisement SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: (/ads)vertise [advert text]"); } } return 1; } return 0; } |