CMD:shopboombox(playerid, params[])
{
if (PlayerInfo[playerid][pShopTech][pAdmin] < 1)
{
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: /shopboombox [player] [invoice #]");
new string[128];
if(PlayerInfo[giveplayerid][pBoombox] == 1)
{
PlayerInfo[giveplayerid][pBoombox] = 0;
format(string, sizeof(string), "Your boombox has been taken by Shop Tech %s. ", GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "[SHOPBOOMBOX] %s has taken %s boombox - Invoice %d", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), invoice);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
Log("logs/shoplog.log", string);
}
else
{
PlayerInfo[giveplayerid][pBoombox] = 1;
format(string, sizeof(string), "You have been given a boombox from Shop Tech %s. ", GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "[SHOPBOOMBOX] %s has given %s a boombox - Invoice %d", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), invoice);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
Log("logs/shoplog.log", string);
}
public OnPlayerEnterDynamicArea(playerid, areaid)
{
foreach(Player, i)
{
if(GetPVarType(i, "pBoomBoxArea"))
{
if(areaid == GetPVarInt(i, "pBoomBoxArea"))
{
new station[256];
GetPVarString(i, "pBoomBoxStation", station, sizeof(station));
if(!isnull(station))
{
PlayAudioStreamForPlayerEx(playerid, station, GetPVarFloat(i, "pBoomBoxX"), GetPVarFloat(i, "pBoomBoxY"), GetPVarFloat(i, "pBoomBoxZ"), 30.0, 1);
}
return 1;
}
}
}
if(areaid == audiourlid)
{
PlayAudioStreamForPlayerEx(playerid, audiourlurl, audiourlparams[0], audiourlparams[1], audiourlparams[2], audiourlparams[3], 1);
}
return 1;
}
public OnPlayerLeaveDynamicArea(playerid, areaid)
{
foreach(Player, i)
{
if(GetPVarType(i, "pBoomBoxArea"))
{
if(areaid == GetPVarInt(i, "pBoomBoxArea"))
{
StopAudioStreamForPlayerEx(playerid);
return 1;
}
}
}
if(areaid == audiourlid)
{
StopAudioStreamForPlayerEx(playerid);
}
return 1;
}
return 1;
|
so does it have any errors, if not, what does it show in game?
|
C:\Users\Parent\Desktop\pawno\gamemodes\MXRP.pwn(95921) : error 021: symbol already defined: "cmd_shopboombox" C:\Users\Parent\Desktop\pawno\gamemodes\MXRP.pwn(95922) : error 001: expected token: ")", but found "[" C:\Users\Parent\Desktop\pawno\gamemodes\MXRP.pwn(95922) : error 029: invalid expression, assumed zero C:\Users\Parent\Desktop\pawno\gamemodes\MXRP.pwn(95922) : warning 215: expression has no effect C:\Users\Parent\Desktop\pawno\gamemodes\MXRP.pwn(95922) : error 001: expected token: ";", but found "]" C:\Users\Parent\Desktop\pawno\gamemodes\MXRP.pwn(95922) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
hopboombox(playerid, params[])|
}
CMD hopboombox(playerid, params[]){ if (PlayerInfo[playerid][pShopTech][pAdmin] < 1) { SendClientMessageEx(playerid, COLOR_GREY, " You are not allowed to use this command."); return 1; |