Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Tenes que usar un for-loop con getElementsByType.
  2. How you want to load something that doesn't exist? you aren't writting anything on the file, also, you should load them on start, not when you add it.
  3. I told you to start from scratch, you copied it, is full of errors. One big error: You don't use the "onClientGUIClick" event anywhere.
  4. Post the full code. P.S: Never name a function like a native MTA function ( setRadioChannel ), unless you want to replace it.
  5. You should start from 0, because the server side itself makes no sense.
  6. Whole server side is wrong. The events has to be client side, because GUI is only client side.
  7. Because it doesn't make any sense, you should go back to basics.
  8. What do you mean? it only spawned one for me.
  9. Hay un recurso en la comunidad, buscalo.
  10. Que servidor supero al mio? el que tenes en la firma? con 12 jugadores contra 100? creo que deberias volver al colegio a estudiar matematicas .
  11. That was because you used 'onClientDoubleClick' instead of 'onClientGUIDoubleClick'. Copy the code again, it works now.
  12. Wnd = guiCreateWindow ( 0.2, 0.2, 0.25, 0.5, "Police Vehicles", true ) guiSetAlpha( Wnd, 1 ) button = guiCreateButton ( 0.01, 0.8, 0.99, 0.15, "Close", true, Wnd ) label = guiCreateLabel ( 0.1, 0.1, 0.9, 0.1, "Double Click Vehicle to take it.", true, Wnd ) showCursor(false) guiSetVisible( Wnd, false ) guiWindowSetSizable( Wnd, false ) guiWindowSetMovable( Wnd, false ) vehicles = { {"HPV1000", 523}, {"Police LS", 596}, {"Police LV", 598}, {"Police Ranger", 599}, } grid = guiCreateGridList(0.01, 0.2, 0.99, 0.5, true, Wnd) guiGridListAddColumn(grid, "Vehicles", 0.85) for i,veh in ipairs(vehicles) do row = guiGridListAddRow(grid) -- guiGridListSetItemText(grid, row, 1, tostring(veh[1]), false, false) guiGridListSetItemData(grid, row, 1, tostring(veh[2])) end function use() local row, col = guiGridListGetSelectedItem(grid) if (row and col and row ~= -1 and col ~= -1) then local model = tonumber(guiGridListGetItemData(grid, row, 1)) if model ~= "" then triggerServerEvent("CreVehiceP", localPlayer, model) end end end addEventHandler("onClientGUIDoubleClick", grid, use, false) function close() if (source == button) then guiSetVisible(Wnd,false) showCursor(false) end end addEventHandler("onClientGUIClick", button, close, false) function showGUI6p() guiSetVisible(Wnd,true) showCursor(true) end addEvent("showGUI6p",true) addEventHandler("showGUI6p", getRootElement(), showGUI6p)
  13. You can use this event: https://wiki.multitheftauto.com/wiki/OnVehicleStartExit
  14. https://wiki.multitheftauto.com/wiki/Ser ... our_server
  15. There's no such public resource for hotwire. And about the seatbelt, I don't really understand, plus, we don't accept requests here.
  16. Castillo

    boolean value

    You want to get the data of the player team? are you sure that the team exists?
  17. Castillo

    CreatTeam

    teams = { } addEvent ( "exit", true ) addEventHandler( "exit", root, function ( ) setPlayerTeam ( source, nil ) if ( isElement ( teams [ source ] ) ) then destroyElement ( teams [ source ] ) teams [ source ] = nil end end ) addEvent ( "creat", true ) addEventHandler( "creat", root, function ( cree ) local team = createTeam ( cree, 0, 255 , 0 ) teams [ source ] = team setPlayerTeam ( source, team ) end ) That?
  18. The script doesn't create the drawing part, this function can enable it: setDevelopmentMode
×
×
  • Create New...