SA-MP Forums Archive
[Include] Movable3DText - With updates - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Movable3DText - With updates (/showthread.php?tid=382603)



Movable3DText - With updates - Swimor - 04.10.2012

Movable3DText - With updates

Hello samp programmers,
at 2010 TeraN release the basic if movable 3d text lebels.

Today I improved the include and added some new functions, as seen at the video.

Video
http://www.youtube.com/watch?v=ExbQQ...ature=*********

Screenshots





Credits
TeraN - Making the base
RaFaeL(me) - Improving the include

Natives
Код:
native CreateMoveable3DText(string[], speed, color, Float:distance, Float:x, Float:y, Float:z, virtualworld = -1, testLOS = 0);
native DeleteMoveable3DTextLabel(textid);
native AttachMoveable3DTextToVehicle(textid, vehid, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0);
native AttachMoveable3DTextToPlayer(textid, playerid, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0);
native UpdateMoveable3DTextLabelText(textid, string[], color, speed = 1);
Install
Where you including your includes:
Код:
#include <r3mt>
Now use how you want!

Usage
Here some test commands that i make:
Код:
if(!strcmp(cmd, "/Text", true)) {
	    new text[128];
		if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, 0xFF0000FF, "/Text [text]");

		new Float:Pos[3];
		if(IsPlayerInAnyVehicle(playerid))
		    GetVehiclePos(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2]);
		else
			GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);

        return CreateMoveable3DText(text, 1, 0xFF0000FF, 20.0, Pos[0], Pos[1], Pos[2], 0, 0);
	}
	if(!strcmp(cmd, "/aText", true)) {
	    new text[128];
		if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, 0xFF0000FF, "/aText [text]");

		new txtid = CreateMoveable3DText(text, 1, 0xFF0000FF, 20.0, 0.0, 0.0, 0.0, 0, 0);
		if(IsPlayerInAnyVehicle(playerid))
		    AttachMoveable3DTextToVehicle(txtid, GetPlayerVehicleID(playerid), 0.0, 0.0, 1.0);
		else
			AttachMoveable3DTextToPlayer(txtid, playerid, 0.0, 0.0, 0.0);

        return SendClientFormat(playerid, 0xFF0000FF, str, "text: %s id: %d", text, txtid);
	}
	if(!strcmp(cmd, "/uText", true)) {
	    new txtid, text[128];
		if(sscanf(params, "ds[128]", txtid, text)) return SendClientMessage(playerid, 0xFF0000FF, "/uText [ID] [text]");

		UpdateMoveable3DTextLabelText(txtid, text, 0xFF0000FF);

        return SendClientFormat(playerid, 0xFF0000FF, str, "text: %s id: %d", text, txtid);
	}
	if(!strcmp(cmd, "/dText", true)) {
	    new txtid;
		if(sscanf(params, "d", txtid)) return SendClientMessage(playerid, 0xFF0000FF, "/dText [ID]");

		DeleteMoveable3DTextLabel(txtid);

        return SendClientFormat(playerid, 0xFF0000FF, str, "id: %d", txtid);
	}
Important
* Max movable can be changed by:
Код:
#define MAX_MOVINGTEXT 100
* The script is remaked. I'm not own any rights on the idea only on the script!


Download
PasteBin: http://pastebin.com/wa9B03XZ

Original post: https://sampforum.blast.hk/showthread.php?tid=245191
Enjoy!



Re: Movable3DText - With updates - Niko_boy - 04.10.2012

oh this is cool and a new idea, i only thought of doing that with textdraw lol :P never thought with 3D teXt
thanks for it


Re: Movable3DText - With updates - DeadLy™ - 05.10.2012

Wow
Really Cool
Thx for it -=
+Rep