-
Posts
1,449 -
Joined
-
Last visited
-
Days Won
32
Everything posted by DiSaMe
-
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...
-
It's not even a CLEO mod...
-
So don't make the ped perform random actions on each client separately. Everything is fine with sync. I set tasks of peds server-side. Client sees those tasks and uses setPedControlState to perform it. Task is synced, so the result is the same for everyone. Even when there's some accuracy, it doesn't cause problems because position is synced too.
-
To get screen coordinates of some world position, use getScreenFromWorldPosition. Then you can use guiSetPosition to keep changing the position of the GUI, but as Solidsnake14 suggested, DX drawing functions are recommended.
-
Is this a suggestion? https://wiki.multitheftauto.com/wiki/CreatePed ...
-
By saying BB I mean bb.dff and bb.txd. I found it in the list of special skins in SA SCM documentation, Sanny Builder. I tried to use this model as a player skin and it worked.
-
There aren't such ped skins. There are only cutscene objects and there are no models which can work as skins. However, there is one skin which isn't included in MTA 1.1: fat Big Bear. Model name is BB and when I tried it, it worked fine as a player skin.
-
Is onPlayerTeamJoin a custom event? If yes, then you need to add it with addEvent and make sure it's triggered when the player joins the team, otherwise I don't know what you are doing
-
I don't know how exactly onPlayerTeamJoin event is triggered, but I guess second argument addEventHandler must be root. And argument of setElementModel must be player.
-
You skipped source element argument in addEventHandler. What's more, element argument in setElementModel is skipped too.
-
In SA-MP there's no function to simulate keypresses at all. And you can only make the bot drive by changing velocity of car or recording the actions and playing them back. That is possible in MTA too, but if you want them to actually drive, you need to simulate keypresses (what you can't do in SA-MP). Actually, it may be hard to make the bot drive properly, but making it simply follow the route isn't that difficult.
-
But then the bot will always drive in the same way and the car won't have physics. For example you won't be able to affect it by hitting it with your car. To make a driving bot: 1. Create a car and store it to a variable. 2. Create a ped and store it to a variable too. 3. Use warpPedIntoVehicle to put a ped into the car. 4. Use setPedControlState to make him drive. That's where you need to write the AI yourself.
-
I used to say SA-MP sucks, but not I don't. I think there's no need to do so. But I still say MTA is better. Why? Because everything possible in SA-MP is possible in MTA.