ZCMD 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: ZCMD command. (
/showthread.php?tid=350757)
ZCMD command. -
a!DaN)_)-) - 13.06.2012
Hi, when i type this command it returns the SERVER : /alockbiz [id] but when i put in the id it says unknown command.
If anyone does fix this could you also tell me where i went wrong so i can learn for next time.
Код:
CMD:alockbiz(playerid, params[]) {
if(playerVariables[playerid][pAdminLevel] >= 4) {
new
businessID;
if(sscanf(params, "d", businessID)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/alockbiz [ID]");
switch(businessVariables[businessID][bLocked]) {
case 0: {
format(result, sizeof(result), "%s\n(Business %d - owned by %s)\n\n(locked)", businessVariables[ businessID][bName],businessVariables[ businessID][bOwner]);
businessVariables[ businessID][bLocked] = 1;
SendClientMessage(playerid, COLOR_WHITE, "Business locked.");
}
case 1: {
format(result, sizeof(result), "%s\n(Business %d - owned by %s)\n\nPress ~k~~PED_DUCK~ to enter", businessVariables[ businessID][bName], businessVariables[ businessID][bOwner]);
businessVariables[ businessID][bLocked] = 0;
SendClientMessage(playerid, COLOR_WHITE, "Business unlocked.");
}
}
UpdateDynamic3DTextLabelText(businessVariables[businessID][bLabelID], COLOR_YELLOW, result);
}
return 1;
}
Re: ZCMD command. -
ViniBorn - 13.06.2012
Make a debug and check if "businessVariables[businessID][bLocked]" is 0 or 1
Re: ZCMD command. -
a!DaN)_)-) - 13.06.2012
Its 1
Re: ZCMD command. -
iRage - 13.06.2012
Put debugging lines after each single line in your code, find where does it stop at and post it here.
Re: ZCMD command. -
a!DaN)_)-) - 13.06.2012
Nevermind i get it