SA-MP Forums Archive
[HELP] Text 3D - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] Text 3D (/showthread.php?tid=512418)



[HELP] Text 3D - monster010 - 10.05.2014

I create a 3D text label to player, but the label show to all players on server, either admin or not ! Why?

pawn Код:
if (PlayerInfo[playerid][pAdmin] >= 1)
{
       new staff:label = Create3DTextLabel("ADMIN BL", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
       Attach3DTextLabelToPlayer(staff, playerid, 0.0, 0.0, 0.7);
}
I put this script at:
pawn Код:
public OnPlayerConnect(playerid)



Re: [HELP] Text 3D - Beckett - 10.05.2014

What you are doing is.

pawn Код:
if (PlayerInfo[playerid][pAdmin] >= 1) // IF THE PLAYER IS ADMIN (1+)
{
       new staff:label = Create3DTextLabel("ADMIN BL", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0); // THEN MAKE HIM A 3D TEXT
       Attach3DTextLabelToPlayer(staff, playerid, 0.0, 0.0, 0.7); // ATTACH IT TO HIM.
}
I don't think you can't restrict who can see the 3D Text.


Re: [HELP] Text 3D - Konstantinos - 10.05.2014

If you want only admins to be able to see the 3D label then use streamer and CreateDynamic3DTextLabelEx function.
pawn Код:
native Text3D:CreateDynamic3DTextLabelEx(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, Float:streamdistance = 100.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);