Jump to content

zapezel

Members
  • Posts

    3
  • Joined

  • Last visited

zapezel's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. function thisResourceStart () local players = getElementsByType ( "player" ) for _,this_player in ipairs(players) do bindKey ( this_player, "1", "down", stopEngine, "Lights on/off" ) end end This will not work if we don't write a event :>.like this without this when you will restart the resource or start when you have players that bindkey will not work.Else will work when a player join :> addEventHandler ("onResourceStart", getRootElement(), thisResourceStart)
  2. I don't know even all the words from english , I'm from Romania and my english lessons are very poor :-<. I need to replace "Light" with "motor or engine" ! Thanks a lot man ! I apreciate your help ! Regards from Zapezel Regards from Romania
  3. I'm begginer :"> .I made a script to stop the engine when i press a key but didn't work local root = getRootElement () local thisResourceRoot = getResourceRootElement(getThisResource()) function thisResourceStart () local players = getElementsByType ( "player" ) bindKey ( source, "1", "down", stopEngine, "Lights on/off" ) end addEventHandler ( "onResourceStart", thisResourceRoot, thisResourceStart ) function stopEngine ( player, key, state ) if ( getPedOccupiedVehicleSeat ( player ) == 0 ) then local vehicle = getPedOccupiedVehicle ( player ) if ( getVehicleEngineState ( vehicle ) == true ) then setVehicleEngineState ( vehicle, false) else setVehicleEngineState ( vehicle, true ) end end end
×
×
  • Create New...