C
ocmd:suspect(playerid, params[])
{
new pID, string[128], reason[64];
if(sscanf(params, "us[64]", pID, reason))return SendClientMessage(playerid, COLOR_GREY, "Benutze: (/su)spect [SpielerID/Name] [Grund]");
if(!IsPlayerConnected(pID))return SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler ist nicht online.");
if(IsPlayerNPC(pID))return 1;
Spieler[pID][pWanteds] += 1;
j_SetPlayerWantedLevel(pID,Spieler[pID][pWanteds]);
format(string, sizeof(string), "Du hast ein Verbrechen begangen. (%s) Zeuge: %s", reason, SpielerName(playerid));
SendClientMessage(pID, COLOR_RED, string);
format(string, sizeof(string), "Dein aktuelles Wanted Level: %d", Spieler[pID][pWanteds]);
SendClientMessage(pID, COLOR_YELLOW, string);
format(string, sizeof(string), "HQ: %s (ID: %d) hat ein Verbrechen begangen: %s, over.", SpielerName(pID), pID, reason);
SendCopMessage(COLOR_COP_MELDUNG, string);
format(string, sizeof(string), "HQ: Zeuge: %s, Aktuelles Wantedlevel: %d, over.", SpielerName(playerid), Spieler[pID][pWanteds]);
SendCopMessage(COLOR_COP_MELDUNG, string);
return 1;
}
stock j_SetPlayerWantedLevel(playerid,wlvl)
{
if(wlvl > 0)
{
HideWantedStars(playerid);
pTextDraw[playerid][StarNumber] = CreatePlayerTextDraw(playerid, 520.000000, 103.000000, "12");
PlayerTextDrawBackgroundColor(playerid, pTextDraw[playerid][StarNumber], 255);
PlayerTextDrawFont(playerid, pTextDraw[playerid][StarNumber], 3);
PlayerTextDrawLetterSize(playerid, pTextDraw[playerid][StarNumber], 0.569999, 2.000000);
PlayerTextDrawColor(playerid, pTextDraw[playerid][StarNumber], -1);
PlayerTextDrawSetOutline(playerid, pTextDraw[playerid][StarNumber], 1);
PlayerTextDrawSetProportional(playerid, pTextDraw[playerid][StarNumber], 1);
new tdstring[32];
PlayerTextDrawShow(playerid,pTextDraw[playerid][StarNumber]);
TextDrawShowForPlayer(playerid,gTextDraw[LightStar1]);
format(tdstring, sizeof(tdstring), "%d", wlvl);
PlayerTextDrawSetString(playerid, pTextDraw[playerid][StarNumber], tdstring);
}
else if(wlvl == 0)
{
HideWantedStars(playerid);
}
return 1;
}
stock HideWantedStars(playerid)
{
TextDrawHideForPlayer(playerid,gTextDraw[LightStar1]);
PlayerTextDrawDestroy(playerid, pTextDraw[playerid][StarNumber]);
return 1;
}
Alles anzeigen
Der Stern (LightStar1) wird dauerthaft, wie gewollt, angezeigt. Die "StarNumber" aber nicht. Sie blinkt nur kurz auf und verschwindet sofort.