Warum sehen alle Spieler das "wantedlabel"
Ganz oben im Script
new Text3D:wantedlabel;
und:
public OnPlayerStreamIn(playerid, forplayerid)
{
if(isPlayerInFrakt(forplayerid,1) || isPlayerInFrakt(forplayerid,2) || isPlayerInFrakt(forplayerid,10) || isPlayerInFrakt(forplayerid,7) || isPlayerInFrakt(forplayerid,8))
{
new string[128];
if(GetPlayerWantedLevel(playerid) ==1)
{
format(string, sizeof(string), "Wanteds: %d\nKills: %d\nGefängnis in Minuten: 5 Minuten", GetPlayerWantedLevel(playerid),GetPVarInt(playerid,"Kills"));
wantedlabel=Create3DTextLabel(string,COLOR_LIGHTRED,30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(wantedlabel, playerid, 0.0, 0.0, 0.7);
}
if(GetPlayerWantedLevel(playerid) ==2)
{
format(string, sizeof(string), "Wanteds: %d\nKills: %d\nGefängnis in Minuten: 10 Minuten", GetPlayerWantedLevel(playerid),GetPVarInt(playerid,"Kills"));
wantedlabel=Create3DTextLabel(string,COLOR_LIGHTRED,30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(wantedlabel, playerid, 0.0, 0.0, 0.7);
}
if(GetPlayerWantedLevel(playerid) ==3)
{
format(string, sizeof(string), "Wanteds: %d\nKills: %d\nGefängnis in Minuten: 20 Minuten", GetPlayerWantedLevel(playerid),GetPVarInt(playerid,"Kills"));
wantedlabel=Create3DTextLabel(string,COLOR_LIGHTRED,30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(wantedlabel, playerid, 0.0, 0.0, 0.7);
}
if(GetPlayerWantedLevel(playerid) ==4)
{
format(string, sizeof(string), "Wanteds: %d\nKills: %d\nGefängnis in Minuten: 30 Minuten", GetPlayerWantedLevel(playerid),GetPVarInt(playerid,"Kills"));
wantedlabel=Create3DTextLabel(string,COLOR_LIGHTRED,30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(wantedlabel, playerid, 0.0, 0.0, 0.7);
}
if(GetPlayerWantedLevel(playerid) ==5)
{
format(string, sizeof(string), "Wanteds: %d\nKills: %d\nGefängnis in Minuten: 45 Minuten", GetPlayerWantedLevel(playerid),GetPVarInt(playerid,"Kills"));
wantedlabel=Create3DTextLabel(string,COLOR_LIGHTRED,30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(wantedlabel, playerid, 0.0, 0.0, 0.7);
}
if(GetPlayerWantedLevel(playerid) >=6)
{
format(string, sizeof(string), "Wanteds: %d\nKills: %d\nGefängnis in Minuten: 60 Minuten", GetPlayerWantedLevel(playerid),GetPVarInt(playerid,"Kills"));
wantedlabel=Create3DTextLabel(string,COLOR_LIGHTRED,30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(wantedlabel, playerid, 0.0, 0.0, 0.7);
}
return 1;
}
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
DeletePlayer3DTextLabel(playerid,PlayerText3D:wantedlabel);
return 1;
}