Need help with Create3DTextLabel
#1

Hi everybody !

I need some help to create a new system on my Gamemode.

I explain it:

I want that a 3DTextLabel tells the name of the player (i Can do it easily) but the problem is that i want the 3DTextLabel to change only for one player when that player is on Admin Duty.

Example: My name is Jayceon McKinley, im a the Admin, next to me, there is Ryder Blind, so i see above his head: Ryder Blind(6) (6 is the ID of the player) i want to see:

Ryder Blind (6)
Health: his health
Armor: his armor

But only me and other admins on duty can see it, is it possible to do ? I have done this like that:

pawn Код:
new Float:Health;
    GetPlayerHealth(playerid,Health);
    new Float:Armor;
    GetPlayerArmour(playerid,Armor);
    new sStr[256];
    if(aDuty[playerid])
    {
        format(sStr, sizeof(sStr), "Admin Text: %s (%d)", NameUnder(playerid),playerid);
        Nom[playerid] = Create3DTextLabel(sStr, COLOR_WHITE, 30.0, 40.0, 10.0, 10.0, 0);
        Update3DTextLabelText(Nom[playerid],COLOR_WHITE, sStr);
    }
    else
    {
        format(sStr, sizeof(sStr), "%s (%d)", NameUnder(playerid),playerid);
        Nom[playerid] = Create3DTextLabel(sStr, COLOR_WHITE, 30.0, 40.0, 10.0, 10.0, 0);
        Update3DTextLabelText(Nom[playerid],COLOR_WHITE, sStr);
    }
I put Admin Text to test, i'll change it to Health: %0.0f\n Armor: %0.0f when the system will work
Reply
#2

You can show 3D labels only to all players, not only for one.
Reply
#3

Okey thx
Reply
#4

But you can create a 3D text label for a specific player.

Wiki:CreatePlayer3DTextLabel
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)