Jump to content

ViRuZGamiing

Members
  • Posts

    1,050
  • Joined

  • Last visited

Everything posted by ViRuZGamiing

  1. Example: I create my car in 1 function and want to call it in another function function createCar () local car = createVehicle (.....) end Then another function where i want to call 'car' back... function callCar local driver = getVehicleOccupant ( car ) -- I want to call the 'car' from the other function if ( driver ) then ........ end end
  2. Yup works, Now I have local driver = getVehicleOccupant ( source ) if ( driver ) then but the source is created in another function do I need to re-create it in this function to work?
  3. Hi, I want to create a Showroom car but i'm afraid that people will push the car so how can I make it notMovable? Thanks in advance.
  4. Yes but i'm very bad at learning even at school and when I see how it's correct I learn from it + I learn my mistakes. So if I write a wrong script I get the wrong script in my head and I won't forget it because I learned that way first.
  5. Can you (Pain^) or someone else please just send a fixed version so I can see my mistakes and then learn from them? If I don't get something I will reply here
  6. Can I just do; function definePlayer (thePlayer) end addEventHandler("onResourceStart", definePlayer)
  7. + How should I arrange this, Forklifts and Crates needs to be the spawned forklift and spawned crate but in getElementPosition you need to fill in an ID. local x,y,z = getElementPosition ( forklifts ) local bx,by,bz = getElementPosition ( crates ) local fx,fy,fz = setElementPosition ( x+1,y,z+1 ) local boxCol = createColCircle ( bx, by, 2 ) local setDamage = setElementCollisionsEnabled ( crates, false )
  8. How should I define thePlayer?
  9. 1. Do I need to define commandName? 2. Isn't localPlayer and thePlayer automaticly defined by MTA? Or should I do local localPlayer = getLocalPlayer(player) and what for thePlayer? because thePlayer is server-side. You can use the predefined variable localPlayer instead of typing getLocalPlayer() 3. Should I use addEventHandler ( "onColShapeHit", boxCol, hitElement) With what function can I define hitElement? Maybe with a "if" that checks if there's a forklift in "boxCol"? Extra: I don't want to use addCommandHandler exept for the info command, everything else needs to be trigger by event.
  10. Tell me which? With this script i'm trying to understand more Events and stuff. Most of this is new to me.
  11. @TAPL how can I fix the Client onClientGuiClick?
  12. Okay i'm going to edit it and post it when it's fixed as far as I get it
  13. I want the Crates from the bottom lines in Client to spawn 1 random of all and if you drive close to it with the forklift (you enter the Crate's ColCircle) it puts the crate to a new position (on the Forklift) and you drive it to deliverMarker it destroys the Crate and gives you 50$ and spawns a new crate random spot
  14. -- Console Errors [17:55:29] WARNING: Forklift\server.lua:1: Bad argument @ 'createBlipAttachedTo' [17:55:29] WARNING: Forklift\server.lua:6: Bad argument @ 'createColCircle' [17:55:29] WARNING: Forklift\server.lua:9: Bad argument @ 'getElementPosition' [ Expected element at argument 1, got nil] [17:55:29] WARNING: Forklift\server.lua:75: Bad argument @ 'addEventHandler' [Ex pected element at argument 2, got nil]
  15. Yes I know that the weird thing I will send a new debug
  16. Still got some problems; /debugscript 3 Server I've changed my script so I have a server-side too but I did that after I took the screenshot of the debug IDK then new debug Please tell me whats wrong, Thanks Viruz
  17. No Problem, i found it because i'm using ATM
  18. Okay, I understand. I'll test it tomorrow
  19. Hello, My script doesn't work, no errors but debug says expect "(" at line 9 near jobScreenMenu
  20. You mean the Minimap (radar): https://community.multitheftauto.com/in ... ls&id=5555
  21. Isn't possible I guess... I saw this one; https://community.multitheftauto.com/index.php?p= ... ls&id=6287
  22. Indeed Example; addEventHandler("onText", function text outputChatBox("Hello World!", source) end ) addEvent("onText", true) If i'm right, bcuz i'm a noob scripter too
  23. You can try using a table with dimensions maybe...
  24. Thats the reason why i post it Sherlock, If it worked I didn't post it here... i'm hoping someone call help me and explain whats wrong not to tell me well thats bad.
×
×
  • Create New...