Arrest,pull over,and wanted level command.
#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


Messages In This Thread
Arrest,pull over,and wanted level command. - by craponnaruto - 19.08.2009, 08:20
Re: Illegal script*for cops and robbers* - by MenaceX^ - 19.08.2009, 08:29
Re: Illegal script*for cops and robbers* - by craponnaruto - 19.08.2009, 09:59
Re: Illegal script*for cops and robbers* - by Kyle - 19.08.2009, 10:24
Re: Illegal script*for cops and robbers* - by craponnaruto - 19.08.2009, 10:39
Re: Illegal script*for cops and robbers* - by Kyle - 19.08.2009, 10:53
Re: Illegal script*for cops and robbers* - by CAR - 19.08.2009, 11:30
Re: Illegal script*for cops and robbers* - by Kyle - 19.08.2009, 11:31
Re: Illegal script*for cops and robbers* - by Calgon - 19.08.2009, 13:44
Re: Illegal script*for cops and robbers* - by craponnaruto - 19.08.2009, 17:53

Forum Jump:


Users browsing this thread: 1 Guest(s)