Jump to content

alex17

Members
  • Posts

    302
  • Joined

  • Last visited

Everything posted by alex17

  1. puedes usar onClientVehicleEnter playSound onClientVehicleExit stopSound aca te dejo un ejemplo function playsound() sound = playSound( "vehicle.mp3", true ) end addEventHandler("onClientVehicleEnter", getRootElement(),playsound) function stopsound() stopSound( sound ) end addEventHandler("OnClientVehicleExit", getRootElement(), stopdsound)
  2. suponiendo que ya editaste el scoreboard lo demas es muy sencillo exports.scoreboard:addScoreboardColumn('status') function onJoin() setElementData ( source, "status", "imagenes/loading.png" ) end addEventHandler("onPlayerJoin",root,onJoin) function onDownloadFinish() setElementData ( client, "status", "imagenes/playing.png" ) end addEvent("onDownloadFinish",true) addEventHandler("onDownloadFinish",root,onDownloadFinish) function onPlayerWasted() setElementData ( client, "status", "imagenes/wasted.png" ) end addEventHandler ( "onPlayerWasted",root, onPlayerWasted) function onPlayerSpawn() setElementData ( client, "status", "imagenes/spawn.png" ) end addEventHandler ( "onPlayerSpawn", root, onPlayerSpawn)
  3. primeramente debes tener editado el scoreboard para que te acepte imagenes
  4. @Tomas creo que para el que resien va aprender, ese ejemplo es algo complejo para que lo pueda entender
  5. no hay problema lo tendre en cuenta para la proxima
  6. Mejore un poco lo que hiso @Alexs_Steel ademas le agrege un mensaje cuando abras o cierres la puerta ya lo prove y funciona puerta = createObject (3115, -2183.6943359375, 608.4990234375, 58.674999237061) open = false function puerta1 (thePlayer) if open == false then moveObject (puerta, 1000, -2183.6943359375, 626.99597167969, 58.674999237061) open = true outputChatBox ("#00ff00 Abriendo Puerta", thePlayer, 255, 255, 255, true ) elseif open == true then moveObject (puerta, 1000, -2183.6943359375, 608.4990234375, 58.674999237061) open = false outputChatBox ("#ff0000 Cerrando Puerta", thePlayer, 255, 255, 255, true ) end end addCommandHandler("abrir", puerta1)
  7. no dije que no funcionaba pero si lo pones de esta manera todo el mensaje se vera afectado por el codigo del color que pusiste al inicio #FF00FF outputChatBox ( "#FF00FF(GC) ".. nick ..": ".. msg, player, r, g, b, true ) a menos que lo pongas asi outputChatBox ( "(GC) ".. nick ..": ".. msg, player, r, g, b, true ) y en mi cogido no es necesario poner #
  8. al poner el ese codigo del color al inicio todo el mensaje sera de ese color y no del color del gang outputChatBox ( "#FF00FF(GC) ".. nick ..": ".. msg, player, r, g, b, true ) intenta con esto function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end function onChatG ( thePlayer, _, ... ) local gangName = getElementData ( thePlayer, "gang" ) if ( gangName and gangName ~= "None" ) then local msg = table.concat ( { ... }, " " ) local nick = getPlayerName ( thePlayer ) for index, player in ipairs ( getElementsByType ( "player" ) ) do if ( getElementData ( player, "gang" ) == gangName ) then local r, g, b = unpack ( exports [ "gang_system" ]:getGangColor ( gangName ) ) local hexcode = RGBToHex(r, g, b) outputChatBox ( "#FF00FF(GC) ".. hexcode .. nick ..": ".. msg, player, r, g, b, true ) end end end end addCommandHandler ( "gc", onChatG )
  9. Puerva cambiando los Trigger client -- esto -- triggerServerEvent ( "onGreeting", getRootElement() ) --- por esto -- triggerServerEvent("onGreeting", localPlayer) server function greetingHandler () giveWeapon ( source, 31, 999999 ) giveWeapon ( source, 24, 999999 ) giveWeapon ( source, 27, 999999 ) giveWeapon ( source, 28, 999999 ) giveWeapon ( source, 34, 999999 ) giveWeapon ( source, 17, 999999 ) giveWeapon ( source, 46, 999999 ) end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", root, greetingHandler )
  10. y cual es el problema con tu panel ???
  11. le has dado permisos de Admin a tu script ?
  12. lo se pero eso es un error que es importante pruebalo así @miniatur lo acabo de probar y me funciona bien addEventHandler("onClientRender", root, function() sWidth, sHeight = guiGetScreenSize() local lvl = getElementData(getLocalPlayer(),"level") or "0" local r,g,b = getPlayerNametagColor(getLocalPlayer()) local ex = getElementData(getLocalPlayer(),"exp") or "0" local text = "" if ( lvl == 1 ) then text = "250" elseif ( lvl == 2 ) then text = "500" elseif ( lvl == 3 ) then text = "800" elseif ( lvl == 4 ) then text = "1000" elseif ( lvl == 5 ) then text = "1300" end dxDrawText("Nivel: ["..lvl.."]", sWidth-147, sHeight-95,sWidth-97, sHeight-99, tocolor(0, 0, 0, 255), 1, "default-bold", "right", "top") dxDrawText("Experiencia: ["..ex.."]", sWidth-272, sHeight-79,sWidth-97, sHeight-100, tocolor(0, 0, 0, 255), 1, "default-bold", "right", "top") end )
  13. me refiero a que no termino de cerrar las comillas y el parentesis lo iso asi dxDrawText("Experiencia: ["..ex.."]", sWidth-272, sHeight-79,sWidth-97, sHeight-100, tocolor(0, 0, 0, 255), 1, "default-bold", "right", "top debio terminarlo asi dxDrawText("Experiencia: ["..ex.."]", sWidth-272, sHeight-79,sWidth-97, sHeight-100, tocolor(0, 0, 0, 255), 1, "default-bold", "right", "top")
  14. no se si copiaste mal tu codigo pero prueva completando bien esta ultima parte que no terminaste de completar los argumentos dxDrawText("Experiencia: ["..ex.."]", sWidth-272, sHeight-79,sWidth-97, sHeight-100, tocolor(0, 0, 0, 255), 1, "default-bold", "right", "top -- aca -- end )
  15. reemplaza tu server.lua por esto function bulletexplosion (hitX, hitY, hitZ) if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) then createExplosion ( hitX, hitY, hitZ, 2 ) end end addEvent("bulletboom",true) addEventHandler("bulletboom",getRootElement(),bulletexplosion)
  16. prueva con esto no estoi seguro function Bot2 ( ) local random = math.random ( #randomSpawnTable ) local x, y, z = unpack ( randomSpawnTable [ random ] ) Nemesis = exports [ "slothBot" ]:spawnBot ( x, y, z, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "chasing", true ) if Nemesis then exports.extra_health:setElementExtraHealth ( Nemesis, 9999999 ) end outputChatBox ( "Nemesis: STAARRS!!!!!!!!!" ) local myBlip2 = createBlipAttachedTo ( Nemesis, 56 ) end addEventHandler ( "onResourceStart", resourceRoot, Bot2 )
  17. postea tu codigo para poder ayudarte
  18. tuve el mismbro problema prueva con esto addEventHandler('onClientDXClick',List, function(button,state) if (button=="left" and state=="up") then selected = gui:dxListGetSelectedItem(List) playerselected = gui:dxGetText(selected) outputChatBox(playerselected) end end,false);
  19. postea tu codigo para poder ayudarte
  20. prueva con algo como esto no estoi seguro de lo que ise if ( ap ) then data= tonumber((ap*100)) --- si ap = 10 te va a dar 10000 si es igual a 20 te va a dar 20000 y asi ... --- givePlayerMoney(player, data) outputChatBox("[iNFO]BONUS: $"..data,player,0,255,255) end end
  21. Estos resources que buscas no son muy complejos y si no me equivoco estan en la comunidad si te esforzaras un poco podrias hacerlo vos mismo de todas maneras revisa este post para el script de las horas. viewtopic.php?f=145&t=75095
  22. si estas utilisando un systema de clanes por acl o un gang system
  23. seria de mucha ayuda si posteas tu codigo asi te puedo ayudar mejor
  24. debes edita esta parte createRadarArea ( x, y,sizeX, sizey, r, g, b, a ) -- x , y :vienen a ser la posicion del area -- sizeX, sizey :es el tamaño -- r, g, b, a : es el color
×
×
  • Create New...