[Include] svText - Floating Text Creation
#1

Introduction

This script allows you to spawn and control floating text (not 3D labels) text around the map and control it however you would like. This include requires your server to be running on 0.3e.


Functions

FunctionActionReturns
svText_Debug(bool: togDebug)Toggles script debugging1
svText_Create3DText(text[], color, Float: posX, Float: posY, Float: posZ, Float: rotX = 0.0, Float: rotY = 0.0, Float: rotZ = 0.0, size = 20, font[] = "Arial", alignment = 0)Creates a new floating textText ID
svText_CreatePlayer3DText(playerid, text[], color, Float: posX, Float: posY, Float: posZ, Float: rotX = 0.0, Float: rotY = 0.0, Float: rotZ = 0.0, size = 20, font[] = "Arial", alignment = 0)Creates a new floating text for a certain playerText ID
svText_Destroy3DText(textID)Destroys a floating text1
svText_IsValid3DText(textID)Checks if the floating text ID exists0 if it doesn't exist, otherwise 1
svText_Attach3DTextToPlayer(textID, playerid, Float: offsetX = 0.0, Float: offsetY = 0.0, Float: offsetZ = 0.0, Float: offsetRotX = 0.0, Float: offsetRotY = 0.0, Float: offsetRotZ = 0.0)Attaches a floating text to a player1
svText_Attach3DTextToObject(textID, objectid, Float: offsetX = 0.0, Float: offsetY = 0.0, Float: offsetZ = 0.0, Float: offsetRotX = 0.0, Float: offsetRotY = 0.0, Float: offsetRotZ = 0.0)Attaches a floating text to an object1
svText_Attach3DTextToVehicle(textID, vehicleid, Float: offsetX = 0.0, Float: offsetY = 0.0, Float: offsetZ = 0.0, Float: offsetRotX = 0.0, Float: offsetRotY = 0.0, Float: offsetRotZ = 0.0)Attaches a floating text to a vehicle1
svText_Detach3DText(textID)Detaches a floating text from a vehicle, object, or player1
svText_Move3DText(textID, Float: posX, Float: posY, Float: posZ, Float: speed = 1.0, Float: rotX = -1000.0, Float: rotY = -1000.0, Float: rotZ = -1000.0)Moves a floating text to a certain position1
svText_Adjust3DTextData(textID, text[], color = -1, size = -1, font[] = "-1", alignment = -1)Modifies a floating text's data1
svText_BeginEditing3DText(playerid, textID)Allows a player to edit a floating text with click & drag in-game1
svText_StopEditing3DText(playerid)Takes a player out of floating text editing mode (native CancelEdit also works)1

Callbacks

CallbackCall Time
svText_OnPlayerTouchText(playerid, textID)Called when a player touches a floating text
Script Settings

pawn Code:
#define MAX_TEXT MAX_OBJECTS/5
You shouldn't edit this unless you know what you're doing. This is the maximum amount of floating text that can be created.


Bugs and Suggestions

Please reply to this thread with your bug report or suggestion for the include. All of these posts will be reviewed carefully and dealt with.


Versions

The download links and the include itself will be updated occasionally.

Version 1.0 - Pastebin | Mediafire | Assembla Direct Download



Don't want to wait for updates?

I'm currently uploading all of my changes to an Assembla account. Assembla will be updated before updates are released. If you wish to get the files directly from Assembla, use SVN Checkout with this URL: https://subversion.assembla.com/svn/sv-libraries/

My latest updates to Assembla are below:




Changelog

VersionChange
Version 1.0Created the script

Using

To begin using this include, drag the file to your pawno > includes folder and put

pawn Code:
#include <svText>
at the top of your script.

Add the following code somewhere in your script:

pawn Code:
public svText_OnPlayerTouchText(playerid, textID)
{
    return 1;
}
Note: You will not need to use special functions for player-specific 3D text, just for creating it. All of the normal functions work on player-specific 3D text.


Credits

SuperViper - Creating the script
Reply
#2

Screens / video ?
Reply
#3

some snaps or somthing will be good enough for more demonstartion .
A waving text? is it?
Reply
#4

This is just the 0.3e SetObjectMaterialText feature, it's simply floating 3D text.
Reply
#5

It attaches the text to an object? P.S Good work.
Reply
#6

nice work c:

pd: screens :3 xD
Reply
#7

Good job! What's the default max amount of texts?
Reply
#8

The default amount of text is MAX_OBJECTS divided by 5, which would be 200.
Reply
#9

This looks cool, can you please provide a screenshot of each type of text?
Reply
#10

Quote:
Originally Posted by vIBIENNYx
View Post
This looks cool, can you please provide a screenshot of each type of text?
There's no type of text. It's realistic floating text (non 3D text label) using the new 0.3e SetObjectMaterialText functions.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)