Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if(strcmp(cmd,"jail",true) == 0)
- {
- if(PlayerInfo[playerid][Cop] == 1)
- {
- new plr;
- tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
- if (!strlen(tmp)) SendClientMessage(playerid,COLOR_YELLOW,"USAGE: /c jail [Nick/ID]");
- else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_YELLOW,"Error: Unknown player");
- else {
- if(nj == 0)
- {
- if(PlayerInfo[plr][Wanted] >= 1)
- {
- if(PlayerToPoint(40.0,playerid,390.9685,-507.1411,9.3956))
- {
- if(PlayerToPoint(40.0,plr,390.9685,-507.1411,9.3956))
- {
- new string[256];
- SendClientMessageToAll(COLOR_YELLOW,string);
- new surmsg[256];
- format(surmsg,sizeof(surmsg),"You Have Been Jailed by Officer:%s",gPlayers[playerid]);
- TogglePlayerControllable(playerid,0);
- new hisw;
- hisw = PlayerInfo[plr][Wanted];
- format(string,sizeof(string),"Officer: %s jailed suspect: %s for %d minutes!!",gPlayers[playerid],gPlayers[plr],hisw);
- SendClientMessage(plr,COLOR_YELLOW,surmsg);
- jailedname = gPlayers[plr];
- new thecash;
- thecash = PlayerInfo[plr][Wanted];
- new value;
- value = PlayerInfo[plr][Wanted] * 1000;
- new value2;
- value2 = value / 2;
- IncPlayerHandCash(playerid,value2);
- SetTimer("unjail",thecash * 35000,0);
- nj == 1;
- PlayerInfo[plr][Wanted] = 0;
- }
- else
- {
- SendClientMessage(playerid,COLOR_YELLOW,"The Suspect is not in Jail!");
- }
- }
- else
- {
- SendClientMessage(playerid,COLOR_YELLOW,"You Cannnot Jail a Suspect without bieng in VCPD");
- }
- }
- else
- {
- SendClientMessage(playerid,COLOR_YELLOW,"The Suspect is Not Wanted");
- }
- }
- else if(nj == 1)
- {
- new string[256];
- format(string,sizeof(string),"Officer: %s jailed suspect: %s for 2 minutes!!",gPlayers[playerid],gPlayers[plr]);
- SendClientMessageToAll(COLOR_YELLOW,string);
- new surmsg[256];
- format(surmsg,sizeof(surmsg),"%s Jailed you!!!",gPlayers[plr]);
- TogglePlayerControllable(plr,0);
- SendClientMessage(plr,COLOR_YELLOW,surmsg);
- ajailname = gPlayers[plr];
- SetTimer("unjail2",200000,0);
- dj == 1;
- }
- }
- }
- else
- {
- (PlayerInfo[playerid][Cop] != 1); SendClientMessage(playerid, COLOR_RED, "You are not a Police officer");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement