18.03.2011, 09:20
Why not a normal jail command? Normal jail command is for example:
pawn Код:
COMMAND:jail(playerid, params[])
{
new id;
if(IsPlayerConnected(id))
{
if(IsPlayerAdmin(playerid))
{
if(!sscanf(params, "u", id))
{
new string[64];
new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(id, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "You have been jailed by %s.", name);
SendClientMessage(id, 0x0259EAAA, string);
format(string, sizeof(string), "You jailed %s .", PlayerName);
SendClientMessage(playerid, 0x0259EAAA, string);
SetPlayerPos(id, 264.6288,77.5742,1001.0391);
SetPlayerInterior(id, 3);
return 1;
}
else return SendClientMessage(playerid, 0x0259EAAA, "USAGE: /jail [PlayerId/PartOfName]");
}
else return SendClientMessage(playerid, 0x0259EAAA, "You are not admin.");
}
else return SendClientMessage(playerid, 0x0259EAAA, "Player is not connected.");
}