This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuaddEventHandler("onPlayerJoin", function(player) {
triggerClientEvent(player, "changeLabelText", "The text goes here");
});
addEventHandler("Script::ScriptLoad", function() {
local MyLabel = GUILabel();
addEvent("changeLabelText");
addEventHandler("changeLabelText", function(text) {
MyLabel.Text = text;
});
});
function onPlayerJoin(player) {
CGravity.join(player);
}
function onPlayerMove(player, lastX, lastY, lastZ, newX, newY, newZ) {
CGravity.processMove(player);
}
player.SetGravity(number gravity)
player.GetGravity(void)
function onPlayerCommand(player, cmd, text)
{
if ( cmd == "setgravity" ) {
if (!text) PrivMessage(player, "Use: /" + cmd + " <player/ID> <value>");
else {
local plr = FindPlayer(GetTok(text, " ", 1));
if (!plr) PrivMessage(player, "Invalid player.");
else {
local value = GetTok(text, " ", 2);
if (value == null) PrivMessage(player, "You must input a value.");
else if (!IsNum(value)) PrivMessage(player, "The value type must be integer|float.");
else {
plr.SetGravity(value.tointeger());
PrivMessage(player, "You've set " + plr.Name + "'s gravity to: " + value.tointeger() + ".");
}
}
}
}
}
/* GetTok() by KAKAN
https://pastebin.com/fLTXmNb6 */
function GetTok(string, separator, n, m = 0) {
n = n - 1;
m = m > 0 ? m : n + 1;
local tokenized = split(string, separator),
text = "";
if(n > tokenized.len() || n < 0 || m > tokenized.len()) return null;
tokenized = tokenized.slice(n, m);
return tokenized.reduce( function(prev, next) { return (prev + separator + next) });
}
[/spoiler]Label <- GUILabel();
Label.TextColour = Colour(255, 255, 255, 255);
Label.AddFlags(GUI_FLAG_TEXT_TAGS);
Label.FontFlags = GUI_FFLAG_BOLD;
Label.Text = "[#ff00ff]purple colored text";
//Example 2: "purple colored [#ff00ff]text";
Label.Text = "purple colored text";
orLabel.Text = "purple colored[#ffffff0] text";
Even putting a color or not, the text color will not change or will not change correctly.Quote from: Sebastian on Mar 18, 2021, 10:23 AM@Razor. did a custom radar, so maybe he can help.Well, first I used an original map sprite and then I resized it to the size that matches the radar in GTA V (that's right, the rectangular shape), after that I used the Sprite UV method, this method consists of cutting a sprite being able to use 4 corners of it being:
I assume you want a custom map like the one you access through Main Menu -> Map.
BottomRightUV = VectorScreen(X, Y)
TopLeftUV = VectorScreen(X, Y)
There's a better explanation made by @DMWarrior/editmode <on/off> --> Enable/Disabled edit mode
INSERT --> Show the object.
DELETE --> Hide the object.
BACKSPACE --> End the edition.
[/spoiler]