What am doing wrong with this command?
#1

Can someone tell me what I am doing wrong with this /help command. It goes to the Dialog List, but when I select General Commands, the Msgbox doesnt pop up.

CMD:
Код:
CMD:help(playerid, params[])
{
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	{
		ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_LIST,"Help","General Commands\nFamily Commands\nFaction Commands","Select","Exit");
	}
	return 1;
}
Dialog:
Код:
	if(dialogid == 5000)
	{
	    if(response)
		{
	    	new string[2050];
	    	switch(listitem)
       		{
	           	case 0:
            	        {
				ShowPlayerDialog(playerid, 5001, DIALOG_STYLE_MSGBOX,"General Commands",string,"Ok","Exit");
			}
			case 1:
			{
				ShowPlayerDialog(playerid, 5002, DIALOG_STYLE_MSGBOX,"Family Commands"," Blah Blah Blah ", "Ok", "Exit");
			}
		}
	}
	if(dialogid == 5001)
	{
   		new string[2050];
	        string ="/help /gatehelp /changegatepass /fishhelp /sellfish /fishes /fish /stuck /train /tow /gascan /fuel /cookieshelp /usecookies /refhelp /refer /accent /license /showlicense /getlic /getweaplic";
		strcat (string,"/joinevent /quitevent /helpers /chat /speedlimit /locatecar /buycar /sellcartomarket /slot /park /engine /points /families /updates /id /changepass /search /drop /pay");
		strcat (string,"/paycheck /wire /withdraw /deposit /serverstats /reportbug /jobhelp /bid /fight /househelp /hwithdraw /hdeposit /vehhelp /bizhelp /skill /join /quitjob /houseupgrade /bizupgrade");
		strcat (string,"/vault /buyproducts /lights /trunk /bonnet /lock /buyhouse /sellhousetomarket /buybiz /sellbiztomarket /o /newbie /gate /door/accept /cancel /admins /rolldce /list /speedo");
		strcat (string,"/sms /call /p /pickup /hangup /smartphone /internet /buysim /wt /wtc /blindfold /unblindfold /eject /tie /untie\n/colorcar /paintcar /buytoys /toys /buyclothes /buy /phonebook");
		strcat (string,"/ad /enter /exit /stats /bizstats /helpme /report /b /s /l /w /me /do /animlist /animhelp /r /robberyhelp /setuprobbery /joinrobbery /acceptrobbery /startrobbery");
	}
	return 1;
}
Reply
#2

to be under case 0 because u show no string u never defined any strings when u do if for it below thats when the person responses,

pawn Код:
new string[2050];
            string ="/help /gatehelp /changegatepass /fishhelp /sellfish /fishes /fish /stuck /train /tow /gascan /fuel /cookieshelp /usecookies /refhelp /refer /accent /license /showlicense /getlic /getweaplic";
        strcat (string,"/joinevent /quitevent /helpers /chat /speedlimit /locatecar /buycar /sellcartomarket /slot /park /engine /points /families /updates /id /changepass /search /drop /pay");
        strcat (string,"/paycheck /wire /withdraw /deposit /serverstats /reportbug /jobhelp /bid /fight /househelp /hwithdraw /hdeposit /vehhelp /bizhelp /skill /join /quitjob /houseupgrade /bizupgrade");
        strcat (string,"/vault /buyproducts /lights /trunk /bonnet /lock /buyhouse /sellhousetomarket /buybiz /sellbiztomarket /o /newbie /gate /door/accept /cancel /admins /rolldce /list /speedo");
        strcat (string,"/sms /call /p /pickup /hangup /smartphone /internet /buysim /wt /wtc /blindfold /unblindfold /eject /tie /untie\n/colorcar /paintcar /buytoys /toys /buyclothes /buy /phonebook");
        strcat (string,"/ad /enter /exit /stats /bizstats /helpme /report /b /s /l /w /me /do /animlist /animhelp /r /robberyhelp /setuprobbery /joinrobbery /acceptrobbery /startrobbery");
Reply
#3

Thanks I got it working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)