-
Posts
1,461 -
Joined
-
Last visited
-
Days Won
34
Everything posted by DiSaMe
-
The script gets coordinates in front of the player and sets element velocity to move to that position. Element data is used to to link the player and another element which the player holds. That didn't need much work
-
Unlike ped functions, ped events don't work for players. Use player events instead.
-
It's not better. SA-MP doesn't even import custom models. Everything it has is client modding the game. It's easily possible to do with .bat files. SA-MP doesn't have what MTA has: loading models directly into the game process. That doesn't need any modding of game files and what's more, objects can be replaced anytime. So if you want to have original and custom models together, you can make a custom model streamer.
-
This is not related to tocolor function. tocolor actually returns 32bit signed integer, so if the value is bigger than 0x7FFFFFFF, it's negative. Therefore if color value is 0x80000000 or more, you need to subtract 0x100000000 from it to get a value which dx functions can understand.
-
If you make a script which reads rec files, then yes, but it looks like there's no rec file format description. But why to use it rather than making your own recording/playing script with your own format? And you can also make the NPC perform real actions with setPedControlState. When bot is playing the recording in SA-MP, it cannot be physically affected (for example, hitting the car won't change its speed). In MTA, bots can be physically affected, so it's more realistic.
-
If you want object movement made client-side be visible for all players, then do it for all players. MTA doesn't need to have a function for attaching elements to bones. You can already make it yourself. Actually, it would be better to create such attaching system and then use it for helmet. Attaching system could be done in this way: Attachments would be set by changing element data. Something like: setElementData(object,"attached_player",player) setElementData(object,"attached_boneid",boneid) This could be done server-side. Then in client side onClientRender you could loop through all objects, check attachment data and if it exists, get the position of player bone and put an object there. And after creating attachments system, you could use it for helmets. What's more, you could use it for other stuff without the need to rewrite the code.
-
If you are using MTA SA 1.0.4, then setObjectScale is not available server-side. You either need to set object scale client-side or switch to unstable nightly builds of MTA SA 1.1.
-
Yes
-
You have an unused argument for function stahlhelm which overrides the global variable. Remove that argument.
-
helm is a local variable of lolmao function, so stahlhelm isn't aware of it. If you stored helmet element into zahl variable, you could use this variable to set element position. Also, it is unknown what player variable in stahlhelm function is. You could use setElementData on helmet to store player element and getElementData to get the value client-side.
-
By scripting.
-
You can create the object server-side and set its position client-side for every player. Though I don't know if that will work in 1.1 as dynamic objects are synced. If position of static objects is synced too, then MTA may override the position which is set by the script.
-
SCM are GTA scripts which the game uses for missions, shops, etc. They are in main.scm and script.img files. CLEO mods are SCM scripts too. MTA doesn't use them because they're not synced and everything can be scripted with Lua and MTA functions. In contrast, SA-MP uses SCM scripts. Because of that, shops, casinos and vending machines aren't controlled by server. Also, CLEO mods can be used for cheating.
-
I just compared bone IDs of MTA, SA-MP and GTA SA. I noticed that SA-MP uses the same bone IDs which are used in GTA SA SCM scripts. It seems like these bones have rotations and game uses them not only for object attachments, but also to calculate positions of vertices of the ped model itself. MTA function actually gets position of joints, not bones. List of joints is longer than list of bones and joints don't have rotations. I think function in MTA to get bone position and rotation would be possible, but still, calculating them from positions of joints is easy enough.
-
https://community.multitheftauto.com/index.php?p= ... ls&id=1292
-
setTimer needs the function and it's all fine about that. function() ... end is a function definition, while removeEventHandler is a variable which holds the function. I see where the real problem may be. If the function clientRenderLogo is defined after the timer is created, then it means that nil value was used as a parameter for removeEventHandler. So you need to move setTimer after the function definition. But if it's already done in this way, I don't know what is the problem.
-
No, not getPedWeaponSlot, but use a second parameter of getPedWeapon. Also, don't take away the weapons before saving them.
-
You're doing that in a wrong way. First, you load custom models and textures every second and don't unload them. Because of that, you may run out of RAM pretty fast. In your place, I would use a model ID for every animation frame. I would load the same DFF and COL on all of them and different TXDs on every model ID. Then I would create as many objects as there are frames, in the same position, and would show them one after another with setElementAlpha. I would also disable collisions for all but one model (but I would still replace COLs as they're used to detect whether the object is on the screen and should be rendered).
-
Yesterday I made a gravity gun script and today I recorded a video: . The script needs some improvements, and then maybe I will release the resource
-
MTA could support CLEO mods, but that's not so important - server owner who REALLY wants such things in the server could simply script them.
-
Do you mean that you want to make an object which is attached to the vehicle to move to another offset and remain attached? If so, then you can try using setElementAttachedOffsets in onClientPreRender and you will also need to interpolate the position between the beginning and the end of the movement. To make this server-side, you will need to use triggerClientEvent or other kind of server-client communication to move the object for everyone.
-
No. It's not a texture. It's a physical material which is used in game physics, for example, if the surface material is sand, it slows down the car. They also have different sounds (like walking on the cement and on the grass) and emit different particles (if you shoot the pavement, sparks are emitted, if you shoot the sand, dust particles appear).
-
It's the material which you can get with processLineOfSight from 1.1.
-
Coroutines work fine...