17.05.2012, 01:51
(
Last edited by SuperViper; 18/05/2012 at 03:40 AM.
)
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
Callbacks
Script Settings
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
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:
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
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 |
pawn Code:
#define MAX_TEXT MAX_OBJECTS/5
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
pawn Code:
#include <svText>
Add the following code somewhere in your script:
pawn Code:
public svText_OnPlayerTouchText(playerid, textID)
{
return 1;
}
Credits
SuperViper - Creating the script