23.01.2014, 13:46
pawn Код:
CMD:deletebusiness(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 5)
return SendClientMessage(playerid, COLOR_GREY, "You're not authorised to use this command.");
if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 5)
return SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
new
iBusinessID;
if(sscanf(params, "i", iBusinessID))
return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /deletebusiness [BusinessID]");
if(BusinessInfo[iBusinessID][bID] == 0 || iBusinessID >= MAX_BUSINESSES || iBusinessID < 0)
return SendClientMessage(playerid, COLOR_WHITE, "The business ID does not exist");
SetPVarInt(playerid, "DeleteBusinessID", iBusinessID);
return true;
}

