Jump to content

KITT1995

Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by KITT1995

  1. I have created this script to do autologin by serial number. This is the code: function autoLogin() local serial = getPlayerSerial (source) if serial == "952E9E639B755C4E8010E55E67945635" then logIn (source, "test", "123456" ) end end addEventHandler("onPlayerJoin", root, autoLogin) When I join in (that is my serial), i get an error in the server log WARNING: autologin\script.lua:4: Bad argument @ 'logIn' [Expected account at argument 2, got string 'test'] Can someone help me? Thanks
  2. Ok then i fixed the script and now works like a sharm. For who want to know how to make a handling that works for all cars of the same model please see here https://wiki.multitheftauto.com/wiki/SetVehicleHandling. I putted an example at bottom of the page
  3. It doesn't work, I get this error "WARNING: replace\script3.lua:8: Bad 'property' pointer @ 'setVehicleHandling'(2)
  4. Can u please write the full script with only one handling value?
  5. Yes Where i need to write the handling values? I have 1.1
  6. I saw that function, but I don't know how to use it to give the handling to all cars of the same model (for example all infernus). Can someone please explain how to do this?
  7. I have a problem with this code function resourceStarted() local handling = createHandling() -- create a new handling element addDefaultHandling(getVehicleModelFromName("infernus"), handling) -- attach it to the Infernus ID handlingSetEngineAcceleration(handling, 50) -- change its acceleration property (thereby changing the acceleration of all Infernus cars) end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), resourceStarted) When i start the script i get an error in the server log "ERROR: replace\script3.lua:2: attempt to call global 'createHandling' (a nil value)". How I can fix this?
  8. It works!! But how I can put the text up to the screen? In freeroam the map that appear when u join the server, hide the text.
  9. Hi, I want to make script that show a TextDisplay when a player join (only to the player who join, not all player). I tried with this code but when a player join, the script give this error appear in the server log "WARNING: replace\script2.lua:3: Bad argument @ 'textDisplayAddObserver' This is the code of the script function showTextDisplay ( source, command ) local serverDisplay = textCreateDisplay() textDisplayAddObserver ( serverDisplay, source ) local serverText = textCreateTextItem ( "Downloading new vehicles!", 0.5, 0.0, 2, 0, 255, 255, 255, 5, "center", "top" ) textDisplayAddText ( serverDisplay, serverText ) setTimer ( textDestroyTextItem, 5000, 1, serverText ) setTimer ( textDestroyDisplay, 5000, 1, serverDisplay ) end addEventHandler ("onPlayerJoin", getRootElement(), showTextDisplay)
×
×
  • Create New...