Jump to content

ViRuZGamiing

Members
  • Posts

    1,050
  • Joined

  • Last visited

Everything posted by ViRuZGamiing

  1. function turnEngineOff ( theVehicle, leftSeat, jackerPlayer ) -- if it's the driver who got out, and he was not jacked, if leftSeat == 0 and not jackerPlayer then -- turn off the engine setVehicleEngineState ( theVehicle, false ) end end -- add 'turnEngineOff' as a handler for "onPlayerExitVehicle" addEventHandler ( "onPlayerVehicleEnter", getRootElement ( ), turnEngineOff ) What Et-win said
  2. https://wiki.multitheftauto.com/wiki/Ge ... enPosition
  3. btw Belgium and The netherlands are in the world cup too
  4. didn't work or i didn't understand it quiet right
  5. Error; bad argument @ setVehicleColor (line 25 here) function previewTheCar () local theVehicle = getPedOccupiedVehicle ( getLocalPlayer() ) local driver = getVehicleController ( theVehicle ) vehColor = getVehicleColor ( theVehicle ) if ( getElementDimension (driver) == 0 ) then setElementDimension ( driver, 1 ) setElementDimension ( theVehicle, 1 ) fadeCamera(true) setCameraMatrix ( -1940.6650390625, 251.3447265625, 37.063766479492, -1936.1552734375, 246.1298828125, 34.4609375) closeButtonOnPreview = guiCreateButton(850, 1000, 350, 30, "Close", false) addEventHandler("onClientGUIClick", closeButtonOnPreview, cancelPreview) guiSetVisible (modWindow, false) addEventHandler("onClientGUIClick", colorList, setVehicleColorMod) end end function cancelPreview () guiSetVisible (modWindow, true) destroyElement (closeButtonOnPreview) if ( getElementDimension ( getLocalPlayer() ) == 1 ) then setElementDimension ( getLocalPlayer(), 0 ) setElementDimension ( getLocalPlayer(), 0 ) fadeCamera(false, 1) local theVehicle = getPedOccupiedVehicle ( getLocalPlayer() ) setVehicleColor ( theVehicle, vehColor ) end end
  6. did that but how 'bout the big problem?
  7. how do I set the selected color then? first time using gridlists.
  8. too bad it did not work, and it does too. I did the setVehicleColor(theVehicle, textData[2], textData[3], textData[4]) but the car gets set black instead of red.
  9. Okay i'm stuck so i'm going to post my full Client side code; How can I get the textData[2] and then use it as a setVehicleColor
  10. Thanks, that's pretty usefull too.
  11. haha thx for trying, maybe someone else can explain it who's more experienced on the "Tables and Loops" part. EDIT: Anyhow, thx Et-win you're loop worked fine. I would assume the data works the same.
  12. Okay i'll try to apply this in my code, Thank you. but can you explain just this part placeNumber, textData The reason I don't understand it is because it's nowhere in the code defined. like; placeNumber =
  13. Yes okay I understand what you are trying to say, I saw it in some examples on the Wiki too. but I don't quiet understand looping. it's something like; for i, v in ipairs (tables) do still if this right I don't understand it. What's the "i", the "v" and the "ipairs"? Thx in advance
  14. Hello, I'm not just going to ask to resolve my problem, because I probably will myself. I just would like an explanation of tables and how I get all the data from a table filled in a gridlist. as far as I know I need to use; --table creation first guiCreateGridList guiGridListAddColumn guiGridListAddRow guiGridListSetItemText --here's the problem, how to call the table? Regards ViRuZ
  15. he's probably just going to say it doesn't work, give working (or full) code. he doesn't know a addCommandHandler He doesn't deserve the script Twisted already gave if he's so demanding.
  16. ViRuZGamiing

    Skills

    Again I want, i've replied too your other post, check it and try to make it. but instead of asking I want start in the beginning and learn LUA. https://wiki.multitheftauto.com/wiki/Sc ... troduction
  17. "I want" immediately means Nope. No scripting requests, you can make it with; addEventHandler("onPlayerQuit", ....) getElementData and onPlayerJoin check for the data and set it back. addEventHandler("onPlayerJoin", ....) getElementData setElementData
  18. https://wiki.multitheftauto.com/wiki/Sc ... troduction No one will do it for free, trust me.
  19. Yes normally you can do this ingame /bind debugscript 3 anyway, thanks for trying
  20. Didn't work neither Client or Server
  21. Hi, as the title says is, is this possible? function activateDebug3 () if ( isDebugViewActive() ) then -- debug true else -- debug false end addCommandHandler("db3", activateDebug3) I want to shorten the debugscipt 3 command.
  22. the unbind is probably; unbindKey ( root, "F11", "both", --function) but what's the function name? EDIT: Found this but don't know if it's right; function disableMap ( ) toggleControl("radar", false) end addEventHandler ( "onClientResourceStart", resourceRoot, disableMap )
×
×
  • Create New...