svText - Floating Text Creation -
SuperViper - 17.05.2012
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
Function | Action | Returns |
svText_Debug(bool: togDebug) | Toggles script debugging | 1 |
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 text | Text 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 player | Text ID |
svText_Destroy3DText(textID) | Destroys a floating text | 1 |
svText_IsValid3DText(textID) | Checks if the floating text ID exists | 0 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 player | 1 |
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 object | 1 |
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 vehicle | 1 |
svText_Detach3DText(textID) | Detaches a floating text from a vehicle, object, or player | 1 |
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 position | 1 |
svText_Adjust3DTextData(textID, text[], color = -1, size = -1, font[] = "-1", alignment = -1) | Modifies a floating text's data | 1 |
svText_BeginEditing3DText(playerid, textID) | Allows a player to edit a floating text with click & drag in-game | 1 |
svText_StopEditing3DText(playerid) | Takes a player out of floating text editing mode (native CancelEdit also works) | 1 |
Callbacks
Callback | Call 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
Version | Change |
Version 1.0 | Created the script |
Using
To begin using this include, drag the file to your
pawno > includes folder and put
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
Re: svText - Floating Text Creation -
seeeca - 17.05.2012
Screens / video ?
Re: svText - Floating Text Creation -
Niko_boy - 17.05.2012
some snaps or somthing will be good enough for more demonstartion .
A waving text? is it?
Re: svText - Floating Text Creation -
SuperViper - 17.05.2012
This is just the 0.3e SetObjectMaterialText feature, it's simply floating 3D text.
Re: svText - Floating Text Creation -
TheArcher - 17.05.2012
It attaches the text to an object? P.S Good work.
Respuesta: svText - Floating Text Creation -
Cacoby - 17.05.2012
nice work c:
pd: screens :3 xD
Re: svText - Floating Text Creation -
Hiddos - 17.05.2012
Good job! What's the default max amount of texts?
Re: svText - Floating Text Creation -
SuperViper - 17.05.2012
The default amount of text is MAX_OBJECTS divided by 5, which would be 200.
Re: svText - Floating Text Creation -
vIBIENNYx - 25.05.2012
This looks cool, can you please provide a screenshot of each type of text?
Re: svText - Floating Text Creation -
SuperViper - 25.05.2012
Quote:
Originally Posted by vIBIENNYx
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.