SA-MP Forums Archive
How to make it so i can select how long the player is jailed for? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to make it so i can select how long the player is jailed for? (/showthread.php?tid=129847)



How to make it so i can select how long the player is jailed for? - Torran - 23.02.2010

pawn Код:
CMD:arrest(playerid, params[])
{
    new id;
    if (GetPlayerTeam(playerid) != TEAM_POLICE) SendClientMessage(playerid, COLOR_RED, "You are not part of the Police Force");
    else if (OnDuty[playerid] != 1) SendClientMessage(playerid, COLOR_RED, "You need to be on duty to use this command");
    else if (sscanf(params, "u", id)) SendClientMessage(playerid, COLOR_RED, "Usage ~ /arrest [PlayerID/PartOfName]");
    else if (id == playerid) SendClientMessage(playerid, COLOR_RED, "You cannot arrest yourself");
    else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Player not found");
    else
    {
        new name[MAX_PLAYER_NAME], name1[MAX_PLAYER_NAME], string[300];
      GetPlayerName(playerid, name, sizeof(name));
      GetPlayerName(playerid, name1, sizeof(name1));
      format(string,sizeof(string),"You were arrested by Officer %s for 1 minute", name);
        SendClientMessage(id, COLOR_YELLOW, string);
        format(string,sizeof(string),"You have arrested %s for 1 minute", name1);
        SendClientMessage(playerid, COLOR_GREEN, string);
        format(string,sizeof(string),"[POLICE] Officer %s has arrested a player", name);
        SendTeamMessage(TEAM_POLICE, COLOR_BLUE, string);
    }
    return 1;
}
This is my arrest command, Well can someone edit that code so the police officer can type in how long there jailed for?
Or atleast give me a example and/or tell me