-
Posts
1,449 -
Joined
-
Last visited
-
Days Won
32
Everything posted by DiSaMe
-
Any more details? Did you extract the .zip file and put drawtag and drawtag_bc into resources folder? If you tried to use /draw and other commands, did you make sure the drawtag_bc was running?
-
There's no such event. You can try making a timer or a function attached to onClientRender/onClientPreRender and put this function: isElementInWater However, if I remember correctly, the last time I tried, it only returned true when the player was swimming. So if water only touches the legs of the player, the function returns false. If you want to detect this, try doing something with this function: testLineAgainstWater This is the way I detected it in my Lava flood script, take a look at its code if you're not sure how to do it. When players touch the lava, they take damage and start burning.
-
Try setVehicleDamageProof If you apply it after vehicle has started burning, it will continue to burn but won't explode.
-
Some programs can recover the data. Search for "recover deleted files" or something like that on google.
-
When I used Windows, I created two users and two instances of MTA worked when started from different users. But I needed to switch users to go from one instance to another. Now I use Ubuntu and Wine and if I want to run two instances of MTA, I start one normally and another with a different Wine prefix. This way I can see both MTA screens at the same time.
-
You need to set crouching control state to false after a short delay, so that it would be like pressing crouching button instead of holding it down.
-
You can't trigger events between clients without involving the server. Why would you need that, anyway? You see, it's not like the server exists for no reason. Its purpose is to let clients interact with each other.
-
Roleplay is nice, unless creator works more on writing rules instead of scripting. Unfortunately, that's the only way I've ever seen done. If players get hit by cars or shot, they must act as if they're injured. Why not to script that, like increasing weapon damage and enabling walking control state for players to make them move slowly? If they crash into the wall while driving, why do they have to simulate the accident instead of script reducing their health and turning off the engine of the car, so that it couldn't be driven? If it can be scripted, why should the players do that?
-
How to run MTA SA natively on Mac: 1. Get MTA SA source code 2. Modify all GTA SA memory addresses to match the ones in GTA SA for Mac 3. Modify parts of the code which use Windows functions to work on Mac 4. Compile 5. Play
-
I see no reason why setting control states on each client would be inefficient. The worst thing it could do is reducing FPS for players if there were many peds streamed in and there was some task requiring heavy calculations. Syncing control states directly, on the other hand, would require additional bandwidth.
-
I made a separate resource to create the paths. It's the resource which draws all paths in the beginning of the video. Tool creation part is usually the most boring, but I did it in a few days The sync shouldn't be a problem. Because all what is synced by the script is the task data, there's no need to manually sync control states. Clients use task data to set control states and control peds independently, so the result is the same or at least similar for everyone most of the time. When it isn't, it's still OK because MTA synchronizes positions anyway, making all clients see the same. What I'm not sure about is the server CPU usage. It works fine when I'm alone in the server, but it will probably slow down when there are many players all around the map. My script moves unsynced peds server-side too, and there may be a slowdown if it needs to move a few thousands of peds at the same time. And I just scripted simple collision checking. It prevents vehicles and peds from getting stuck inside each other when they're generated or moved server-side. Although the algorithm is pretty efficient, using it on thousands of peds may be slow. On the other hand, I'm going to make traffic density and collision checking controllable by the server. Even if such traffic like single player has turns out to be too much for a public server, a few peds here and there will be better than nothing
-
Did you read the code and try to understand what exactly it does?
-
Did you read and try to understand my post or did you copy and paste the code?
-
The problem about peds is that they don't keep animation data when they're streamed out for the client. This is the easiest workaround: local djPed = createPed (47,1984.86975,1526.91504,12.82) setPedRotation (djPed, 0) setTimer(setPedAnimation,1000,1,djPed, "DANCING", "dnce_M_c") This will apply animation 1 second after the ped has been created. During this time, the ped is likely to be streamed in for the player. But if you go far away, the ped will be streamed out and won't perform the animation when you go back. This is a more reliable way to make him dance: Server-side script: local djPed = createPed (47,1984.86975,1526.91504,12.82) setPedRotation (djPed, 0) setElementID(djPed, "djPed") Client-side script: function initPed() local djPed = getElementByID("djPed") addEventHandler("onClientElementStreamIn", djPed, makePedDance) end addEventHandler("onClientResourceStart", resourceRoot, initPed) function makePedDance() setPedAnimation(source, "DANCING", "dnce_M_c") end The server itself doesn't make the ped dance. Instead, it sets an identifier which the client uses to get the ped element. Then it makes the ped perform animation every time it's streamed in.
-
No, but I will release it at my scripts website. I don't want my works to be somewhere between thousands of works of other people
-
I think it is possible to find free scripters. If you have good scripting skills and have done something special, some people may want to join and form a team with you. But if you don't, then you won't do benefit for them and they're not going to work with you.
-
What's not simple? Downloading a resource? If it's hard, then scripting is going to be difficult for you anyway and there's nothing to simplify.
-
On the client, all peds streamed in are looped through onClientPreRender and their control states are updated, but it doesn't seem to make my PC lag any more than it already does when there are many peds and vehicles around On the server, generating peds slows down a little bit, but I know why exactly it does and how to optimize it and this happens because creating elements takes some time, so there's nothing I could do to optimize it And the bandwidth is something what i'm not sure about. I store tables with task parameters as element data to sync ped actions. Something like this: {"goToPoint",x,y,z}. Anyway, if something is wrong, reducing traffic density will help. Something is still better than nothing.
-
Here's a video about the script which I'm working on: Bots are generated around the players and disappear when they are far. Driving peds stop if there's a player, ped or a car in the front. They also stop when traffic lights are red Edit: new videos of released traffic and path editor scripts:
-
Technically you can't, but you can make MTA replace and restore models depending on player's position, so that one model is used on ID in one place and another model in another place. I don't know if that's stable enough, though. It didn't work well for me when I tried, but that was 2 years ago.
-
Use these functions: setPedControlState setPedAimTarget
-
According to http://gta.wikia.com/Unit , GTA unit IS meter.
-
Added lava flood script: