Arrest
#1

How to make if 3 cops going to arrest one criminal and ofc one cop will do /arrest id and they will get 1 score and money for arrest

and

i want one cop will arrest one criminal but they give score and money to 3 cops.

like who is on rangepoint so they give to all score.
Reply
#2

bump need help
Reply
#3

Well ... and how exactly you're planning to do that? I mean, you want a command for a cop (the cop that arrests the player) to choose the other 2 cops or ?
Reply
#4

i don't want cmd,

my point is, i want me and you going to arresting criminals and we saw a criminal on foot so i will do /ar and arrest criminal and i get 1 score and money for arresting but i want they gave score money you too.

who is on rangepoint so they gave score and money for all cops who is on rangepoint.
Reply
#5

He actually means, when ''I'' arrest a player then the other player (sscarface) gets +1 score too. The +1 score is for the assist within a range of 10 metres for example + the cop who arrested the criminal gets money for it, and the other cops who where in the range of 10 metres too, they get the half of what the cop got for arresting the criminal (assists money).

No idea about this script anyways, just trying to help
Reply
#6

thanks folly91 and any idea guyz?
Reply
#7

Scarface it`s hard for Trucking Mode ! man

Karim
Reply
#8

Simple. Just when you execute the arrest command, before putting the targetid in jail, GetPlayerPos(criminal). Then, for(new i;i<Max_players;i++) isplayerinrangeofpoint(10 metres and the criminals position..) if yes, give him the required money..also, add the condition, if(i==playerid), continue; since you will be giving the money OUT of the loop.
Reply
#9

I don't understand sorry, CAn you make it with my cmd. thanks.

PHP код:
CMD:ar(playeridparams[])
{
    new 
rangepass 0vehiclepass 0wantedpass 0dutypass 0eventpass 0arrestpass 0;
    if((
gettime() - 5) < TimerInfo[playerid][CMD_timer30]) return SendClientMessage(playeridRED"Please wait before using this command again.");
    if(
GetTeam{playerid} == CLASS_CIV || GetTeam{playerid} == CLASS_MEDIC) return SendClientMessage(playeridRED"Only law enforcement can arrest players.");
    if(
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playeridRED"You cant arrest players from a vehicle.");
    foreach(
Playeri)
    {
        if(
== playerid) continue;
        new 
Float:xFloat:yFloat:z;
        
GetPlayerPos(ixyz);
        new 
Float:hp;
        
GetPlayerHealth(ihp);
        if(
hp 0.0)
        if(
IsPlayerInRangeOfPoint(playerid7.0xyz) && GetPlayerInterior(playerid) == GetPlayerInterior(i) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
        {
             
rangepass++;
            if(
GetPlayerWantedLevel(i) >= 4)
            {
                
wantedpass++;
                if(!
IsPlayerInAnyVehicle(i))
                {
                    
vehiclepass++;
                    if(
IsOnduty{i} == 0)
                    {
                        
dutypass++;
                        if(
IsAtEvent{i} == 0)
                        {
                            
eventpass++;
                            if(
HasBeenArrested{i} == false)
                            {
                                
arrestpass++;
                                if(
GetTeam{playerid} == CLASS_COPS)
                                {
                                    
PlayerInfo[i][pArrests] ++;
                                    
TogglePlayerControllable(ifalse);
                                    
GameTextForPlayer(i"~r~Arrested!"30005);
                                    
format(fstrsizeof(fstr), "Officer %s (%d) has just arrested you."GetName(playerid), playerid);
                                    
SendClientMessage(iCOLOR_AQUAfstr);
                                    
GameTextForPlayer(playerid,"~w~Suspect ~g~Arrested.",5000,5);
                                    
SetPlayerScore(playeridGetPlayerScore(playerid) + 1);
                                    new 
pay random(10000) + 5000;
                                    
GivePlayerCash(playeridpay);
                                    
PlayerInfo[playerid][pTakedowns] ++;
                                    
ApplyAnimation(playerid"ped""ARRESTgun"4.101111);
                                    
format(fstr2sizeof(fstr2), "%s (%d) has been arrested by Officer %s (%d)"GetName(i), iGetName(playerid), playerid);
                                    
SendClientMessageToAll(COLOR_AQUAfstr2);
                                    
SetPlayerScore(iGetPlayerScore(i) - 1);
                                    
SetPlayerSpecialAction(iSPECIAL_ACTION_HANDSUP);
                                    
SetTimerEx("SendPlayerToJail"2000false"d"i);
                                    
HasBeenArrested{i} = true;

                                     break;
                                }
                                else if(
GetTeam{playerid} == CLASS_CIA)
                                {
                                    
PlayerInfo[i][pArrests] ++;
                                    
TogglePlayerControllable(ifalse);
                                    
GameTextForPlayer(i"~r~Arrested!"30005);
                                    
SendClientMessage(iCOLOR_AQUA"You have been arrested by a Undercover CIA Agent.");
                                    
GameTextForPlayer(playerid,"~w~Suspect ~g~Arrested.",5000,5);
                                    
SetPlayerScore(playeridGetPlayerScore(playerid) + 1);
                                    new 
pay random(10000) + 5000;
                                    
GivePlayerCash(playeridpay);
                                    
PlayerInfo[playerid][pTakedowns] ++;
                                    
ApplyAnimation(playerid"ped""ARRESTgun"4.101111);
                                    
format(fstrsizeof(fstr), "%s (%d) has been arrested by a Undercover CIA Agent."GetName(i), i);
                                    
SendClientMessageToAll(COLOR_AQUAfstr);
                                    
SetPlayerScore(iGetPlayerScore(i) - 1);
                                    
SetPlayerSpecialAction(iSPECIAL_ACTION_HANDSUP);
                                    
SetTimerEx("SendPlayerToJail"2000false"d"i);
                                    
HasBeenArrested{i} = true;

                                     break;
                                }
                                else if(
GetTeam{playerid} == CLASS_FBI)
                                {
                                    
PlayerInfo[i][pArrests] ++;
                                    
TogglePlayerControllable(ifalse);
                                    
GameTextForPlayer(i"~r~Arrested!"30005);
                                    
SendClientMessage(iCOLOR_AQUA"You have been arrested by a Undercover FBI Agent.");
                                    
GameTextForPlayer(playerid,"~w~Suspect ~g~Arrested.",5000,5);
                                    
SetPlayerScore(playeridGetPlayerScore(playerid) + 1);
                                    new 
pay random(10000) + 5000;
                                    
GivePlayerCash(playeridpay);
                                    
PlayerInfo[playerid][pTakedowns] ++;
                                    
ApplyAnimation(playerid"ped""ARRESTgun"4.101111);
                                    
format(fstrsizeof(fstr), "%s (%d) has been arrested by a Undercover FBI Agent."GetName(i), i);
                                    
SendClientMessageToAll(COLOR_AQUAfstr);
                                    
SetPlayerScore(iGetPlayerScore(i) - 1);
                                    
SetPlayerSpecialAction(iSPECIAL_ACTION_HANDSUP);
                                    
SetTimerEx("SendPlayerToJail"2000false"d"i);
                                    
HasBeenArrested{i} = true;

                                     break;
                                }
                                else if(
GetTeam{playerid} == CLASS_ARMY)
                                {
                                    
PlayerInfo[i][pArrests] ++;
                                    
TogglePlayerControllable(ifalse);
                                    
GameTextForPlayer(i"~r~Arrested!"30005);
                                    
SendClientMessage(iCOLOR_AQUA"You have been arrested by a  Army Soldier.");
                                    
GameTextForPlayer(playerid,"~w~Suspect ~g~Arrested.",5000,5);
                                    
SetPlayerScore(playeridGetPlayerScore(playerid) + 1);
                                    new 
pay random(10000) + 5000;
                                    
GivePlayerCash(playeridpay);
                                    
PlayerInfo[playerid][pTakedowns] ++;
                                    
ApplyAnimation(playerid"ped""ARRESTgun"4.101111);
                                    
format(fstrsizeof(fstr), "%s (%d) has been arrested by a Army Soldier."GetName(i), i);
                                    
SendClientMessageToAll(COLOR_AQUAfstr);
                                    
SetPlayerScore(iGetPlayerScore(i) - 1);
                                    
SetPlayerSpecialAction(iSPECIAL_ACTION_HANDSUP);
                                    
SetTimerEx("SendPlayerToJail"2000false"d"i);
                                    
HasBeenArrested{i} = true;

                                     break;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    if(
rangepass == 0)
    {
        
SendClientMessage(playeridRED"No wanted players in range.");
    }
    else if(
wantedpass == 0)
    {
        
SendClientMessage(playeridRED"No wanted players in range.");
    }
    else if(
vehiclepass == 0)
    {
        
SendClientMessage(playeridRED"No wanted players in range.");
    }
    else if(
dutypass == 0)
    {
        
SendClientMessage(playeridRED"No wanted players in range.");
    }
    else if(
eventpass == 0)
    {
        
SendClientMessage(playeridRED"No wanted players in range.");
    }
    else if(
arrestpass == 0)
    {
        
SendClientMessage(playeridRED"No wanted players in range.");
    }
    new 
astring[100];
    
format(astringsizeof(astring),"%s (%d) typed: /ar"GetName(playerid), playerid);
    
SendAdmin1Message(GREYastring);
    return 
true;

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)