Little bit commands lost
#1

Hello guys i tried to make new advertisement CMD for my Script But there're some cmds lost i can't do any thing else any one can help me and continue it, because when i wrote /ads Dialog appear but when i press on any choice nothing appear so please Am really need some help, and it will be helpful for all Roleplay server

PHP код:
CMD:ad(playeridparams[])
{
    
SendClientMessageEx(playeridCOLOR_WHITE"The /ad command has been removed - use /ads or /advertisements.");
    return 
1;
}
CMD:ads(playeridparams[]) {
    return 
cmd_advertisements(playeridparams);
}
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;

Thanks
Reply
#2

Do you have anything in:

OnDialogResponse ?
Reply
#3

Quote:

Do you have anything in:

OnDialogResponse ?

No i don't think so :/
Reply
#4

You can make it?
Reply
#5

Have a read through this, basically when you click on one of the options, OnDialogResponse is called..

Lookey: https://sampwiki.blast.hk/wiki/OnDialogResponse
Reply
#6

Quote:

Have a read through this, basically when you click on one of the options, OnDialogResponse is called..

Looke

I already read them, but i don't understand how to make them, Can you make one for me it's a little help i know that you're helpful member, so please help me i don't know script as well as you can you're prof.
You know i currently closed my server because of this reason..
Reply
#7

You won't learn if you don't try and make it yourself.

Try this..

Код:
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;
}
Reply
#8

Quote:

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;
}

Am so sorry about my spamming i know am abuse but am really dont know what i should right on this stuff i swear god i want you to learn me , i dont know how to make dialog when player press on it another one appear with the last adv or another stuff i swear that i want to learn but you can make this one for me please :/
and if you make it i will understand how to make another one for another thing like new /stats system and new /help menu .
Reply
#9

Quote:

if(listitem == 3)
{
//Place Priority Advertisement
SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: (/ads)vertise [advert text]");
}
}
return 1;
}
return 0;
}

That's correct?
Reply
#10

Bump any one can help me?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)