Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. You want to remove the event handler from a function from another resource?
  2. Do you plan on paying the scripter?
  3. The player that died is inserted on the table inside the function that checks if is in the arena, so it shouldn't happen what you said.
  4. Castillo

    SQL

    -- client side: function miembros ( playerName ) for _, nombres in ipairs ( playerName ) do local row = guiGridListAddRow ( playerGangList ) guiGridListSetItemText ( playerGangList, row, nameColumn, nombres.Nombre, false, false ) end end addEvent ( "gangMiembros", true ) addEventHandler ( "gangMiembros", root, miembros ) -- server side: function obtenermiembros ( ) if ( getElementData ( source, "Gang" ) ~= "None" ) then local gangName = getElementData ( source, "Gang" ) local playerName = executeSQLQuery ( "SELECT Nombre FROM members WHERE gangName = ?", gangName ) triggerClientEvent ( source, "gangMiembros", source, playerName ) end end addEventHandler ( "onPlayerLogin", root, obtenermiembros )
  5. Yes, it'll be more efficient. local killers = { } addEventHandler ( "onPlayerWasted", getRootElement(), function ( totalammo, killer, killerWeapon, bodypart ) if isElementWithinColShape ( source, arena ) then local detection = isElementWithinColShape ( source, arena ) local detectionKiller = isElementWithinColShape ( killer, arena ) if detection then local x, y, z = unpack ( ( close == 1 and randspawn [ math.random ( #randspawn ) ] ) or { 577.92224121094, -2621.6677246094, 1378.0678710938 } ) setTimer ( function ( thePlayer, dx, dy, dz ) if ( isElement ( thePlayer ) ) then setElementPosition ( thePlayer, dx, dy, dz ) setPedRotation ( thePlayer, 180 ) end end ,5000, source, x, y, z ) killers [ source ] = killer end end end ) addEventHandler ( "onPlayerSpawn", root, function ( ) if ( isElement ( killers [ source ] ) ) then setElementHealth ( killers [ source ], 200 ) end killers [ source ] = nil end ) Not tested.
  6. You want to set the health of the killer to 200% when the player that got killed spawns?
  7. Create a table with the camera positions, then get a random index from it. http://lua-users.org/wiki/TablesTutorial math.random unpack
  8. You can't use that to replace an skin.
  9. That minecraft script what it does is: replace an object, then attach that object to a ped.
  10. You got it wrong, the model is not a skin, is an object.
  11. When a remote player joins or when you enter the server?
  12. Show us the meta.xml content.
  13. createColTube bindKey unbindKey onColShapeHit onColShapeLeave
  14. Yes, you can use a timer.
  15. You can set the alpha of the text.
  16. Create a table with the weapons you want to give, then use: math.random giveWeapon onPlayerSpawn
  17. https://wiki.multitheftauto.com/wiki/Se ... nistrators
  18. Just use: onClientGUIClick it works with all GUI elements.
  19. Castillo

    CheckBox

    What's the point of posting this? he already solved it.
×
×
  • Create New...