Quote from June 14, 2014, 5:02 pm:
reci mi sta ti tacno treba probacu..
ovu komandu u zcmd pa cu ja posle varijable prilagodit sebi.. ti po ovome ako mozes prebaci, ova komanda je pravo rp.. ako imas vremena i hvala sto hoces kao si rekao 🙂
if(strcmp(cmd, "/ar", true) == 0) {
if(IsSpawned == 0) {
SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
return 1;
}
if(gTeam != TEAM_COP && gTeam != TEAM_ARMY && gTeam != TEAM_BOUNTY) {
SendClientMessage(playerid,COLOR_ERROR,"You are not a Law Enforcement officer ");
return 1;
}
if(InDerby == 1) {
SendClientMessage(playerid,COLOR_ERROR,"You cannot use this command while you are in the stadium");
return 1;
}
if(Jailed ==1) {
SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_ERROR, "USAGE: /ar (id)");
return 1;
}
giveplayerid = strval(tmp);
if(!IsNumeric(tmp)) {
SendClientMessage(playerid, COLOR_ERROR, "USAGE: /ar (id) ID Must be a number");
return 1;
}
if(!IsPlayerConnected(giveplayerid)) {
format(string, sizeof(string), "ID (%d) is not an active player", giveplayerid);
SendClientMessage(playerid, COLOR_ERROR, string);
return 1;
}
new oname;
new pname;
GetPlayerName(playerid,oname, 24);
GetPlayerName(giveplayerid, pname, 24);
if(GetPlayerWantedLevel(giveplayerid) <= 3) {
format(string, sizeof(string), "%s(%d) Does not have a warrant. You cannot arrest a player without a warrant",pname,giveplayerid);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(IsPlayerInAnyVehicle(playerid)) {
SendClientMessage(playerid,COLOR_ERROR,"You cannot arrest a suspect if you are in a car");
return 1;
}
if(IsPlayerInAnyVehicle(giveplayerid)) {
format(string, sizeof(string), "%s(%d) Is in a vehicle. Get the suspect out before making the arrest",pname,giveplayerid);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 4) {
format(string, sizeof(string), "%s(%d) Is too far away. You cannot arrest that player",pname,giveplayerid);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(IsSpawned == 0) {
format(string, sizeof(string), "%s(%d) Is dead. You cannot arrest a dead body",pname,giveplayerid);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
SetPlayerVirtualWorld(giveplayerid,0);
if(GetPlayerWantedLevel(playerid) >=1) {
SendClientMessage(playerid,COLOR_ERROR,"You cannot use this command if you are wanted by the police");
return 1;
}
if(gTeam == TEAM_BOUNTY && EscapedConvict == 0) {
SendClientMessage(playerid,COLOR_ERROR,"That player is not on your bounty list. Type /bounty for details");
return 1;
}
if(giveplayerid == playerid) {
SendClientMessage(playerid,COLOR_ERROR,"You cannot arrest yourself");
return 1;
}
if(gTeam == TEAM_BOUNTY && EscapedConvict == 1 && GetPlayerWantedLevel(giveplayerid) >=10) {
SetPlayerInterior(giveplayerid,10);
new rnd;
rnd = random(sizeof (AlcatrazArrestedSpawn));
SetPlayerPos(giveplayerid, AlcatrazArrestedSpawn, AlcatrazArrestedSpawn, AlcatrazArrestedSpawn);
SetPlayerFacingAngle(giveplayerid, AlcatrazArrestedSpawn);
format(string, sizeof(string), "Bounty Hunter %s(%d) has re-captured Escaped Convict %s(%d) and has sent the suspect to Alcatraz",oname,playerid,pname,giveplayerid);
SendClientMessageToAll(0x00C7FFAA, string);
SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Busted By A Bounty Hunter_|");
format(string, sizeof(string), "You have been sent to Alcatraz by Bounty Hunter %s(%d)",oname,playerid);
SendClientMessage(giveplayerid,0x00C7FFAA, string);
SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
SendClientMessage(giveplayerid,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
format(string, sizeof(string), "You have sent escaped prisoner %s(%d) to Alcatraz - you receive a $5000 re-capture bonus",pname,giveplayerid);
SendClientMessage(playerid,0x00C7FFAA, string);
GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
format(string, sizeof(string), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Bounty Hunter %s(%d)",pname,giveplayerid,oname,playerid);
printf("%s", string);
SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
GivePlayerMoney(playerid,5000);
Jailed =1;
InAlcatraz =1;
StoleCopCarRecent =0;
triedtoescaperecent =1;
ResetPlayerWeapons(giveplayerid);
JailTime =320;
JailTimeServed =0;
EscapedConvict =0;
SetPlayerWantedLevel(giveplayerid,0);
oscore = GetPlayerScore(playerid);
SetPlayerScore(playerid, oscore +1);
return 1;
}
if(EscapedConvict == 1 && GetPlayerWantedLevel(giveplayerid) >=10) {
SetPlayerInterior(giveplayerid,10);
new rnd;
rnd = random(sizeof (AlcatrazArrestedSpawn));
SetPlayerPos(giveplayerid, AlcatrazArrestedSpawn, AlcatrazArrestedSpawn, AlcatrazArrestedSpawn);
SetPlayerFacingAngle(giveplayerid, AlcatrazArrestedSpawn);
format(string, sizeof(string), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
SendClientMessageToAll(0x00C7FFAA, string);
SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
format(string, sizeof(string), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
SendClientMessage(giveplayerid,0x00C7FFAA, string);
SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
SendClientMessage(giveplayerid,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
format(string, sizeof(string), "You have sent escaped prisoner %s(%d) to Alcatraz - you receive a $4000 re-capture bonus",pname,giveplayerid);
SendClientMessage(playerid,0x00C7FFAA, string);
GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
format(string, sizeof(string), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Officer %s(%d)",pname,giveplayerid,oname,playerid);
printf("%s", string);
SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
GivePlayerMoney(playerid,4000);
Jailed =1;
InAlcatraz =1;
StoleCopCarRecent =0;
triedtoescaperecent =1;
ResetPlayerWeapons(giveplayerid);
JailTime =320;
JailTimeServed =0;
EscapedConvict =0;
SetPlayerWantedLevel(giveplayerid,0);
oscore = GetPlayerScore(playerid);
SetPlayerScore(playerid, oscore +1);
return 1;
}
if(GetPlayerWantedLevel(giveplayerid) >=4 && GetPlayerWantedLevel(giveplayerid) <=5) {
SetPlayerInterior(giveplayerid,3);
new rnd;
rnd = random(sizeof (ArrestedSpawn));
SetPlayerPos(giveplayerid, ArrestedSpawn, ArrestedSpawn, ArrestedSpawn);
SetPlayerFacingAngle(giveplayerid, ArrestedSpawn);
format(string, sizeof(string), "Wanted suspect %s(%d) has been arrested by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
SendClientMessageToAll(0x00C7FFAA, string);
SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
format(string, sizeof(string), "You were Arrested by Officer %s(%d)",oname,playerid);
SendClientMessage(giveplayerid,0x00C7FFAA, string);
SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from jail or a Police Officer/Jail Turnkey can release you early");
SendClientMessage(giveplayerid,0x00C7FFAA,"If jail life sucks for you... Why not try /escape");
SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
format(string, sizeof(string), "You have arrested %s(%d) - you receive a $1500 bonus",pname,giveplayerid);
SendClientMessage(playerid,0x00C7FFAA, string);
GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
format(string, sizeof(string), "Wanted suspect %s(%d) has been arrested by Officer %s(%d)",pname,giveplayerid,oname,playerid);
printf("%s", string);
SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
GivePlayerMoney(playerid,1500);
Jailed =1;
StoleCopCarRecent =0;
triedtoescaperecent =1;
ResetPlayerWeapons(giveplayerid);
JailTime =80;
JailTimeServed =0;
SetPlayerWantedLevel(giveplayerid,0);
oscore = GetPlayerScore(playerid);
SetPlayerScore(playerid, oscore +1);
return 1;
}
if(GetPlayerWantedLevel(giveplayerid) >=6 && GetPlayerWantedLevel(giveplayerid) <=8) {
SetPlayerInterior(giveplayerid,3);
new rnd;
rnd = random(sizeof (ArrestedSpawn));
SetPlayerPos(giveplayerid, ArrestedSpawn, ArrestedSpawn, ArrestedSpawn);
SetPlayerFacingAngle(giveplayerid, ArrestedSpawn);
format(string, sizeof(string), "Wanted suspect %s(%d) has been arrested by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
SendClientMessageToAll(0x00C7FFAA, string);
SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
format(string, sizeof(string), "You were Arrested by Officer %s(%d)",oname,playerid);
SendClientMessage(giveplayerid,0x00C7FFAA, string);
GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from jail or a Police Officer/Jail Turnkey can release you early");
SendClientMessage(giveplayerid,0x00C7FFAA,"If jail life sucks for you... Why not try /escape");
SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
format(string, sizeof(string), "You have arrested %s(%d) - you receive a $2000 bonus",pname,giveplayerid);
SendClientMessage(playerid,0x00C7FFAA, string);
format(string, sizeof(string), "Wanted suspect %s(%d) has been arrested by Officer %s(%d)",pname,giveplayerid,oname,playerid);
printf("%s", string);
SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
GivePlayerMoney(playerid,2000);
Jailed =1;
StoleCopCarRecent =0;
triedtoescaperecent =1;
ResetPlayerWeapons(giveplayerid);
JailTime =140;
JailTimeServed =0;
SetPlayerWantedLevel(giveplayerid,0);
oscore = GetPlayerScore(playerid);
SetPlayerScore(playerid, oscore +1);
return 1;
}
if(GetPlayerWantedLevel(giveplayerid) == 9) {
SetPlayerInterior(giveplayerid,3);
new rnd;
rnd = random(sizeof (ArrestedSpawn));
SetPlayerPos(giveplayerid, ArrestedSpawn, ArrestedSpawn, ArrestedSpawn);
SetPlayerFacingAngle(giveplayerid, ArrestedSpawn);
format(string, sizeof(string), "Wanted suspect %s(%d) has been arrested by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
SendClientMessageToAll(0x00C7FFAA, string);
SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
format(string, sizeof(string), "You were Arrested by Officer %s(%d)",oname,playerid);
SendClientMessage(giveplayerid,0x00C7FFAA, string);
SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from jail or a Police Officer/Jail Turnkey can release you early");
SendClientMessage(giveplayerid,0x00C7FFAA,"If jail life sucks for you... Why not try /escape");
SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
format(string, sizeof(string), "You have arrested %s(%d) - you receive a $2500 bonus",pname,giveplayerid);
SendClientMessage(playerid,0x00C7FFAA, string);
GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
format(string, sizeof(string), "Wanted suspect %s(%d) has been arrested by Officer %s(%d)",pname,giveplayerid,oname,playerid);
printf("%s", string);
SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
GivePlayerMoney(playerid,2500);
Jailed =1;
StoleCopCarRecent =0;
triedtoescaperecent =1;
ResetPlayerWeapons(giveplayerid);
JailTime =200;
JailTimeServed =0;
SetPlayerWantedLevel(giveplayerid,0);
oscore = GetPlayerScore(playerid);
SetPlayerScore(playerid, oscore +1);
return 1;
}
if(GetPlayerWantedLevel(giveplayerid) >=10 && GetPlayerWantedLevel(giveplayerid) <=14) {
SetPlayerInterior(giveplayerid,10);
new rnd;
rnd = random(sizeof (AlcatrazArrestedSpawn));
SetPlayerPos(giveplayerid, AlcatrazArrestedSpawn, AlcatrazArrestedSpawn, AlcatrazArrestedSpawn);
SetPlayerFacingAngle(giveplayerid, AlcatrazArrestedSpawn);
format(string, sizeof(string), "Most Wanted suspect %s(%d) has been sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
SendClientMessageToAll(0x00C7FFAA, string);
SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
format(string, sizeof(string), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
SendClientMessage(giveplayerid,0x00C7FFAA, string);
SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
SendClientMessage(giveplayerid,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
format(string, sizeof(string), "You have sent Most Wanted suspect %s(%d) to Alcatraz - you receive a $3000 bonus",pname,giveplayerid);
SendClientMessage(playerid,0x00C7FFAA, string);
GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
format(string, sizeof(string), "Most Wanted suspect %s(%d) has been arrested and sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
printf("%s", string);
SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
GivePlayerMoney(playerid,3000);
Jailed =1;
InAlcatraz =1;
StoleCopCarRecent =0;
triedtoescaperecent =1;
ResetPlayerWeapons(giveplayerid);
JailTime =280;
JailTimeServed =0;
SetPlayerWantedLevel(giveplayerid,0);
oscore = GetPlayerScore(playerid);
SetPlayerScore(playerid, oscore +1);
return 1;
}
if(GetPlayerWantedLevel(giveplayerid) >=15 && GetPlayerWantedLevel(giveplayerid) <=24) {
SetPlayerInterior(giveplayerid,10);
new rnd;
rnd = random(sizeof (AlcatrazArrestedSpawn));
SetPlayerPos(giveplayerid, AlcatrazArrestedSpawn, AlcatrazArrestedSpawn, AlcatrazArrestedSpawn);
SetPlayerFacingAngle(giveplayerid, AlcatrazArrestedSpawn);
format(string, sizeof(string), "Most Wanted suspect %s(%d) has been sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
SendClientMessageToAll(0x00C7FFAA, string);
SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
format(string, sizeof(string), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
SendClientMessage(giveplayerid,0x00C7FFAA, string);
SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
SendClientMessage(giveplayerid,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
format(string, sizeof(string), "You have sent Most Wanted suspect %s(%d) to Alcatraz - you receive a $3500 bonus",pname,giveplayerid);
SendClientMessage(playerid,0x00C7FFAA, string);
GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
format(string, sizeof(string), "Most Wanted suspect %s(%d) has been arrested and sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
printf("%s", string);
SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
GivePlayerMoney(playerid,3500);
Jailed =1;
InAlcatraz =1;
StoleCopCarRecent =0;
triedtoescaperecent =1;
ResetPlayerWeapons(giveplayerid);
JailTime =320;
JailTimeServed =0;
SetPlayerWantedLevel(giveplayerid,0);
oscore = GetPlayerScore(playerid);
SetPlayerScore(playerid, oscore +1);
return 1;
}
if(GetPlayerWantedLevel(giveplayerid) >=25) {
SetPlayerInterior(giveplayerid,10);
new rnd;
rnd = random(sizeof (AlcatrazArrestedSpawn));
SetPlayerPos(giveplayerid, AlcatrazArrestedSpawn, AlcatrazArrestedSpawn, AlcatrazArrestedSpawn);
SetPlayerFacingAngle(giveplayerid, AlcatrazArrestedSpawn);
format(string, sizeof(string), "Most Wanted suspect %s(%d) has been sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
SendClientMessageToAll(0x00C7FFAA, string);
SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
format(string, sizeof(string), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
SendClientMessage(giveplayerid,0x00C7FFAA, string);
SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
SendClientMessage(giveplayerid,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
format(string, sizeof(string), "You have sent Most Wanted suspect %s(%d) to Alcatraz - you receive a $4000 bonus",pname,giveplayerid);
SendClientMessage(playerid,0x00C7FFAA, string);
GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
format(string, sizeof(string), "Most Wanted suspect %s(%d) has been arrested and sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
printf("%s", string);
SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
GivePlayerMoney(playerid,4000);
Jailed =1;
InAlcatraz =1;
StoleCopCarRecent =0;
triedtoescaperecent =1;
ResetPlayerWeapons(giveplayerid);
JailTime =420;
JailTimeServed =0;
SetPlayerWantedLevel(giveplayerid,0);
oscore = GetPlayerScore(playerid);
SetPlayerScore(playerid, oscore +2);
}
return 1;
}
pa cu posle ja gledat odavde da shvatim gde sam napravio gresku...