27.06.2014, 00:31
Take a look at my post...
there's enough information in it to fix this...
EDIT:
there's enough information in it to fix this...
EDIT:
pawn Код:
//Top of the script
new color[MAX_PLAYERS];
new Text3D:playertextid[MAX_PLAYERS];
pawn Код:
public OnPlayerSpawn(playerid)
{
switch(GetPlayerTeam(playerid))
{
case 1: color[playerid] = (pInfo[playerid][pVip]) ? (0xB33100FF) : (0xFF4600FF);
case 2: color[playerid] = (pInfo[playerid][pVip]) ? (0x0066B3FF) : (0x0091FFFF);
case 3:
{
color[playerid] = (pInfo[playerid][pVip]) ? (0xFFD92EFF) : (0xFFE77AFF);
SetPlayerColor(playerid, color[playerid]);
}
case 4:
{
color[playerid] = (pInfo[playerid][pVip]) ? (0x339911FF) : (0x4ADE18FF);
SetPlayerColor(playerid, color[playerid]);
}
}
if(playertextid[playerid]) Delete3DTextLabel(playertextid[playerid]);
playertextid[playerid] = Create3DTextLabel(Ranks[GetPlayerRank(playerid)][rName], color[playerid], 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(playertextid[playerid], playerid, 0.0, 0.0, 0.5);
return 1;
}
pawn Код:
public OnPlayerRankChange(playerid, oldrank, newrank)
{
new fstr[100];
format(fstr, sizeof(fstr), (newrank >= oldrank) ? ("{1EA2D6}[Promoted] {FFFFFF}You are promoted from %s to %s !") : ("{1EA2D6}[Demoted] {FFFFFF}You are demoted from %s to %s !"), Ranks[oldrank][rName], Ranks[newrank][rName]);
SendClientMessage(playerid, green, fstr);
Update3DTextLabelText(playertextid[playerid], color[playerid], Ranks[newrank][rName]);
return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
if(playertextid[playerid]) Delete3DTextLabel(playertextid[playerid]);
return 1;
}