Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Are you talking about the default account system?
  2. It's because the staff give powers to the wrong people.
  3. That's exactly what I said, why did you said no then?
  4. Castillo

    check state

    That doesn't make any sense. You want to know how much alive players there are or is it something else?
  5. What are you trying to do then? get the ping of the local player?
  6. You're trying to get the ping of a remote player?
  7. Your code doesn't really make much sense.
  8. Castillo

    Confused!

    local sx, sy = guiGetScreenSize ( ) function guiRegistered ( x, y, w, h, text, relative, parent ) GUI = guiCreateWindow(sx / 2.5 - 310, sy / 1.4 - 260, 246, 340, "TEXT", false) player = guiCreateButton(6, 4, 233, 56, "localPlayer", false, GUI) anims = guiCreateButton(78, 65, 65, 20, "Anims", false, GUI) info = guiCreateButton(149, 65, 65, 20, "Info", false, GUI) close = guiCreateButton(7, 89, 65, 20, "Close", false, GUI]) end addEvent ( "onPlayerRegister", true ) addEventHandler ( "onPlayerRegister", root, guiRegistered ) Then you trigger the event: "onPlayerRegister" from the server side when the player registers.
  9. 1: "joinquit" resource. 2: "deathmessages" or "killmessages" resource.
  10. Castillo

    check state

    You want to get the amount of alive players?
  11. Castillo

    closed

    bindKey ( "mouse2", "both", function ( _, state ) guiSetVisible ( myImage, ( state == "down" and true or false ) ) end )
  12. Usa el evento onElementModelChange.
  13. Use the function: guiGridListGetRowCount for row = 0, guiGridListGetRowCount ( myGridlist ) do -- Code end
  14. Fijate si es hombre, entonces le pones el estilo de hombre, y si es mujer, el estilo de mujer. P.D: El estilo no es un string, es un numero.
  15. addCommandHandler( "toggleengine", function( player, commandName ) if exports.players:isLoggedIn( player ) then local vehicle = getPedOccupiedVehicle( player ) if vehicle and getVehicleOccupant( vehicle ) == player and doesVehicleHaveEngine( vehicle ) then local data = vehicles[ vehicle ] if data then if data.vehicleID < 0 or exports.sql:query_free( "UPDATE vehicles SET engineState = 1 - engineState WHERE vehicleID = " .. data.vehicleID ) then if math.floor( getElementHealth( vehicle ) + 0.5 ) > 301 then setVehicleEngineState( vehicle, not data.engineState ) data.engineState = not data.engineState else outputChatBox( "(( Vehicle motor is broken ))", player, 255, 0, 0 ) end end end end end end ) addEventHandler( "onVehicleDamage", root, function( loss ) if getElementHealth( source ) <= 301 then setElementHealth( source, 300 ) setVehicleDamageProof( source, true ) setVehicleEngineState( source, false ) if getVehicleOccupant( source ) then outputChatBox( "(( You broken your vehicle motor. ))", getVehicleOccupant( source ), 255, 204, 0 ) end end end ) addEventHandler( "onVehicleEnter", root, function( ) if isVehicleDamageProof( source ) and math.floor( getElementHealth( source ) + 0.5 ) > 301 then setVehicleDamageProof( source, false ) else setVehicleEngineState( source, false ) end end ) Try it.
  16. That doesn't really make much sense to me, could you post your code? if you don't want others to take the code, send it over PM.
  17. I don't really understand what is the problem.
  18. That's not possible, something else must be doing it.
  19. It won't be server side, it would be something the player can enable on his MTA settings.
  20. attachElements o podes usar el recurso "bone_attach" que esta en la comunidad para pegar cosas a los huesos del jugador.
  21. Donde esta definida la funcion "isPlayerInRangeOfPoint"?
×
×
  • Create New...