24.03.2013, 02:12
This is at the top of the script.
This is a stock below, but mainly concentrate at the "RankLabel" stuff.
pawn Код:
new Text3D:RankLabel[MAX_PLAYERS];
This is a stock below, but mainly concentrate at the "RankLabel" stuff.
pawn Код:
stock SetRank3DText(playerid)
{
new text[128], Float: XYZ[3];
GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
Delete3DTextLabel(RankLabel[playerid]);
if(aDuty[playerid] == 1 && AFK[playerid] == 1)
{
format(text, sizeof(text), "Administrator on duty and AFK\nDo not damage!");
RankLabel[playerid] = Create3DTextLabel(text, 0x15FF00AA, XYZ[0], XYZ[1], XYZ[2]+0.5, 100.0, 0, 0);
}
else if(aDuty[playerid] == 1)
{
format(text, sizeof(text), "Administrator on duty\nDo not damage!");
RankLabel[playerid] = Create3DTextLabel(text, 0x15FF00AA, XYZ[0], XYZ[1], XYZ[2]+0.5, 100.0, 0, 0);
}
else if(AFK[playerid] == 1)
{
format(text, sizeof(text), "AFK");
RankLabel[playerid] = Create3DTextLabel(text, 0x2143DBFF, XYZ[0], XYZ[1], XYZ[2]+0.5, 100.0, 0, 0);
}
else
{
format(text, sizeof(text), "%s\n%s", RankName(playerid), ClassName(playerid));
RankLabel[playerid] = Create3DTextLabel(text, TeamColor(playerid), XYZ[0], XYZ[1], XYZ[2]+0.5, 100.0, 0, 0);
}
Attach3DTextLabelToPlayer(RankLabel[playerid], playerid, 0.0, 0.0, 0.5);
return 1;
}