[HELP]ZCMD: /jail {O.o}
#1

Hey i wan't to know, how to make that, like i type /jail [ID] [REASON] [TIME] , then that time what i typed, that time he was jailed ? After that time he is back. I have that cmd :
pawn Код:
COMMAND:jail(playerid,params[])
{
    new PlayerName[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME];
    new tmp[256], Index, string[256];
    tmp = strtok(params,Index), playerid2 = strval(tmp);
    GetPlayerName(playerid2,on,sizeof(on));
    GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
    if(Account[playerid][Level] < 2) return SendClientMessage(playerid,RED,"{990000}You need to be level 2 to use this command!");
    if(sscanf(params, "us[256]", playerid2,params[2])) return SendClientMessage(playerid, COLOR_GREEN, "{009900}Usage: /Jail [ID] [REASON]");
    if(!IsPlayerConnected(playerid2))return SendClientMessage(playerid,ORANGE,"{FF9900}Player is not connected!");
    format(string,sizeof(string),"{990000}%s {9933CC} has jailed by Administrator{990000} %s {9933CC} | Reason:{990000} %s",on,PlayerName,params[2]);
    SendClientMessageToAll(Blue,string);
    SetPlayerVirtualWorld(playerid2, 101);
    TogglePlayerControllable(playerid2, 0);
    PlayerPlaySound(playerid, 1076, 0.0, 0.0, 0.0);
    format(string,sizeof(string),"{33CC00}[ADMIN]:{990000} %s {33CC00}is jailed by Administrator {990000}%s",on,PlayerName);
    AdminCChat(COLOR_LIGHTRED,string,1);
    return 1;
}
Srry for a bad english
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)