14.02.2012, 17:30
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:
I put Admin Text to test, i'll change it to Health: %0.0f\n Armor: %0.0f when the system will work
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);
}
