-
Posts
1,461 -
Joined
-
Last visited
-
Days Won
34
Everything posted by DiSaMe
-
I've thought about making a delayed reaction to key presses too, but this was a script with only visual effects.
-
I made another script which uses screen sources: . I think it's the most realistic of all drunk effects ever made on GTA SA, but because I've never been drunk, I'm not sure if it's realistic enough Edit: if the video is blocked for you, try this:
-
To solve the problems with rotation, you can use getElementMatrix function. With element matrix it's easy to get coordinates of the point with the same offset from the object, no matter how it's rotated. For example, if you want to get position of point which is (2, 3, 4) from element in variable "obj", you need something like this: local m = getElementMatrix(obj) local x = 2*m[1][1]+3*m[2][1]+4*m[3][1]+m[4][1] local y = 2*m[1][2]+3*m[2][2]+4*m[3][2]+m[4][2] local z = 2*m[1][3]+3*m[2][3]+4*m[3][3]+m[4][3] Coordinates of three vectors (m[1], m[2], m[3]) are multiplied by coordinates relative to object (2, 3, 4) and another vector (m[4], which is element position) is added to them. So if you get coordinates in this way, the script will check the same part of the object whatever its rotation is.
-
setElementSyncer can only set syncer who is near enough to the element. So you need to sync it yourself. You can send train position data from client to server using triggerServerEvent and use that data server-side to set position of the train. Train will need to be always synced for the syncing player, so don't forget to use setElementStreamable.
-
SA-MP cannot replace TXDs, DFFs and COLs, so all you can do is putting the collision file into custom.img and telling the players to download it. Changing files every time you join another server is too much, compared to MTA SA, where models are downloaded, applied and restored back to original ones automatically.
-
I see nothing wrong with this. I have a better question: how can people expect everything to be given to them for free?
-
You can't. If the resource runs on the server, it runs for every player, otherwise it doesn't run for anyone.
-
Can't get a static image to work for all the players
DiSaMe replied to TheMtaUser555's topic in Scripting
triggerClientEvent triggerServerEvent These functions allow server and client scripts to communicate. Make a server-side command which triggers your custom client-side event (create this event with addEvent) and make that event cause the image to be created. -
A basic traffic script does not require much effort. In my opinion, the trickiest part to do is proper driving, and still, it shouldn't be difficult. Making paths everywhere takes some time, but that's not a big problem. For the beginning, a part of the map with traffic can be enough, after all. Also, traffic doesn't have to be dense. I think a small number of NPCs already makes the gameplay better and shouldn't use too much bandwidth. So the only reason we don't see NPC traffic in servers is because people don't want it so much.
-
Some things may be possible to script in other ways. For example, weapon damage can be set via properties, but it has always been possible to modify using player damage and weapon fire events too. Same with target range. So you can change them without changing anything what game understands as the skill.
-
Don't set everyone's weapon skill to maximum. Do this only for one person, as weapon properties depend on skill.
-
setElementPosition setElementRotation setElementVelocity setTrainDerailable onClientPreRender
-
And that will do nothing because onPlayerJoin has no parameters anyway. JR10 posted the correct script.
-
Yes, two players can play. It's like this: , but with screen split into two viewports for each player.
-
Then we also need events onPlayerTryToRebootComputer and onPlayerTryToWalkAwayFromComputer and some magical way to cancel them
-
This is the script which I made yesterday: . Inspired by Wojak's rear view mirror script
-
Well, if you're interested in object attachments to bones, you can use this resource: https://community.multitheftauto.com/index.php?p= ... ls&id=2540 . It has functions related to bone positions and rotations, including attaching function. The part which many scripters couldn't understand was bone rotations. getPedBonePositions only returns positions and not rotations. So I made the script which calculates rotations from positions of three bones.
-
SA-MP can remove GTA SA map objects, MTA isn't capable of this, though it's possible to workaround this by replacing object models with empty ones. Apart from this feature, everything possible in SA-MP is possible in MTA. Some things aren't directly available in MTA, but they can be scripted. For example, SA-MP has a function SetPlayerAttachedObject which attaches objects to player's bones. MTA has no such function. However, MTA has a function getPedBonePosition, so function for attaching objects to bones is scriptable. This requires a little bit more work, but is advantageous, as you don't have any limits (in SA-MP, maximum 10 objects can be attached) and you can do many other things you may think of (for example, ).
-
Voted and put the link on most of my MTA videos on Youtube
-
I mean, SA-MP server owners would still be able to convert maps, but they couldn't use custom model functionality and they would see what they are losing. If we do something that would not allow map converting at all, they will use the old version, so to change the situation, we need to use MTA features which SA-MP doesn't have.
-
Maybe we need to make a map editor which could be used not just to put objects, but to create new models too. Something like , but with more functionality. Then they couldn't convert maps to work properly with SA-MP, as it doesn't support custom models.
-
He doesn't want to replace texture of weapon model. He wants to change the HUD texture.
-
isObjectInACLGroup hasObjectPermissionTo