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?