23.02.2013, 15:45
Hello,
I want if someone's hp is less then 10 it will give a red name.
That did I did wrong?
I want if someone's hp is less then 10 it will give a red name.
Код:
if(PlayerInfo[playerid][pHealth] < 10) { ShowNameTags(false); new playername2[24]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(playername2, sizeof(playername2), "%s", name); new Text3D:attachplayername = Create3DTextLabel(playername2, COLOR_RED, 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(attachplayername, playerid, 0.0,0.0,0.2); } else { ShowNameTags(false); new playername2[24]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(playername2, sizeof(playername2), "%s", name); new Text3D:attachplayername = Create3DTextLabel(playername2, COLOR_WHITE, 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(attachplayername, playerid, 0.0,0.0,0.2); }