Jump to content

DiSaMe

Helpers
  • Posts

    1,461
  • Joined

  • Last visited

  • Days Won

    34

Everything posted by DiSaMe

  1. DiSaMe

    Ped driver?

    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.
  2. 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.
  3. DiSaMe

    Bots

    Is this a suggestion? https://wiki.multitheftauto.com/wiki/CreatePed ...
  4. 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.
  5. 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.
  6. 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
  7. 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.
  8. You skipped source element argument in addEventHandler. What's more, element argument in setElementModel is skipped too.
  9. 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.
  10. 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.
  11. 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.
  12. Damn, I must have read it too quickly, because I don't remember myself getting drunk
  13. It's easily scriptable. Scripting with runcode: Done with some other vehicles:
  14. In the place which you specified in meta.xml, relative to the resource directory.
  15. What do you need that for? Maybe there is another way.
  16. SA-MP may be using GTA SA function to attach object to the bone which has no problems with rotation. But it's still possible to calculate accurate rotations on MTA. That only proves MTA is better because features which are available in SA-MP are scriptable in MTA. MTA doesn't have function to attach objects to bones, but you can script it. MTA doesn't have 3D labels, but you can script them. MTA doesn't have functions to record player actions and play them on NPCs, but you can script them
  17. There is. It's number of GTA units per 1/50 seconds. I'm not sure about GTA units, maybe they're metres, so element velocity x50 is m/s, x180 is km/h.
  18. AFAIK, setElementRotation only has visual effects on peds and players.
  19. Nowhere... It's not really playable because it's not synced.
  20. Word is made of separate objects which fly away after explosion.
  21. DiSaMe

    Falling

    Cancel the event only in certain conditions. I don't know what the attacker and weapon would be shown in the case of falling damage, but you can try outputting them and then use those conditions.
  22. Try changing sound min and max distance with getSoundMinDistance and getSoundMaxDistance.
  23. I don't know what about setElementID, but first you have to make sure that you are in the server when ped creation code is executed. In your script it's executed when the resource starts. Second, "start" event never gets triggered. Server tries to trigger it when the resource is starting and client-side script isn't running. Try putting the code into the command.
  24. If you want to make a list of coordinates, so that you will spawn at one position of multiple positions defined, you can do that in this way: spawn_pos = { {x1,y1,z1}, {x2,y2,z2}, ... } To get random coordinates: x,y,z = unpack(spawn_pos[math.random(#spawn_pos)]) And you can use x,y,z in spawnPlayer.
×
×
  • Create New...