14.12.2010, 17:44
Hey. When I type /jail it says "You are not authorized to use that command!".
I posted this in the wrong section so i removed and re-posted it here.
Код:
dcmd_jail(playerid, params[]) { new pID, pName[24], pName2[24], string[128]; GetPlayerName(pID, pName, sizeof(pName)); GetPlayerName(pID, pName2, sizeof(pName2)); if(!sscanf(params, "us", pID)) SendClientMessage(playerid, COLOR_RED, "Usage: /jail [playerid]"); else if(PlayerInfo[playerid][AdminLevel] >= 1) return SendClientMessage(playerid, COLOR_RED, "You are not authorized to use that command!"); else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "Invalid playerid"); else { SetPlayerPos(pID,264.0535,77.2942,1001.0391); SetPlayerFacingAngle(pID,270.0); JailedPlayer[pID] = true; format(string, sizeof(string), "**(Admin)** %s [ID: %d] jailed %s [ID: %d]", pName, playerid, pName2, playerid); SendmAdminMsg(COLOR_LIGHTRED, string); PlayerInfo[pID][Jailed] = 1; SetTimerEx("JailTimer", 600000, false, "i", pID); } return 1; }