definition: togRPName[MAX_PLAYERS],
command:
if(strcmp(cmd,"Name",true) == 0)
{
if(togRPName[playerid] != 1){
format(userlabelstring,sizeof(userlabelstring),"-"
UserText3D[playerid] = Create3DTextLabel(userlabelstring,0x008080FF,0.0, 0.0, 0.7,MAX_STREAM_NAME_DISTANCE,0,7);
Attach3DTextLabelToPlayer(UserText3D[playerid],playerid,0.0,0.0,0.7);
SendClientMessage(playerid, GRAU, "Du hast deinen Namen für andere Spieler sichtbar gemacht."
UpdateHPBar(playerid);
togRPName[playerid] = 1;
}
else{
Delete3DTextLabel(UserText3D[playerid]);
SendClientMessage(playerid, GRAU, "Du hast deinen Namen für andere Spieler unsichtbar gemacht."
togRPName[playerid] = 0;
}
return 1;
}
ForEachPlayer(playerid)
{
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && togRPName[playerid] == 1)
{
if(GetPVarInt(playerid,"Eingeloggt&WCF_AMPERSAND" == 1)
{
UpdateHPBar(playerid);
}
}
}
togRPName[playerid] = 0;