27.06.2011, 09:34
i put this OnPlayerSpawn
and i put this OnPlayerDeath
when i spawn with skinid 111, i got assault text, but when i changed skin to anti tank skin, i got double text, assault and anti-tank,,, the problem is i got doble even triple text on my head
pls help
Код:
if(GetPlayerSkin(playerid) == 111 || GetPlayerSkin(playerid) == 124 || GetPlayerSkin(playerid) == 70 || GetPlayerSkin(playerid) == 112 ) //assault { new Float:X, Float:Y, Float:Z; // GetPlayerPos floats GetPlayerPos(playerid, X, Y, Z); // Geting player pos label1[playerid] = Create3DTextLabel("Assault Soldier",COLOR_WHITE,X, Y, Z+2.0,20.0,1); Attach3DTextLabelToPlayer(label1[playerid],playerid,0,0,0.5); } if(GetPlayerSkin(playerid) == 287 || GetPlayerSkin(playerid) == 120 || GetPlayerSkin(playerid) == 68 || GetPlayerSkin(playerid) == 113) //anti-tank { new Float:X, Float:Y, Float:Z; // GetPlayerPos floats GetPlayerPos(playerid, X, Y, Z); // Geting player pos label2[playerid] = Create3DTextLabel("Anti-Tank",COLOR_GREEN,X, Y, Z+2.0,20.0,1); Attach3DTextLabelToPlayer(label2[playerid],playerid,0,0,0.5); } if(GetPlayerSkin(playerid) == 285 || GetPlayerSkin(playerid) == 294 || GetPlayerSkin(playerid) == 59 || GetPlayerSkin(playerid) == 114) //Support Squad { new Float:X, Float:Y, Float:Z; // GetPlayerPos floats GetPlayerPos(playerid, X, Y, Z); // Geting player pos label3[playerid] = Create3DTextLabel("Support Squad",COLOR_RED,X, Y, Z+2.0,20.0,1); Attach3DTextLabelToPlayer(label3[playerid],playerid,0,0,0.5); }
Код:
DeletePlayer3DTextLabel(playerid, PlayerText3D:label1[playerid]); DeletePlayer3DTextLabel(playerid, PlayerText3D:label2[playerid]); DeletePlayer3DTextLabel(playerid, PlayerText3D:label3[playerid]);
pls help