You're making a RolePlay server, am I right?
Listen, making of RP script is HARD, and as far as I see in your posts, you don't know pretty much about scripting.
@topic:
You just want a simple variable that store a load of a truck (e.g. in percents), or it must be something more complex?
Yeah, but you can't do it directly, since playSound is client-side.
These functions will do the trick:
AddEvent
AddEventHandler
PlaySound
TriggerClientEvent
I tested the resource, and it works. The thing is, it work only in Patriot.
local guns =
{
[470] =
{
["xPosOffset"] = 1.0,
["yPosOffset"] = 0,
["zPosOffset"] = 0
}
}
Is the definition of allowed vehicle ids (Patriot is 470), with position of the minigun on it. You can simply allow more vehicles, by providing their ids.
And here, we see the use of requested in suggestions forum bounding box for images. You should then create one sprite image, and save ~230KB, then alter it with bounding box.
Signing for bounding box for dxDraw. You've done it for text already, so I think it will be possible. It gives a lot of possibilities.
Recoloring can be done with client_anim properly tweaked
And for sound, I think it can be useful, but this isn't a priority, cuz you can extract them from original data, but you can't clip images in any way.