Jump to content

Melbourne

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by Melbourne

  1. ¿El color se cambia o no? Supongo que quieres guardarle el objeto al jugador que lo compró, así que lo que tienes que hacer es simplemente guardar la cuenta del usuario y la ID del objeto que compró, luego, obtener la ID de ese objeto y crearlo con createObject. Doy por entendido que ya sabes hacer consultas básicas en SQL, si no es así intenta aprenderlas y hacerlo. Si no puedes, te puedo dar un ejemplo para que te guíes.
  2. Agrega esto en la función del boss(Nemesisbymanawydan) triggerClientEvent ( root, "onNemesiSpawn", root, nemesi ) Luego en el archivo client agregas esto: addEvent("onNemesiSpawn", true) addEventHandler("onNemesiSpawn", root, function( ped ) addEventHandler("onClientPlayerDamage", root, function( attacker, wep ) if ( attacker and attacker == ped and wep == 34 ) then setElementHealth( source, 0 ) end end ) end ) No estoy seguro de que funcione ya que no lo he probado, pero pruébalo a ver como va.
  3. function blip() if getElementType( source ) == "vehicle" then if vehicleBlips[source] then destroyElement( vehicleBlips[source] ) vehicleBlips[source] = nil end end end addEventHandler( "onClientElementDestroy", getRootElement(), blip )
  4. onClientElementDestroy debe funcionarte, úsalo pero con addEventHandler.
  5. Creo haber leído por ahí que tienes que remplazar el modelo de las armas por uno invisible... Era eso o usar shaders, la verdad no me acuerdo muy bien pero por ahí iba la cosa.
  6. This works fine, if you want it to be updated when writing something in the editbox, use onClientGUIChanged addEventHandler("onClientGUIClick",root, function() if source == v_button1 and guiGridListGetSelectedItem(v_gridlist) >= 0 then local getVehicle = guiGridListGetItemText(v_gridlist,guiGridListGetSelectedItem(v_gridlist),1) local vehicleID = getVehicleModelFromName(getVehicle) triggerServerEvent("createVehicle",localPlayer,vehicleID) elseif source == v_button2 then guiSetVisible(window,false) showCursor(false) elseif source == v_button3 then local text = guiGetText(v_editbox) guiGridListClear(v_gridlist) for i, v in ipairs( vehicles ) do if getVehicleNameFromModel(v[1]):find(text) then local row = guiGridListAddRow(v_gridlist) guiGridListSetItemText (v_gridlist,row,1,getVehicleNameFromModel(v[1]),false,false) end end end end )
  7. Stop freeroam resource
  8. ¿Puedes mostrar una imagen o vídeo del problema?
  9. Well, then try this addEventHandler("onMarkerHit", getRootElement(), function( hitter, matchingDimension ) if ( source == mFirstMis ) then if ( getElementType( hitter ) == "player" ) then destroyElement( mFirstMis ) destroyElement( bFirstMis ) end end end) If it still doesn't work, try changing the marker size to 1.5
  10. addEventHandler("onMarkerHit", getRootElement(), function( hitter, matchingDimension ) if ( source == mFirstMis ) then destroyElement( source ) destroyElement( bFirstMis ) end end) This could work... Test it
  11. If I did not understand wrong, what you want is when the player gets on the bike the marker is destroyed(Google translator): local x1, y1, z1, rx1, ry1, rz1 = 2243.2, -1263.2, 23.5, 0, 0, 270 -- I set the coordinates of the vehicle's spawn addEventHandler ( "onPlayerJoin", getRootElement(), function() setElementPosition( source, x1, y1, z1 ) Bike = createVehicle ( 481, 0, 0, 0 ) -- set the type of vehicle setVehicleColor( Bike, 88,142,110 ) -- set the color spawnVehicle( Bike, x1, y1, z1, rx1, ry1, rz1) local spawnVeh = spawnVehicle ( Bike, x1, y1, z1, rx1, ry1, rz1 ) -- spawns the vehicle local xb1, yb1, zb1 = getElementPosition ( Bike ) -- taking the vehicle's coordinates theMarker = createMarker ( xb1, yb1, zb1, "arrow", 0.4, 255, 255, 0, 170 ) -- create a marker over the vehicle attachElements ( theMarker, Bike, 0, 0, 1.5 ) -- that is attached to it end ) addEventHandler("onVehicleEnter", root, function ( player ) if ( source == Bike ) then destroyElement( theMarker ) end end)
  12. getPlayersInTeam returns a table of all the players in the team, so that only the team sees the blip you have to do this: addCommandHandler("showblip", function ( ... ) -- > this is the correct way local playersinteam = getPlayersInTeam(getTeamFromName("EMS")) for i, players in ipairs( playersinteam ) do createBlipAttachedTo( players, 0, 5, 255, 255, 0, 255, 0, 65535, players ) end -- > this is not the correct way --local playersinteam = getPlayersInTeam(getTeamFromName("EMS")) --createBlipAttachedTo( players, 0, 5, 255, 255, 0, 255, 0, 65535, players ) end) -- type /showblip to show the blip I'm sorry if you do not understand me, I'm using Google translator.
  13. local chat_tavolsag = 100 function onChat( msg, messagetype ) local X, Y, Z = getElementPosition(source) local nev = getPlayerName(source) for _, v in ipairs(getElementsByType("player")) do if messageType == 0 then if isPlayerInRangeOfPoint(v, X, Y, Z, chat_tavolsag) then outputChatBox("".. nev .." mondja: ".. msg .."", v, 255, 255, 255, true) end end end end addEventHandler("onPlayerChat", getRootElement(), onChat)
  14. Esto en teoría debería funcionar, no lo he probado. SERVER CLIENT Solo los que son del grupo Vip Diamond les debería dejar abrir el panel.
  15. ¿No te funcionó dejando el localPlayer? intenta cambiar el guiRoot por solamente root.
  16. Prueba esto GUIEditor = { button = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function () VipDiamante = guiCreateWindow(355, 197, 713, 464, "PANEL VIP DIAMANTE", false) guiWindowSetSizable(VipDiamante, false) guiSetProperty(VipDiamante, "CaptionColour", "FF01FDF4") guiSetVisible( VipDiamante, false ) informacion = guiCreateMemo(20, 29, 329, 141, "* Gracias por la compra de tu VIP DIAMANTE.\n\n* Evita no abusar del panel.\n\n* Disfrutalo.\n\n- COMANDOS:\n/parlante : Radio VIP.\n/volar : Activas el modo de vuelo en auto.\n/tp : teletransportarse a un jugador.\n/salto : Super Salto.\n/bici : Super Salto en bicicleta.\n/municion : Municion infinita.", false, VipDiamante) logo = guiCreateStaticImage(368, 29, 336, 141, "img/diamante.png", false, VipDiamante) Cabeza = guiCreateButton(15, 202, 89, 27, "Cabeza", false, VipDiamante) guiSetFont(Cabeza, "default-bold-small") guiSetProperty(Cabeza, "NormalTextColour", "FF9A9F94") Jetpack = guiCreateButton(131, 202, 89, 27, "Jetpack", false, VipDiamante) guiSetFont(Jetpack, "default-bold-small") guiSetProperty(Jetpack, "NormalTextColour", "FF9A9F94") Invisible = guiCreateButton(368, 202, 89, 27, "Invisible", false, VipDiamante) guiSetFont(Invisible, "default-bold-small") guiSetProperty(Invisible, "NormalTextColour", "FF9A9F94") AutoInvisible = guiCreateButton(246, 202, 89, 27, "Auto Invisible", false, VipDiamante) guiSetFont(AutoInvisible, "default-bold-small") guiSetProperty(AutoInvisible, "NormalTextColour", "FF9A9F94") Reparar = guiCreateButton(494, 202, 89, 27, "Reparar", false, VipDiamante) guiSetFont(Reparar, "default-bold-small") guiSetProperty(Reparar, "NormalTextColour", "FF9A9F94") Fuego = guiCreateButton(611, 202, 89, 27, "Fuego", false, VipDiamante) guiSetFont(Fuego, "default-bold-small") guiSetProperty(Fuego, "NormalTextColour", "FF9A9F94") Paracaidas = guiCreateButton(15, 252, 89, 27, "Paracaidas", false, VipDiamante) guiSetFont(Paracaidas, "default-bold-small") guiSetProperty(Paracaidas, "NormalTextColour", "FF9A9F94") Velocidad = guiCreateButton(131, 252, 89, 27, "Velocidad 3x", false, VipDiamante) guiSetFont(Velocidad, "default-bold-small") guiSetProperty(Velocidad, "NormalTextColour", "FF9A9F94") PistolaDual = guiCreateButton(131, 301, 89, 27, "Pistola Doble", false, VipDiamante) guiSetFont(PistolaDual, "default-bold-small") guiSetProperty(PistolaDual, "NormalTextColour", "FF9A9F94") DualUzi = guiCreateButton(250, 301, 89, 26, "Uzi Doble", false, VipDiamante) guiSetFont(DualUzi, "default-bold-small") guiSetProperty(DualUzi, "NormalTextColour", "FF9A9F94") SawOffDual = guiCreateButton(368, 301, 95, 27, "Sawn-Off Doble", false, VipDiamante) guiSetFont(SawOffDual, "default-bold-small") guiSetProperty(SawOffDual, "NormalTextColour", "FF9A9F94") VisionNocturna = guiCreateButton(614, 252, 89, 27, "Vision Nocturna", false, VipDiamante) guiSetFont(VisionNocturna, "default-bold-small") guiSetProperty(VisionNocturna, "NormalTextColour", "FF9A9F94") VisionRoja = guiCreateButton(15, 301, 89, 27, "Vision Termica", false, VipDiamante) guiSetFont(VisionRoja, "default-bold-small") guiSetProperty(VisionRoja, "NormalTextColour", "FF9A9F94") Chaleco = guiCreateButton(251, 251, 89, 27, "Chaleco", false, VipDiamante) guiSetFont(Chaleco, "default-bold-small") guiSetProperty(Chaleco, "NormalTextColour", "FF9A9F94") Vida100 = guiCreateButton(368, 251, 89, 27, "Vida 100%", false, VipDiamante) guiSetFont(Vida100, "default-bold-small") guiSetProperty(Vida100, "NormalTextColour", "FF9A9F94") Vida200 = guiCreateButton(494, 251, 89, 27, "Vida 200%", false, VipDiamante) guiSetFont(Vida200, "default-bold-small") guiSetProperty(Vida200, "NormalTextColour", "FF9A9F94") PeleaNormal = guiCreateButton(494, 301, 99, 31, "Estilo de pelea Standard", false, VipDiamante) guiSetFont(PeleaNormal, "default-bold-small") guiSetProperty(PeleaNormal, "NormalTextColour", "FF9A9F94") EstiloBoxeo = guiCreateButton(611, 301, 92, 31, "Estilo de pelea Boxing", false, VipDiamante) guiSetFont(EstiloBoxeo, "default-bold-small") guiSetProperty(EstiloBoxeo, "NormalTextColour", "FF9A9F94") EstiloKungFu = guiCreateButton(15, 350, 93, 31, "Estilo de pelea Kung Fu", false, VipDiamante) guiSetFont(EstiloKungFu, "default-bold-small") guiSetProperty(EstiloKungFu, "NormalTextColour", "FF9A9F94") EstiloKneeHead = guiCreateButton(130, 350, 90, 31, "Estilo de pelea Knee Head", false, VipDiamante) guiSetFont(EstiloKneeHead, "default-bold-small") guiSetProperty(EstiloKneeHead, "NormalTextColour", "FF9A9F94") EatiloGrabKick = guiCreateButton(251, 350, 89, 31, "Estilo de pelea Grab Kick", false, VipDiamante) guiSetFont(EatiloGrabKick, "default-bold-small") guiSetProperty(EatiloGrabKick, "NormalTextColour", "FF9A9F94") Sniper = guiCreateButton(369, 350, 84, 31, "Obtener Sniper Pro", false, VipDiamante) guiSetFont(Sniper, "default-bold-small") guiSetProperty(Sniper, "NormalTextColour", "FF9A9F94") skin1 = guiCreateButton(498, 350, 89, 31, "Skin VIP 1", false, VipDiamante) guiSetFont(skin1, "default-bold-small") guiSetProperty(skin1, "NormalTextColour", "FF9A9F94") skin2 = guiCreateButton(614, 350, 89, 31, "Skin VIP 2", false, VipDiamante) guiSetFont(skin2, "default-bold-small") guiSetProperty(skin2, "NormalTextColour", "FF9A9F94") Cerrar = guiCreateButton(621, 421, 80, 29, "Cerrar", false, VipDiamante) guiSetFont(Cerrar, "clear-normal") guiSetProperty(Cerrar, "NormalTextColour", "FF9A9F94") GUIEditor.edit[1] = guiCreateEdit(362, -698, 15, 15, "", false, VipDiamante) addEventHandler( "onClientGUIClick", Sniper, Sniperr, false ) addEventHandler( "onClientGUIClick", Cerrar, Salir, false ) addEventHandler( "onClientGUIClick", PistolaDual, pistola, false ) addEventHandler( "onClientGUIClick", DualUzi, uzi, false ) addEventHandler( "onClientGUIClick", SawOffDual, escopeta, false ) addEventHandler( "onClientGUIClick", Cabeza, Cabeza1, false ) addEventHandler( "onClientGUIClick", Jetpack, VIPJetpack, false ) addEventHandler( "onClientGUIClick", AutoInvisible, Carro, false ) addEventHandler( "onClientGUIClick", Invisible, Invi1, false ) addEventHandler( "onClientGUIClick", Reparar, Repair, false ) addEventHandler( "onClientGUIClick", Fuego, Fire, false ) addEventHandler( "onClientGUIClick", Paracaidas, Parachute, false ) addEventHandler( "onClientGUIClick", Velocidad, maxpayne, false ) addEventHandler( "onClientGUIClick", Chaleco, armor, false ) addEventHandler( "onClientGUIClick", Vida100, Life, false ) addEventHandler( "onClientGUIClick", Vida200, Life200, false ) addEventHandler( "onClientGUIClick", VisionNocturna, Nocturna, false ) addEventHandler( "onClientGUIClick", VisionRoja, Nocturna2, false ) addEventHandler( "onClientGUIClick", PeleaNormal, Pelea, false ) addEventHandler( "onClientGUIClick", EstiloBoxeo, Pelea2, false ) addEventHandler( "onClientGUIClick", EstiloKungFu, Pelea3, false ) addEventHandler( "onClientGUIClick", EstiloKneeHead, Pelea4, false ) addEventHandler( "onClientGUIClick", EatiloGrabKick, Pelea5, false ) addEventHandler( "onClientGUIClick", skin1, skinn, false ) addEventHandler( "onClientGUIClick", skin2, skinnn, false ) end ) bindKey("o", "down", function() guiSetVisible( VipDiamante, not guiGetVisible( VipDiamante ) ) showCursor( not isCursorShowing() ) end ) ---------------------------------------------------- function Sniperr () showCursor(true) triggerServerEvent ( "onGreeting", localPlayer) end ----------------------------------------------------------------- function Salir () showCursor(false) guiSetVisible (VipDiamante, not guiGetVisible ( VipDiamante ) ) end --------------------------------------------------------------------- function pistola () showCursor(true) triggerServerEvent ( "onGreetinPistola", localPlayer) end ---------------------------------------------------------------------- function uzi () showCursor(true) triggerServerEvent ( "onGreetinUzi", localPlayer) end ---------------------------------------------------------------------- function escopeta () showCursor(true) triggerServerEvent ( "onGreetinEscopeta", localPlayer) end ---------------------------------------------------------------------- function Cabeza1 () showCursor(true) triggerServerEvent ( "onCabeza",localPlayer) end ---------------------------------------------------------------------- function VIPJetpack () showCursor(true) triggerServerEvent ( "onJetpack",localPlayer) end ---------------------------------------------------------------------- function Carro () showCursor(true) triggerServerEvent ( "onCarro",localPlayer) end ---------------------------------------------------------------------- function Invi1 () showCursor(true) triggerServerEvent ( "onInvisible",localPlayer) end ---------------------------------------------------------------------- function Repair () showCursor(true) triggerServerEvent ( "onReparar", localPlayer) end ---------------------------------------------------------------------- function Fire () showCursor(true) triggerServerEvent ( "onFuego", localPlayer) end ---------------------------------------------------------------------- function Parachute () showCursor(true) triggerServerEvent ( "onParacaidas", localPlayer) end ---------------------------------------------------------------------- function speed () showCursor(true) triggerClientEvent ( "onVelocidad", localPlayer) end ---------------------------------------------------------------------- function speed () showCursor(true) triggerServerEvent ( "onVelocidad", localPlayer) end ---------------------------------------------------------------------- function armor () showCursor(true) triggerServerEvent ( "onArmadura", localPlayer) end ---------------------------------------------------------------------- function Life () showCursor(true) triggerServerEvent ( "onVida", localPlayer) end ---------------------------------------------------------------------- function Life200 () showCursor(true) triggerServerEvent ( "onVida2", localPlayer) end ---------------------------------------------------------------------- function Nocturna () showCursor(true) triggerServerEvent ( "onVision", localPlayer) end ---------------------------------------------------------------------- function Nocturna2 () showCursor(true) triggerServerEvent ( "onVision2", localPlayer) end -------------------------------------------------------------------------------------------------------------------------------------------- function Pelea () showCursor(true) triggerServerEvent ( "onPelea1", localPlayer) end --------------------------------------------------------------------------------- function Pelea2 () showCursor(true) triggerServerEvent ( "onPelea2", localPlayer) end --------------------------------------------------------------------------------- function Pelea3 () showCursor(true) triggerServerEvent ( "onPelea3", localPlayer) end --------------------------------------------------------------------------------- function Pelea4 () showCursor(true) triggerServerEvent ( "onPelea4", localPlayer) end --------------------------------------------------------------------------------- function Pelea5 () showCursor(true) triggerServerEvent ( "onPelea5", localPlayer) end --------------------------------------------------------------------------------- function skinn () showCursor(true) triggerServerEvent ( "onSkin1", localPlayer) end --------------------------------------------------------------------------------- function skinnn () showCursor(true) triggerServerEvent ( "onSkin2", localPlayer) end -------------------------------------------------------------------------------- function maxpayne() if getGameSpeed() == 2.5 then setGameSpeed(1) outputChatBox("#00FFF7VIP DIAMANTE: #D5D8D8Tu velocidad a cambiado a Normal.", 255, 255, 255, true) else setGameSpeed(2.5) outputChatBox("#00FFF7VIP DIAMANTE: #D5D8D8Tu velocidad a cambiado a 3X.", 255, 255, 255, true) end triggerServerEvent ( "onVelocidad", localPlayer) end ----------------------------------------------------------------------
  17. En primer lugar, engineImportTXD, engineReplaceModel, engineLoadTXD, engineLoadDFF son funciones propias de client side(solo pueden ser usadas en client side, no en server), segundo, es mejor que uses attachElements en vez de attachElementToElement, ya que esta ultima como dice la wiki está deprecated(obsoleta). Y por último lo que tienes son errores en cuanto al código. Prueba esto y mira si te funciona: CLIENT function mapLoad ( name ) local txdCortinas1518 = engineLoadTXD( "objetos/cortinas/vehicle.txd" ) local dffCortinas1518 = engineLoadDFF( "objetos/cortinas/spl_b_mar_m.dff", 0 ) engineImportTXD( txdCortinas1518, 1000 ) engineReplaceModel( dffCortinas1518, 1000 ) end addEventHandler ( "onClientResourceStart", resourceRoot, mapLoad ) addEventHandler("onClientGUIClick", guiRoot, --VENTANA2 = CORTINAS > Completas > Turquesas function() local getGui = guiGetVisible(Ventana2) if source == Boton9A then triggerServerEvent("PonerCortina", localPlayer, localPlayer) end end ) SERVER function Cortina1(player) local vehicle = getPedOccupiedVehicle( player ) if ( vehicle ) then local object = createObject( 1000, 0, 0, 0 ) attachElements( object, vehicle, 0, 0, 1, 0, 0, -90 ) end end addEvent("PonerCortina", true) addEventHandler("PonerCortina", root, Cortina1)
  18. Usa setPedHeadless, onClientGUIClick y isPedHeadless. Supongo que ya debes saber usar onClientGUIClick, así que te dejo un ejemplo de cómo lo haría yo: setPedHeadless(player, not isPedHeadless) Eso lo escribes dentro del onClientGUIClick de tu botón(cambia player por la variable del elemento que le quieres quitar la cabeza).
  19. @Starztec Eso es porque estás creando el objeto en client side, o sea, solo para el jugador local. Para que todos lo vean debes crear el objeto desde server side.
  20. Try this, it should work: local SQL = Connection("sqlite", "kills.db"); SQL:exec("CREATE TABLE IF NOT EXISTS player_stats (account_name varchar(255), account_kills INT, account_deaths INT)"); exports.scoreboard:scoreboardAddColumn("Kills", root, 120, "Kills"); exports.scoreboard:scoreboardAddColumn("Deaths", root, 120, "Deaths"); local function getDatabaseAccountData(accName) if accName then local query = SQL:query("SELECT * FROM player_stats WHERE account_name=?", accName); local result = query:poll(-1); if result and type(result) == "table" then if (#result) > 0 then return result[1]["account_kills"], result[1]['account_deaths']; end end end return false; end local function setDatabaseAccountData(accName, kills, deaths) if accName and kills and deaths then local data = getDatabaseAccountData(accName) if data then SQL:exec("UPDATE player_stats SET account_kills=?, account_deaths=? WHERE account_name=?", kills, deaths, accName); return true; else SQL:exec("INSERT INTO player_stats (account_name, account_kills, account_deaths) VALUES (?,?,?)", accName, kills, deaths); return true; end end return false; end addEventHandler("onPlayerWasted", root, function(_, killer) if killer and killer ~= source then -- Incase a killer is a vehicle, check if there's a killer driver of it if killer:getType() == "vehicle" then if killer:getController() then killer = killer:getController(); end end if killer:getType() ~= "player" then return end; if not killer.account:isGuest() then local currentStreak = tonumber(killer:getData("Kills")) or 0; killer:setData("Kills", currentStreak + 1); end end local currentStreak2 = tonumber(source:getData("Deaths")) or 0; source:setData("Deaths", currentStreak2 + 1); end ); addEventHandler("onResourceStop", resourceRoot, function() for _, player in pairs(getElementsByType("player")) do local acc = player:getAccount() if not acc:isGuest() then local currentStreak = tonumber(player:getData("Kills")) or 0; local currentStreak2 = tonumber(player:getData("Deaths")) or 0; local accName = acc:getName(); setDatabaseAccountData(accName, currentStreak, currentStreak2); player:setData("Kills", 0); player:setData("Deaths", 0); end end end ); addEventHandler("onResourceStart", resourceRoot, function() for _, player in pairs(getElementsByType("player")) do local acc = player:getAccount() if not acc:isGuest() then local accName = acc:getName(); local dataKills, dataDeaths = getDatabaseAccountData(accName); if dataKills and dataDeaths then player:setData("Kills", dataKills); player:setData("Deaths", dataDeaths); else player:setData("Kills", 0); player:setData("Deaths", 0); end else player:setData("Deaths", "Guest"); end end end ); addEventHandler("onPlayerJoin", root, function() source:setData("Kills", "Guest"); source:setData("Deaths", "Guest"); end ); addEventHandler("onPlayerLogin", root, function(_, acc) if not acc:isGuest() then local accName = acc:getName(); local dataKills, dataDeaths = getDatabaseAccountData(accName); if dataKills and dataDeaths then source:setData("Kills", dataKills); source:setData("Deaths", dataDeaths); else source:setData("Kills", 0); source:setData("Deaths", 0); end end end ); addEventHandler("onPlayerLogout", root, function(acc) if not acc:isGuest() then local currentStreak = tonumber(source:getData("Kills")) or 0; local currentStreak2 = tonumber(source:getData("Deaths")) or 0; local accName = acc:getName(); setDatabaseAccountData(accName, currentStreak, currentStreak2); source:setData("Kills", 0); source:setData("Deaths", 0); end end ); addEventHandler("onPlayerQuit", root, function() local acc = source:getAccount() if acc and not acc:isGuest() then local currentStreak = tonumber(source:getData("Kills")) or 0; local currentStreak22 = tonumber(source:getData("Deaths")) or 0; local accName = acc:getName(); setDatabaseAccountData(accName, currentStreak, currentStreak2); end end );
  21. You can use this, but if you want save player data SQL is better than XML function savef() local gridText = guiGridListGetItemText( gridlist, row, column ) local RootNode = xmlCreateFile("new.xml"," newroot") local NewNode = xmlCreateChild(RootNode, "newchild") local xmlBindsBranch = xmlFindChild(RootNode,"newchild",0) if ( xmlBindsBranch ) then xmlNodeSetValue( xmlBindsBranch, gridText ) local success = xmlNodeGetValue ( xmlBindsBranch ) -- get "newchild" value if ( success ) then outputChatBox( tostring( success ) ) end end xmlSaveFile(RootNode) xmlUnloadFile(RootNode) end addCommandHandler("createfile", savef)
  22. And if you save the data when the player leaves the server?
  23. Deberías hacer un post más llamativo sobre tu servidor, así tienes más posibilidades de que alguno entre.
  24. it works for me ( i don't speak english ) function join() addEventHandler("onClientKey", root, disableKeys) end addEventHandler("onClientPlayerJoin", root, join) function disableKeys(btn) if ( btn == "F1" or btn == "F2" or btn == "F3" ) then cancelEvent() end end -- or function disableKeys(btn) cancelEvent() end
  25. Try cancelling onClientKey event when player joins
×
×
  • Create New...