BoomBox Script Help - 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: BoomBox Script Help (
/showthread.php?tid=499580)
BoomBox Script Help -
mixmadamich - 08.03.2014
Why does it say Unknown Command when I type /createboombox?
Code:
Код:
//boombox cmds
CMD:shopboombox(playerid, params[])
{
if (PlayerInfo[playerid][pShopTech] < 1 && PlayerInfo[playerid][pAdmin] < 4)
{
SendClientMessageEx(playerid, COLOR_GREY, " You are not allowed to use this command.");
return 1;
}
new giveplayerid, invoice;
if(sscanf(params, "ui", giveplayerid, invoice)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /createboombox [Player ID] [invoice #]");
new string[128];
if(PlayerInfo[giveplayerid][pBoombox] == 0)
{
PlayerInfo[giveplayerid][pBoombox] = 1;
format(string, sizeof(string), "You have been given a boombox from Admin %s. ", GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "[CREATEBOOMBOX] %s has given %s a boombox - Invoice %d", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), invoice);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
Log("logs/shoplog.log", string);
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "This player allready have a boombox.");
}
return 1;
Re: BoomBox Script Help -
DanRellex - 08.03.2014
Well the command you sent us is /shopboombox.. Send us the right code and we might be able to help you.
Re: BoomBox Script Help -
XK - 08.03.2014
you are showing us /shopboombox..
Re: BoomBox Script Help -
Abagail - 08.03.2014
Show us [/createboombox] please.