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;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_ADMAIN:
{
if(response)
{
switch(listitem)
{
case 0: // do stuff here - List Advertisements
case 1: // Search Advertisements
case 2: // Place Advertisement
case 3: // Priority Advertisement
// etc..
}
}
}
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(dialogid) { case DIALOG_ADMAIN: { if(response) { switch(listitem) { case 0: // do stuff here - List Advertisements case 1: // Search Advertisements case 2: // Place Advertisement case 3: // Priority Advertisement // etc.. } } } } return 1; } |
{ case 0: // do stuff here - List Advertisements case 1: // Search Advertisements case 2: // Place Advertisement case 3: // Priority Advertisement |
Are you seriously asking or..? |
Go and study programming in general before trying to jump into a project which you can't handle, with all honesty. |