Cops arrest system
#1

Where or How i can found or make a police and arrest suspects system?


Thanks for reading
Reply
#2

Pretty sure if you use the Search bar, you'll find one, their all over the filterscripts section.
Reply
#3

ok i will try thanks for posting
Reply
#4

But i cant find :/
Exactly i want a system which a cop can arrest a suspect if he is near to him..
Reply
#5

In my Script i used a team cop and team civilian, and in command /ar [playerid]
it will check near player of range 5.o by using IsPlayerInRangeofPoint(givenplayerid,range,copx,co py,copz); and set playerpos to jail and some timer to unjail the player
Reply
#6

Harish,could you give all the parts of your cop system ?Because i need it...
Reply
#7

okay., but i will give it to you tomorrow because i want to write it . i'm not in my to home to copy paste.
Reply
#8

Ok thanks, no problem i will wait, if you dont find this thread tommorow then send me a pm
Reply
#9

#define Team_Cop 1
new gTeam[MAX_PLAYERS];
new releasetime[MAX_PLAYERS];
forward JailRelease(playerid);

onplayerrequestclass(playerid,classid)
{
SetPlayerTeamFromClass(playerid, classid);
}
SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 0)
{
gTeam[playerid] = TEAM_Civilian;
}
else
{
gTeam[playerid] = TEAM_Cop;
}
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128], idx;
cmd = strtok(cmdtext, idx);

if(strcmp(cmd, "/ar", true) == 0)
{
new tmp[128];
tmp = strtok(cmdtext, idx);

if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /ar [playerid]");
new arrestplayer;
arrestplayer = strval(tmp);
if(gTeam[playerid] !=TEAM_Cop){SendClientMessage(playerid,COLOR_WHITE ,"Server:UnknownCommand');
}else
{
new coppos[3];
GetPlayerPos(playerid,coppos[0],coppos[1],coppos[2]);
if(IsPlayerInRangeOfPoint(arrestplayer,5.0,coppos[0],coppos[1],coppos[2])
{
SetPlayerInterior(arrestplayer,yourinterior); SetPlayerPos(arrestplayer,yourjailx,y,z);
releasetime[arrestplayer] = SetTimerEx("JailRelease",400000,0,"i",arrestplayer );
}
}
return 1;
}
return 0;
}
public JailRelease(playerid)
{
SetPlayerInterior(playerid,outinterior);
SetPlayerPos(playerid,outx,y,z);
GameTextForPlayer(playerid,"Be a Good Citizen",3000,1);
}
Reply
#10

If this helps you please give me reputations on left side.thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)