19.07.2010, 05:46
You actually need to do a combination of what people have previously suggested.
Create your 3D labels (Create3DTextLabel) in OnGameModeInit:
Then once the player is logged in, presumably in OnPlayerConnect (or whenever IsPlayerDAdminByDeadly[playerid][Level] and IsPlayerDAdminByDeadly[playerid][pVip] will return correct values), attach the label to the player.
Create your 3D labels (Create3DTextLabel) in OnGameModeInit:
pawn Code:
label1 = Create3DTextLabel("HEAD ADMINISTRATOR",0x7CFC0075,30.0,40.0,50.0,40.0,0);
label2 = Create3DTextLabel("ADMINISTRATOR",0x7CFC0075,30.0,40.0,50.0,40.0,0);
label3 = Create3DTextLabel("MODERATOR",0x7CFC0075,30.0,40.0,50.0,40.0,0);
label4 = Create3DTextLabel("DONATOR",0x7CFC0075,30.0,40.0,50.0,40.0,0);
pawn Code:
switch(IsPlayerDAdminByDeadly[playerid][Level]) {
case 3: Attach3DTextLabelToPlayer(label1, playerid, 0.0, 0.0, 0.7);
case 2: Attach3DTextLabelToPlayer(label2, playerid, 0.0, 0.0, 0.7);
case 1: Attach3DTextLabelToPlayer(label3, playerid, 0.0, 0.0, 0.7);
default: {
if(IsPlayerDAdminByDeadly[playerid][pVip] == 0) {
Attach3DTextLabelToPlayer(label4, playerid, 0.0, 0.0, 0.7);
}
}
}