Jump to content

Captain Cody

Members
  • Posts

    2,753
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Captain Cody

  1. or one thing I have not really bothered to check if I know how, How I get the vehicles MaxSpeed, gears etc. using getVehicleHandling I just get a table, cannot figure out how to convert that table into maxspeed, accleration, gears, what not.
  2. I'm currently working on a tuning shop for my server, but the question I have is how I would go about changing the hex values. For set model handling stuff. Any idea on how I would be able to do this correctly?
  3. Could be an issue in an earlier part of the script.
  4. Improved FPS script I was running, currently working on camera locations for guns, probably going to make it so it gets either muzzle location, or bone location for hand and raises it up, and pushes it either forwards or backwards, will probably end up using hand location so all I would need to do is adjust Z
  5. well I already had that stuff put in, removed it due to testing. But the issue is, it's not creating the blips on other players
  6. Oh, well cannot help with compiled scripts sorry.
  7. What group system is it, or is it custom.
  8. Will be a bit till I do it, but will do.
  9. Trying to to make script that shows the police which players have wanted levels function wantedlevelstuff (thePlayera) local policeTeam = getTeamFromName("Police") local militaryTeam = getTeamFromName("Military") outputChatBox ( "Look for the yellow moving blips on map.", thePlayera ) local playersa = getElementsByType ( "player" ) for theKey,thePlayera in ipairs(playersa) do local levela = getPlayerWantedLevel ( thePlayera ) if ( levela > 0 ) then local wantedBlip = createBlipAttachedTo ( thePlayera, 56 ) setElementVisibleTo ( wantedBlip, root, false ) setElementVisibleTo ( wantedBlip, thePlayera, true ) end end end Attaches a blip to the person who triggers it, but no one else with wanted level
  10. Yeh ok, I made a FPS script for my server, I'll add the weapon camera things then upload here, I'll probably have it done by monday or so have alot of things I'm working on currently.
  11. Had another player join for testing, there is a bit of lag due to ping but sync is awesome now.
  12. Well I just set it up so it sets all the carts to who ever is syncing the train engine -- Checks every few secounds, works pretty good so far. And solved the park thing, added park command that disables the timers to check distances and sets all the speeds to 0 every few seconds to make sure the train stays stationary. - To sum it up, much more complicated then that.
  13. Well you have to link the client side event to the gui...
  14. --Client function hydra () triggerServerEvent ( "onHydraClick", resourceRoot ) outputConsole("A hydra has been spawned.") end
  15. Could put different camera locations depending on the weapon being used.
  16. How would I find the player with the lowest ping?
  17. I gave you example, fix the danm code yourself to suit your needs.
  18. Server Side function hydra () local accountname = getAccountName (getPlayerAccount(client)) <- From GUI if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then local x, y, z = getElementPosition ( client ) hydra = createVehicle ( 520, x, y, z ) warpPedIntoVehicle (client, hydra ) else outputChatBox ( "You must be admin to use this", client, 255, 255, 255, true ) end end rootElement = getRootElement() addEventHandler( "onHydraClick", rootElement, hydra) addEvent("onHydraClick", true) Client Side, triggers it. triggerServerEvent ( "onHydraClick", resourceRoot )
  19. Ok, I'll try something like that. and I accually managed to improve sync alot, by attaching objects "In this case colshapes" to the carts and having it get distance between the train colshape and cart colshape, for some reason if someone is in the cart you are getting distance of it messes it up, the object attached fixes that.
  20. Not the best video, but demonstrating basic capabilities of trains in MTA, One issue I am having is keeping the trains still at stations, due to the code constantly correcting the positions they are slowly moving back and forth as they are stopped. Using freeze element does nothing. Any ideas on how to do this?
  21. https://wiki.multitheftauto.com/wiki/SetTrainDirection
  22. Sorry didn't copy whole thing, search setTrainDirection
×
×
  • Create New...