Moin Jungs, ich habe ein Problem.
Unzwar habe ich eine Wantedanzeige über Spieler für Cops gescriptet, die sieht aber nur die playerid 0 (Cop) und kein anderer, wisst ihr vielleicht wieso?
Code:
for(new j = 0; j < MAX_PLAYERS; j++)
{
if(IsACop(j))
{
for(new suspect = 0; suspect < MAX_PLAYERS; suspect++)
{
if(LabelCreated[suspect] == 0 && WantedLevel[suspect] >= 1)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(suspect, name, sizeof(name));
format(ALLSTRING, sizeof(ALLSTRING), "[%d] %s\nWantedlevel: %d", suspect, name, WantedLevel[suspect]);
WantedLabel[suspect] = CreatePlayer3DTextLabel(j, ALLSTRING, 0xFF000FFF, 0.0, 0.0, 0.6, 30.0, suspect, INVALID_VEHICLE_ID, 0);
LabelCreated[suspect] = 1;
}
if(LabelCreated[suspect] == 1 && WantedLevel[suspect] >= 1)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(suspect, name, sizeof(name));
format(ALLSTRING,sizeof(ALLSTRING),"[%d] %s\nWantedlevel: %d", suspect, name, WantedLevel[suspect]);
UpdatePlayer3DTextLabelText(j, WantedLabel[suspect], 0xFF000FFF, ALLSTRING);
}
if(LabelCreated[suspect] == 1 && WantedLevel[suspect] == 0)
{
DeletePlayer3DTextLabel(suspect, WantedLabel[suspect]);
LabelCreated[suspect] = 0;
}
}
}
}
mfG, Nighthawk.