Function SetPlayerCriminal(playerid,declare,reason[])
{
if(IsPlayerConnected(playerid))
{
PlayerInfo[playerid][pCrimes] += 1;
new turned[MAX_PLAYER_NAME];
new turner[MAX_PLAYER_NAME];
new turnmes[128];
new wantedmes[128];
new wlevel;
strmid(PlayerCrime[playerid][pAccusedof], reason, 0, strlen(reason), 255);
GetPlayerName(playerid, turned, sizeof(turned));
if (declare == 255)
{
format(turner, sizeof(turner), "Unbekannt");
strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
}
else
{
if(IsPlayerConnected(declare))
{
GetPlayerName(declare, turner, sizeof(turner));
strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
strmid(PlayerCrime[declare][pBplayer], turned, 0, strlen(turned), 255);
strmid(PlayerCrime[declare][pAccusing], reason, 0, strlen(reason), 255);
}
}
WantedLevel[playerid]++;
wlevel = WantedLevel[playerid];
format(turnmes, sizeof(turnmes), "Du hast ein Verbrechen begangen ( %s ). Zeuge: %s.",reason,turner);
SendClientMessage(playerid, COLOR_LIGHTRED, turnmes);
format(wantedmes, sizeof(wantedmes), "Momentanes Wantedlevel: %d", wlevel);
SendClientMessage(playerid, COLOR_YELLOW, wantedmes);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsACop(i))
{
format(cbjstore, sizeof(turnmes), "HQ: Alle Einheiten: Reporter: %s",turner);
SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
format(cbjstore, sizeof(turnmes), "HQ: Verbrechen: %s, Gesuchter: %s",reason,turned);
SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
}
}
}
}
}
Hallo ich habe eine Frage wie erstelle ich wen ein Spieler ein Spieler killt das er automatisch 2 Wanteds bekommt.
Die nachricht soll dann so aussehn.
Du hast ein Verbrechen begangen ( Mord. ) Zeuge: Niemand
Monentanes Wantedlevel: %d