Jump to content

Kenix

Retired Staff
  • Posts

    4,121
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Kenix

  1. Use warpPedIntoVehicle with timer. Also /debugscript 3?
  2. Edit 'joinquit' resource.
  3. https://wiki.multitheftauto.com/wiki/Set ... onsEnabled ?
  4. Kenix

    setRadioVolume

    iPot You can request this function on bug tracker.
  5. Kenix

    setRadioVolume

    Because this function not exists.
  6. Создать объект -> приаттачить его к тачке ->двигать ?
  7. Tested function setVehicleEngineOff ( pVehicle, nLeftSeat, pJackerPlayer ) if nLeftSeat == 0 and not pJackerPlayer then -- turn off the engine outputChatBox ( "Press J to start the ".. getVehicleName ( pVehicle ) .."'s engine.", source, 255, 255, 0 ) setVehicleEngineState ( pVehicle, false ) end end addEventHandler ( 'onPlayerVehicleEnter', root, setVehicleEngineOff )
  8. On wiki already have example with this function. Just change to 'onPlayerVehicleEnter'
  9. Kenix

    ipairs and pairs

    ipairs loop only number indexes ( start from 1 index ) and only in order. pairs loop all. Examples (ipairs) -- Example 1 for n, s in ipairs{ 'new', 'next' } do -- { [1] = 'new', [2] = 'next' } is some print( n, s ) end --[[ 1 new 2 next ]] -- Example 2 for n, s in ipairs{ [1] = 'new', [3] = 'next' } do print( n, s ) end --[[ 1 new ]] -- Example 3 for n, s in ipairs{ [0] = 'new', [1] = 'next' } do print( n, s ) end --[[ 1 new ]]
  10. Kenix

    Help BuyMap

    /debugscript 3?
  11. Kenix

    Problem GUI

    No problem. Learn.
  12. Kenix

    Problem GUI

    Sure http://www.lua.org/manual/5.1/es/
  13. Kenix

    Problem GUI

    Yes. Learn lua! viewtopic.php?f=148&t=40809
  14. Kenix

    Problem GUI

    It's arguments ( GUIEditor_Grid[1], row1, column1 ). Not returned value! All your code wrong. You should learn lua. You not understand what you are doing! addEventHandler( 'onClientGUIClick', guiRoot, function( ) if source == GUIEditor_Grid[1] then local nRow = guiGridListGetSelectedItem( GUIEditor_Grid[1] ) if nRow ~= -1 then if nRow == 0 then triggerServerEvent( 'onCameraM1', localPlayer ) elseif nRow == 1 then triggerServerEvent( 'onCameraM2', localPlayer ) end end end end )
  15. Kenix

    Problem GUI

    Look in mta sources and you answer yourself this question. Read this First returned value is NUMBER of ROW. Second returned value is NUMBER of COLUMN.
  16. Kenix

    Godmode

    You not create this without timer.
  17. Kenix

    Problem GUI

    Maybe you need this guiGridListGetSelectedItem ?
  18. Kenix

    Problem GUI

    guiGridListAddRow return number value, not element. if source == row1 then This condition is not satisfied.
  19. Kenix

    little problem

    exports [ 'scoreboard' ]:addScoreboardColumn 'Group' setTimer ( function ( sPolice ) for _, pPlayer in ipairs ( getElementsByType 'player' ) do setElementData ( pPlayer, 'Group', tostring ( getElementData ( pPlayer, 'role' ) ) == tostring ( sPolice ) and 'Police' ) end end, 5000, 0, police ) Blazy your variable 'police' is defined?
  20. Because you copy-paste. It's cut code. I think you understood it. He wrote for you You not want learn. You like it?
×
×
  • Create New...