if(strcmp(cmd, "/arrest", true)==0) { if (gTeam[playerid] == TEAM_COP) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /arrest [ID]"); return 1; } new pid = strval(tmp); if (IsPlayerConnected(pid)) { new String [256]; new pName[MAX_PLAYER_NAME]; new copname[MAX_PLAYER_NAME]; GetPlayerName(pid, pName, sizeof(pName)); GetPlayerName(playerid, copname, sizeof(copname)); format(String, sizeof(String), "[ATTENTION OFFICERS] %s has been arrested by Officer %s!", pName,copname); SendClientMessageToAll(COLOR_YELLOW, String); SetPlayerInterior(pid, 3); ResetPlayerWeapons(pid); SetPlayerPos(pid, 197.6661, 173.8179, 1003.0234); IsJailed[pid] = 1; if(GetPlayerWantedLevel(pid) == 1) SetTimer("JailRelease", 60000, 0); SendClientMessage(pid, COLOR_YELLOW, "You have been sent to jail for your criminal acts for 1 Minute"); if(GetPlayerWantedLevel(pid) == 2) SetTimer("JailRelease", 120000, 0); SendClientMessage(pid, COLOR_YELLOW, "You have been sent to jail for your criminal acts for 2 Minutes"); if(GetPlayerWantedLevel(pid) == 3) SetTimer("JailRelease", 180000, 0); SendClientMessage(pid, COLOR_YELLOW, "You have been sent to jail for your criminal acts for 3 Minutes"); if(GetPlayerWantedLevel(pid) == 4) SetTimer("JailRelease", 240000, 0); SendClientMessage(pid, COLOR_YELLOW, "You have been sent to jail for your criminal acts for 4 Minutes"); if(GetPlayerWantedLevel(pid) == 5) SetTimer("JailRelease", 300000, 0); SendClientMessage(pid, COLOR_YELLOW, "You have been sent to jail for your criminal acts for 5 Minutes"); if(GetPlayerWantedLevel(pid) == 6) SetTimer("JailRelease", 360000, 0); SendClientMessage(pid, COLOR_YELLOW, "You have been sent to jail for your criminal acts for 6 Minutes"); } } return 1; } |
if(GetPlayerWantedLevel(pid) == 1) SetTimer("JailRelease", 60000, 0); SendClientMessage(pid, COLOR_YELLOW, "You have been sent to jail for your criminal acts for 1 Minute");
if(GetPlayerWantedLevel(pid) == 1) { SetTimer("JailRelease", 60000, 0); SendClientMessage(pid, COLOR_YELLOW, "You have been sent to jail for your criminal acts for 1 Minute"); }
switch(GetPlayerWantedLevel(pid))
{
case 1:
{
SetTimer("JailRelease", 60000, 0);
SendClientMessage(pid, COLOR_YELLOW, "You have been sent to jail for your criminal acts for 1 Minute");
}
case 2:
{
SetTimer("JailRelease", 120000, 0);
SendClientMessage(pid, COLOR_YELLOW, "You have been sent to jail for your criminal acts for 2 Minutes");
}
case 3: ... and so on
}