What am doing wrong with this command? - 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: What am doing wrong with this command? (
/showthread.php?tid=395280)
What am doing wrong with this command? -
ArmandoRamiraz - 25.11.2012
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;
}
Re: What am doing wrong with this command? -
Glad2BeHere - 25.11.2012
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");
Re: What am doing wrong with this command? -
ArmandoRamiraz - 25.11.2012
Thanks I got it working