27.07.2011, 17:14
pawn Код:
CMD:jail(playerid, params[])
{
if(IsPlayerAdmin2[playerid] == 2)
{
new targetid, reason[128], msg[64], name[46];
if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /jail [id] [reason]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "That player is not online.");
GetPlayerName(playerid, name, sizeof(name));
format(msg, sizeof(msg), "%s was jailed. Reason: %s. Time: 120sec.", name, reason);
SendClientMessageToAll(COLOR_RED, msg);
SetTimer("jailtime", 120000, false);
SetPlayerInterior(targetid, 6);
SetPlayerPos(targetid, 265.34756469727, 77.521759033203, 1001.0390625);
return 1;
}
return 1;
}
Thanks