Also, man wird nicht spectatet, sondern das meer..
dan wird keine neue Zeile erstellt..
kein Name wird angezeigt...
kein Health,Armour,Geld angezeigt..
und es wird nicht geupdatet
ocmd:tv(playerid,params[])
{
new pID, Spec[MAX_PLAYERS] = 0,string[158];
if(!isPlayerAnAdmin(playerid,5)) return SendClientMessage(playerid,Rot,"Du bist kein Admin");
if(sscanf(params,"s",pID))return SendClientMessage(playerid,Gelb,"Benutze /tv [ID]");
if(Spec[playerid] == 0)
{
new Float:Health,money,Float:Armor,Name[MAX_PLAYER_NAME];
GetPlayerHealth(pID,Health);
money = GetPlayerMoney(pID);
GetPlayerArmour(pID,Armor);
GetPlayerName(pID,Name,sizeof(Name));
format(string,sizeof(string),"%s\nLeben: %f\nArmour: %f\nGeld: %d",Name,Health,Armor,money);
TextDrawSetString(SpecT[playerid],string);
TextDrawShowForPlayer(playerid,SpecT[playerid]);
Spec[playerid] = 1;
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, pID);
}
else
{
TextDrawSetString(SpecT[playerid],"Miep");
TextDrawHideForPlayer(playerid,SpecT[playerid]);
TogglePlayerSpectating(playerid, 0);
Spec[playerid] = 0;
}
return 1;
}