Код:
CMD:jail(playerid, params[])
{
new PID;
if(IsPlayerConnected(PID))
{
if(!IsPlayerAdmin(playerid))
{
if(!sscanf(params, "u", PID))
{
new string[64];
format(string, sizeof(string), "You have been jailed by %s.", PlayerName(playerid));
SendClientMessage(PID, 0xD8D8D8FF, string);
format(string, sizeof(string), "You jailed %s .", PlayerName(PID));
SendClientMessage(playerid, 0xD8D8D8FF, string);
SetPlayerPos(PID, 264.5442199707,77.155387878418,1001.0390625);
SetPlayerInterior(PID, 6);
return true;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /jail [PlayerId/PartOfName]");
}
else return SendClientMessage(playerid, COLOR_RED, "You are not allowed to use this command.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Player is not connected.");
}
CMD:unjail(playerid, params[])
{
new PID;
if(IsPlayerConnected(PID))
{
if(!IsPlayerAdmin(playerid))
{
if(!sscanf(params, "u", PID))
{
new string[64];
format(string, sizeof(string), "You have been unjailed by %s.", PlayerName(playerid));
SendClientMessage(PID, 0xD8D8D8FF, string);
format(string, sizeof(string), "You unjailed %s .", PlayerName(PID));
SendClientMessage(playerid, 0xD8D8D8FF, string);
SetPlayerPos(PID, 1552.1305,-1675.6511,16.1554);
SetPlayerInterior(PID, 0);
return true;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /unjail [PlayerId/PartOfName]");
}
else return SendClientMessage(playerid, COLOR_RED, "You are not allowed to use this command.");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Player is not connected.");
}
stock PlayerName(playerid)
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
return Name;
}
It's Working without any error but one problem huh
i'm not allowed Use it when i'm on Rcon admin it's show me this Error IG
Код:
else return SendClientMessage(playerid, COLOR_RED, "You are not allowed to use this command.");
huh if u see any problem in this script plesae Tell me