Arrest,pull over,and wanted level command.
#1

I need to know how to make a script so that if a civilian with no wanted level does something illegal*ex:robs a bank*gets a higher wanted level.
Reply
#2

More info, define how the players get wanted level or what ever you need.
Reply
#3

I need a script so when a civilian does something illegal,his wanted level raises.Then a cop is able to pull him over.But if he is at a 5 star wanted level,he can be arrested.But if he doesn't have any wanted level he can't be pulled over or arrested.

Wanted Level = the stars on your screen
Reply
#4

Put this in when he does somthing illegal

SetPlayerWantedLevel(playerid,12);
Reply
#5

Now what would be the script so that if they're wanted level is 1-4 they can get pulled over and issued a ticket.
Reply
#6

Use common sence.

wanted = GetPlayerWantedLevel(playerid);

SetPlayerWantedLevel(playerid, wanted+2);

I Think
Reply
#7

how many levels is 1 star?
Reply
#8

4 ithink
Reply
#9

Near the top:
pawn Код:
new DEFINED_ROBBERY_AMOUNT = "69"
new WantedPlayer[MAX_PLAYERS];
pawn Код:
if (strcmp(cmd, "/robbank", true) == 0)
{
new wantedpl[MAX_PLAYER_NAME];
GetPlayerName(playerid, wantedpl, sizeof(wantedpl));
if(WantedPlayer[playerid] == 0)
{
format(string, sizeof(string), "%s has become a criminal, the player is at 1 star! Catch them!", wantedpl);
SendClientMessageToAll(0xFFFFFFAA, string);
WantedPlayer[playerid]++;
SetPlayerWantedLevel(playerid, 1);
GivePlayerMoney(playerid, DEFINED_ROBBERY_AMOUNT);
}
else if (WantedPlayer[playerid] >= 1 && WantedPlayer[playerid] < 6)
{
WantedPlayer[playerid]++;
SetPlayerWantedLevel(playerid, WantedPlayer[playerid]);
GivePlayerMoney(playerid, DEFINED_ROBBERY_AMOUNT);
format(string, sizeof(string), "%s has obtained another star, catch them! (Now at %d).", wantedpl, WantedPlayer[playerid]);
SendClientMessageToAll(0xFFFFFFAA, string);
}
else if(WantedPlayer[playerid] >= 6)
{
SendClientMessage(playerid, 0xFFFFFFAA, "You're the most wanted, run run run!");
}
}

OnPlayerDeath:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new murderedname[MAX_PLAYER_NAME];
new murderersname[MAX_PLAYER_NAME];
if(WantedPlayer[playerid] > 0)
{
GetPlayerName(playerid, murderedname, sizeof(murderedname));
GetPlayerName(killerid, murderersname, sizeof(murderers));
format(string, sizeof(string), "%s has slaughtered the Wanted Criminal %s.", murderersname, murderedname);
SendClientMessageToAll(0xFFFFFFAA, string);
}
}
Have fun.
Reply
#10

Thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)