-
Posts
1,461 -
Joined
-
Last visited
-
Days Won
34
Everything posted by DiSaMe
-
No, that one would need rescripting to work properly with multiple players.
-
I released 2 resources today and I don't think creating a separate topic for both of them is necessary ---------- Bone attachments ----------- Some people want to have function for attaching elements to player bones. getPedBonePosition doesn't return rotations. But it's not hard to get positions of three joins and calculate rotation using some simple calculations with matrices. If you're still to lazy, my resource can do that for you: https://community.multitheftauto.com/index.php?p= ... ls&id=2540 All you need to do is calling attachElementToBone to attach the element and detachElementFromBone to detach it. Look how well it works: .----------- Gravity gun ----------- Some people already know this because I made this a few months ago. I didn't feel like finishing and releasing it, but now I did. Download: https://community.multitheftauto.com/index.php?p= ... ls&id=2542 That old video:
-
No one has pushed me further than people requesting bone attachment functions. https://community.multitheftauto.com/index.php?p= ... ls&id=2540 . Video:
-
People wanted to have this function, but in such a long time, I haven't seen anyone make it themselves. So I decided to do something for them. Video: . Resource: https://community.multitheftauto.com/index.php?p= ... ls&id=2540 .
-
It has been possible to script for a long time - even before it was added in SA-MP. You simply need to get joint positions using getPedBonePosition and set object position to the same every frame. If you want the object to have the same rotation which bone has, you also need to get position of 1 or 2 more bones and use trigonometry to calculate rotations.
-
True, custom models system is a bit unstable. Also, even if engine functions affected native objects too, engineReplaceModel/engineRestoreModel could be called when the object is streamed in/out, so the current custom model behavior could still be scripted. Adding models on empty IDs would definitely be cool. I don't really know how DFF stuff works inside the game, but I will try to suggest a way which in my opinion would need the least job: first, MTA could increase the limit of item definitions (for example, to 65535). Then put some empty DFF on all unused slots. Scripters could add new models with same functions.
-
How does reinstalling MTA, restarting PC and updating DirectX affect the way in which key bindings from scripts work in MTA? This seems to be nothing else than map editor bug.
-
To test if the model was replaced correctly, create an object with that ID. If it has the custom model, it's replaced correctly. Model slot has custom DFF only if there's MTA object somewhere around. I tested this. When MTA object is streamed in, GTA native object has a custom model too, otherwise only MTA object has it.
-
Custom DFFs only affect objects created by MTA. They don't affect GTA native objects unless there's MTA object with the same model ID streamed in.
-
And it still won't work unless you move setTimer line to the end. Now a nil value is passed to setTimer because function is created after setTimer call.
-
To make the ped drive, you need setPedControlState.
-
Stack overflow often is a result of infinite recursion. I guess this isn't your full script. Maybe you used this line in onClientPlayerRadioSwitch? If yes, then setRadioChannel triggers another onClientPlayerRadioSwitch which calls setRadioChannel again, and so on. If you want to make the radio station always 0, use setRadioChannel when player enters the vehicle and cancel the event when radio switch is attempted.
-
Satchel charges are remote explosives which you can plant and detonate from a distance. There's no function for shooting bullets. You can use position and rotation of the weapon to get the coordinates in front of it, then get hit element/position with processLineOfSight and if it hits something, change element health. That's the main part. You can also add particles with effects function and dxDrawLine3D to make the bullet path visible.
-
It's possible to make such resource for MTA, but all features would have to be copied from the game, so that's a lot of work.
-
Model 22 isn't even a weapon. It's a ped. M4 model ID is 356.
-
Is it "double posting" to post a message a few days later from the last message? And now, the script problems: server-side function setTrain and client-side function getTrain trigger events, calling each other. That means the train position will be refreshed very fast, as the server asks for the new position right after it gets the previous. And the number of such cycles is increased every 5 seconds. That will make the game unplayable very soon. I will try to explain better what you need to do: 1. Make the server-side timer do NOTHING more than just triggering the client-side event (asking for position). 2. When server gets the position, the function called by setTrainPosition event should do NOTHING more than setting element positions. No event triggering.
-
Client-side physics (at least visual) can be implemented to move the ball in a more realistic way.
-
If you want to script the ped yourself: setPedControlState to make the ped walk. setPedCameraRotation to make the ped face the right direction. Also, remember that these are client-side functions, so you'll need some server-client communication to keep the ped actions synced. I'd recommend using element data for this (for example, to set the element which the ped will follow).
-
BinSlayer1 already wrote what's the solution. Use SetTime. You can make a timer which updates time every minute, that should be enough.
-
When the resource starts serverside, it hasn't started clientside yet. If event is triggered before the resource which adds it is downloaded, that will result in an error. Using a timer isn't reliable - you can't be sure that client will download the resource before the timer function gets executed. It's better to trigger server event onClientResourceStart, so the server knows the resource has started clientside, and then showDX can be triggered.
-
3. The light itself can't be synced, but you can disable horn control when player is in police heli and create your own light using custom models. 4. It's easy to get offset coordinates. X positive is the right, Y positive is the front, Z positive is the top. GTA units are metres. You can find coords in a few attempts.
-
Grass visibility depends on video settings, so it's up to players to choose if they want it or not.
-
Element data can be used to sync the ball position.
-
Prieš savaitę pavyko su asembleriu sukurti pirmąją veikiančią funkciją, kuri tiesiog pakeičia kintamojo reikšmę. Tada pabandžiau ir atskirų pixelių spalvinimo bei horizontalių linijų piešimo funkcijas sukurti - irgi pavyko. Ir daug greičiau veikia, nei ant C. Tai va, reikėtų susikurti funkciją, skirtą trikampių su tekstūrom piešimui, o iš trikampių jau viskas gali būti sudėliota. Tik nedidelė problema atsirado. Po kelių savaičių pertraukos neištvėriau ir grįžau prie Minecraft, žiauriai geras žaidimas, negaliu sustot ir skirti bent dalį laiko programavimui