whats wrong - 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: whats wrong (
/showthread.php?tid=664618)
whats wrong -
PepsiCola23 - 05.03.2019
PHP код:
CMD:tollmenu(playerid, params[])
{
//if(!IsACop(playerid)) return SCM(playerid, COLOR_LGREEN, "a!");
//if(PlayerInfo[playerid][pRank] < 6) return SCM(playerid, COLOR_LGREEN, "b!");
//if(OnDuty[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "c!");
new sDialog[120];
if(toll == 0) format(sDialog, sizeof(sDialog), "The LS/LV toll is{80FF00}(Open){FFFFFF}Click to close.");
else if(toll == 1) format(sDialog, sizeof(sDialog), "Tge LS/LV toll is {FF0000}(Closed){FFFFFF}Click to open.");
ShowPlayerDialog(playerid, DIALOG_TOLLMENU, DIALOG_STYLE_LIST, "Cop toll menu", sDialog, "Ok", "Exit");
return 1;
}
the cmd doesnt work if i add these lines
PHP код:
if(!IsACop(playerid)) return SCM(playerid, COLOR_LGREEN, "a!");
if(PlayerInfo[playerid][pRank] < 6) return SCM(playerid, COLOR_LGREEN, "b!");
if(OnDuty[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "c!");
what s the problem?
Re: whats wrong -
TheToretto - 05.03.2019
Well... Statements return false so... What does it output? A B or C?
Re: whats wrong -
PepsiCola23 - 05.03.2019
it doesn return anything and there is no output.
the script just crashes
note:its in an include
Re: whats wrong -
TheToretto - 05.03.2019
That's not possible.. Does it compile successfully? Is SCM defined? Show how it is.