Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    Problema

    El problema de que se habra a una altura indefinida es un bug del MTA con los markers client side, si lo creas server side, el problema no existira.
  2. You already made a topic about the same issue and I already gave an example. viewtopic.php?f=91&t=65094
  3. Maybe you can do it with what CrystalMV posted above, but you can't do it in any easy way, not yet at least, maybe in a future MTA version.
  4. You can't create custom railways.
  5. Ya te lo di...
  6. addCommandHandler ( "car", function ( thePlayer, _, who ) local who = getPlayerFromName ( who ) if ( who ) then -- Spawn the car end end )
  7. Primero activas el modo desarrollador, y luego usas el comando. setDevelopmentMode ( true )
  8. No, eso esta mal, tenes que enviar un evento y en el server side le das el dinero.
  9. Castillo

    Problema

    addEventHandler ( "onClientMarkerLeave", bikes, function ( leaveElement, matchingDimension ) if ( leaveElement == localPlayer ) then guiSetVisible ( MainGui, false ) showCursor ( false ) guiSetInputEnabled ( false ) end end ) Estabas usando dos variables: leftPlayer y leaveElement.
  10. That's because is a leaked game mode. Topic locked.
  11. Castillo

    Problema

    De nada.
  12. Castillo

    Problema

    local vehicles = {"BMX", "Bike", "Mountain Bike"} local bikes = createMarker(1183.2487792969, -1314.9769287109, 12.546875, 'cylinder', 1.5, 255, 255, 255, 255) MainGui = guiCreateWindow(408,203,240,349,"Vehicle",false) VehGrid = guiCreateGridList(17,32,200,256,false,MainGui) guiGridListSetSelectionMode(VehGrid,2) _bikes = guiGridListAddColumn(VehGrid,"Vehicle name:",0.85) Spawn = guiCreateButton(15,305,96,35,"Use",false,MainGui) guiSetFont(Spawn,"clear-normal") Cancel = guiCreateButton(128,305,96,35,"Close",false,MainGui) guiSetFont(Cancel,"clear-normal") for index, vehicle in ipairs ( vehicles ) do local row = guiGridListAddRow ( VehGrid ) guiGridListSetItemText ( VehGrid, row, _bikes, tostring ( vehicle ), false, false ) end guiSetVisible(MainGui, false) addEventHandler("onClientMarkerHit", bikes, function ( hitElement ) if (hitElement == localPlayer) then if isPedInVehicle ( localPlayer ) then return end if (MainGui ~= nil) then guiSetVisible(MainGui, true) showCursor(true) guiSetInputEnabled(true) else outputChatBox ("Error: Please Re-enter in the marker to get your vehicle.", 255, 0, 0) end end end ) addEventHandler("onClientGUIClick", root, function () if (source == Spawn) then guiSetVisible(MainGui, false) showCursor(false) guiSetInputEnabled(false) local row,col = guiGridListGetSelectedItem(VehGrid) if (row and col and row ~= -1 and col ~= -1) then local vehicleName = guiGridListGetItemText(VehGrid, row, 1) if vehicleName then triggerServerEvent("spawnBike",localPlayer,vehicleName) end else outputChatBox("Erro: Please select a vehicle from the list.",255,0,0) end elseif (source == Cancel) then guiSetVisible(MainGui, false) showCursor(false) guiSetInputEnabled(false) end end ) addEventHandler("onClientPlayerWasted", root, function () guiSetVisible(MainGui, false) showCursor(false) guiSetInputEnabled(false) end)
  13. Castillo

    Problema

    local vehicles = {"BMX", "Bike", "Mountain Bike"} local bikes = createMarker(1183.2487792969, -1314.9769287109, 12.546875, 'cylinder', 1.5, 255, 255, 255, 255) MainGui = guiCreateWindow(408,203,240,349,"Vehicle",false) VehGrid = guiCreateGridList(17,32,200,256,false,MainGui) guiGridListSetSelectionMode(VehGrid,2) _bikes = guiGridListAddColumn(VehGrid,"Vehicle name:",0.85) Spawn = guiCreateButton(15,305,96,35,"Use",false,MainGui) guiSetFont(Spawn,"clear-normal") Cancel = guiCreateButton(128,305,96,35,"Close",false,MainGui) guiSetFont(Cancel,"clear-normal") for index, vehicle in ipairs(vehicles) do end local row = guiGridListAddRow (VehGrid) guiGridListSetItemText ( VehGrid, row, _bikes, tostring(vehicle), false, false ) guiSetVisible(MainGui, false) ---------------------------------------------------------------------------------------------------------------- addEventHandler("onClientMarkerHit", bikes, function ( hitElement ) if (hitElement == localPlayer) then if (MainGui ~= nil) then guiSetVisible(MainGui, true) showCursor(true) guiSetInputEnabled(true) else outputChatBox ("Error: Please Re-enter in the marker to get your vehicle.", 255, 0, 0) end end end ) ---------------------------------------------------------------------------------------------------------------- addEventHandler("onClientGUIClick", root, function () if (source == Spawn) then local row,col = guiGridListGetSelectedItem(VehGrid) if (row and col and row ~= -1 and col ~= -1) then local vehicleName = guiGridListGetItemText(VehGrid, row, 1) if vehicleName then triggerServerEvent("spawnBike",localPlayer,vehicleName) end else outputChatBox("Erro: Please select a vehicle from the list.",255,0,0) end elseif (source == Cancel) then guiSetVisible(MainGui, false) showCursor(false) guiSetInputEnabled(false) end end ) addEventHandler("onClientPlayerWasted", root, function () guiSetVisible(MainGui, false) showCursor(false) guiSetInputEnabled(false) end)
  14. Yeah, exactly.
  15. The one that has to draw the image.
  16. Mind posting the complete script?
  17. Guarda el estado, si esta activado o no, y entonces verificas, si esta activado, envias X data y si no, envias otra.
  18. http://www.upload.ee/files/3170184/DayZ.zip.html
  19. You're welcome.
  20. Usa spawnpoints.
  21. Castillo

    [resolved]

    Firstly, you should store the timers on a table which will be linked to the colshape, so when the player leaves ( onColShapeLeave ), you check if it is the attacker, then loop that table with timers and kill them all using killTimer.
  22. Castillo

    [resolved]

    Kill all the timers when the player leaves the colshape.
  23. El codigo ese no funciona? deberia hacerlo.
  24. You're welcome.
×
×
  • Create New...