13.04.2013, 10:17
Hey guys, I have a little problem with my Rank tag system. The problem is that if a player is a VIP and a Moderator it shows both of the labels and I just want one of them to be shown (Moderator). Same is if a player is a VIP, Moderator and an Admin, it shows the three of them, and I only want one to be shown (Administrator)
Here is the code:
Thanks in advance
Here is the code:
pawn Код:
#define RankLabel true
public OnPlayerSpawn(playerid)
{
#if RankLabel == true
if(PlayerInfo[playerid][pVIP] >= 1)
{
new Text3D:VIPtag;
VIPtag = Create3DTextLabel("VIP", COLOR_CYAN, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(VIPtag, playerid, 0.0, 0.0, 0.7);
}
else if(PlayerInfo[playerid][pMod] >= 1)
{
new Text3D:Modtag;
new Text3D:VIPtag;
Modtag = Create3DTextLabel("Moderator", COLOR_CYAN, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(Modtag, playerid, 0.0, 0.0, 0.7);
Delete3DTextLabel(VIPtag);
}
else if(IsPlayerAdmin(playerid))
{
new Text3D:Admintag;
new Text3D:Modtag;
new Text3D:VIPtag;
Admintag = Create3DTextLabel("Administrator", COLOR_CYAN, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(Admintag, playerid, 0.0, 0.0, 0.7);
Delete3DTextLabel(Modtag);
Delete3DTextLabel(VIPtag);
}
#endif