SA-MP Forums Archive
3d label update without moving is possible? (+REP) - 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: 3d label update without moving is possible? (+REP) (/showthread.php?tid=605145)



3d label update without moving is possible? (+REP) - Lirbo - 15.04.2016

There's a 3d label text that appears on the players with their HP in my server but it's kinda problem since the 3d label is being updated only when the player is moving (the player who watch the 3d label) there's a way to update it without moving? since if someone would shoot without moving it won't show him the correct string.


Re: 3d label update without moving is possible? (+REP) - Dokins - 15.04.2016

Use incognito's streamer and use

pawn Код:
CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_3D_TEXT_LABEL_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1);

Use the attach player parameter to attach it to a player.


Re: 3d label update without moving is possible? (+REP) - Lirbo - 15.04.2016

Quote:
Originally Posted by Dokins
Посмотреть сообщение
Use incognito's streamer and use

pawn Код:
CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_3D_TEXT_LABEL_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1);

Use the attach player parameter to attach it to a player.
That's the one i'm using


Re: 3d label update without moving is possible? (+REP) - Eyce - 15.04.2016

I'm not sure if this would work, but you can try. Make a timer to check if the player hasn't moved in a specific duration, if so - toggle him.

Something like:
pawn Код:
if(GetPVarInt(playerid, "AFK_Time") > 60) {
    TogglePlayerControllable(playerid, false);
    TogglePlayerControllable(playerid, true);
}