02.01.2012, 19:13
Hello,
I have scripted my " Admin's system " jail command, and I want to use Minutes instead of Miliseconds like
instead of doing
/jail playerid 15000 hi.
do:
/jail playerid 15 hi.
Oh and change the timers to Minutes not Miliseconds.
My script is:
I have scripted my " Admin's system " jail command, and I want to use Minutes instead of Miliseconds like
instead of doing
/jail playerid 15000 hi.
do:
/jail playerid 15 hi.
Oh and change the timers to Minutes not Miliseconds.
My script is:
pawn Код:
YCMD:jail(playerid, params[])
{
if(PlayerInfo[playerid][Admin] == 1)
{
new JailedPlayer, string[128], thetime, reason[126];
if(sscanf(params, "uis[126]", JailedPlayer, thetime, reason)) return SCM(playerid, COLOR_GREY, "YCMD: /jail [Part of Name/Player ID] [Time] [Reason]");
PlayerInfo[JailedPlayer][Jail] = 1;
PlayerInfo[JailedPlayer][JailedTime] = thetime;
SetPlayerPos(JailedPlayer, 250.56483459473, 1868.0897216797, -30.752481460571);
SetTimerEx("JailedTimer", thetime, false,"i",JailedPlayer);
format(string, sizeof(string), "%s has jailed you for about %i, Reason: %s.", PlayerName(playerid), thetime, reason);
SCM(JailedPlayer, COLOR_YELLOW, string);
format(string, sizeof(string), "Admin: %s has jailed %s for %i.", PlayerName(playerid), PlayerName(playerid), PlayerInfo[JailedPlayer][JailedTime]);
AMessage(COLOR_LIGHTRED, string);
} else return SCM(playerid, COLOR_GREY, "You're not authorized to use this command.");
return 1;
}