Huhu,
wenn ich jemanden Spectaten möchte, sehe ich nur den Strand...
Woran kann das liegen?
forward Spectaten(id);
public Spectaten(id)
{
if(Spectating[id] == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
TextDrawHideForPlayer(id, Textdraw0);
TextDrawHideForPlayer(id, Textdraw1);
TextDrawHideForPlayer(id, Textdraw2);
TextDrawHideForPlayer(id, Textdraw3);
TextDrawHideForPlayer(id, Textdraw4);
TextDrawHideForPlayer(id, Textdraw5);
TextDrawHideForPlayer(id, Textdraw6);
TextDrawHideForPlayer(id, Textdraw7);
TextDrawHideForPlayer(id, Textdraw8);
if(!IsPlayerConnected(i) || i == id)
{
i++;
}
TextDrawShowForPlayer(id, Textdraw0);
TextDrawShowForPlayer(id, Textdraw1);
TextDrawShowForPlayer(id, Textdraw2);
TextDrawShowForPlayer(id, Textdraw3);
TextDrawShowForPlayer(id, Textdraw4);
TextDrawShowForPlayer(id, Textdraw5);
TextDrawShowForPlayer(id, Textdraw6);
TextDrawShowForPlayer(id, Textdraw7);
TextDrawShowForPlayer(id, Textdraw8);
new Float:hp, string[126], string2[126], string3[126], string4[126], Float:armor, lvl;
GetPlayerHealth(i, hp);
GetPlayerArmour(i, armor);
lvl = GetPlayerScore(i);
format(string, sizeof(string), "Hp: %d", hp);
format(string3, sizeof(string3), "Armor: %d", hp);
format(string4, sizeof(string4), "Level: %d", lvl);
format(string2, sizeof(string2), "Name: %s", SpielerName(i));
TextDrawSetString(Textdraw7, string);
TextDrawSetString(Textdraw5, string2);
TextDrawSetString(Textdraw8, string3);
TextDrawSetString(Textdraw6, string4);
TogglePlayerSpectating(id, 1);
if(IsPlayerInAnyVehicle(i))
{
PlayerSpectateVehicle(id, i);
}
else
{
PlayerSpectatePlayer(id, i);
}
}
}
return 1;
}
Die Textdraws werden auch nicht angezeigt...
Kann es evtl. an PlayerSpectatePlayer liegen?