Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Show me how you trigger: "onLoginSpawn", I know you do it from the client side, show me the code.
  2. Well, maybe you haven't got a team?
  3. giveWeapon is a server side only function.
  4. Is from the "bone_attach" resource.
  5. El tipo de elemento es "vehicle".
  6. Castillo

    Car spawning

    I doubt there's a difference between spawnVehicle and setElementPosition + setElementRotation.
  7. Try searching the forums, I believe it was asked before.
  8. Castillo

    Car spawning

    Use the event: onVehicleExplode With the function: respawnVehicle
  9. Is because he copied it from admin panel resource, that's where he got how to sort the vehicles by name, but he didn't quite understand how it worked, so he thought he had to do the loop aswell. SwatCars = { 416, 427, 490, 528, 523, 470, 598, 596, 597, 599, 601, 428, 541, 579, 560, 451, 495, 426, 551 } function swatcars1 ( ) table.sort ( SwatCars, function ( a, b ) return ( getVehicleNameFromModel ( a ) < < getVehicleNameFromModel ( b ) ) end ) for _, swatcar in ipairs ( SwatCars ) do local row = guiGridListAddRow ( carGridswat ) guiGridListSetItemText ( carGridswat, row, nameColswat, getVehicleNameFromModel ( swatcar ), false, false ) end end addEventHandler ( "onClientResourceStart", resourceRoot, swatcars1 ) Try that.
  10. Castillo

    XML ID's

    You could assing an unique ID to each elevator, or a name.
  11. I'm not sure, but I think that you must use shaders.
  12. Usa las siguientes funciones: addCommandHandler getElementsByType isVehicleBlown destroyElement
  13. dxDrawText ( msg, 20, screenHeight, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown", "center", "center" )
  14. Read all the arguments of dxDrawText at the wiki page.
  15. -- client side: local msg = "" function drawMessage ( ) local screenWidth, screenHeight = guiGetScreenSize ( ) dxDrawText ( msg, screenWidth / 2, screenHeight / 2 ) end addEvent ( "setMessageVisible", true ) addEventHandler ( "setMessageVisible", root, function ( state, msg_ ) removeEventHandler ( "onClientRender", getRootElement (), drawMessage ) if ( state ) then msg = msg_ addEventHandler ( "onClientRender", getRootElement (), drawMessage ) end end ) -- server side: addEventHandler ( "onMarkerHit", createMarker ( 1791.537, 656.511, 17.626, 'cylinder', 2.0, 255, 0, 0, 150 ), function ( hitElement, matchingDimension ) if ( getElementType ( hitElement ) ~= "player" ) then return end local vehicle = getPedOccupiedVehicle ( hitElement ) if ( vehicle ) then setElementFrozen ( vehicle, true ) triggerClientEvent ( hitElement, "setMessageVisible", hitElement, true, "YOU ARE NOW FROZEN" ) setTimer ( function ( thePlayer, vehicle ) triggerClientEvent ( thePlayer, "setMessageVisible", thePlayer, true, "YOU ARE NOW UNFROZEN" ) setElementFrozen ( vehicle, false ) setTimer ( triggerClientEvent, 3000, 1, thePlayer, "setMessageVisible", thePlayer, false ) end ,5000, 1, hitElement, vehicle ) end end )
  16. I really doubt that, I've seen these skins on mod sites.
  17. I'm not talking about the resource, I'm talking about the skin mods, you need permission from the authors to publish them on a resource.
  18. Well, there's no point on showing a text for unfreezing, but you can edit it if you want.
  19. And... who gave you the permission to publish the skins on your resource?
  20. local meuMarker = createMarker ( x, y, z, "cylinder", 1, 255, 0, 0, 100 ) function celtonX ( hitElement, matchingDimension ) if ( getElementType ( hitElement ) == "player" ) then if ( not isPedInVehicle ( hitElement ) ) then local x, y, z = getElementPosition ( hitElement ) local vehicle = createVehicle ( 432, x, y, z ) warpPedIntoVehicle ( hitElement, vehicle ) else local vehicle = getPedOccupiedVehicle ( hitElement ) setElementModel ( vehicle, 432 ) end end end addEventHandler ( "onMarkerHit", meuMarker, MarkerHit )
  21. Castillo

    Join Failed

    Add this on the client script: addEvent ( "onClientPlayerLogin", true )
×
×
  • Create New...