SA-MP Forums Archive
Little bit commands lost - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Little bit commands lost (/showthread.php?tid=476714)



Little bit commands lost - aDo7 - 19.11.2013

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


Re: Little bit commands lost - StuartD - 19.11.2013

Do you have anything in:

OnDialogResponse ?


Re: Little bit commands lost - aDo7 - 19.11.2013

Quote:

Do you have anything in:

OnDialogResponse ?

No i don't think so :/


Re: Little bit commands lost - aDo7 - 19.11.2013

You can make it?



Re: Little bit commands lost - StuartD - 19.11.2013

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

Lookey: https://sampwiki.blast.hk/wiki/OnDialogResponse


Re: Little bit commands lost - aDo7 - 19.11.2013

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..


Re: Little bit commands lost - StuartD - 19.11.2013

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



Re: Little bit commands lost - aDo7 - 19.11.2013

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 .



Re: Little bit commands lost - aDo7 - 19.11.2013

Quote:

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

That's correct?


Re: Little bit commands lost - aDo7 - 19.11.2013

Bump any one can help me?