Jump to content

0xCiBeR

MTA Team
  • Posts

    1,673
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by 0xCiBeR

  1. @Renkon deja que lo pruebe antes de decir que esta mal.Para que usarias un trigger client side si el script es client side? es ilogico.Lo que puede hacer es triggear una funcion dentro del mismo script client side.
  2. function zombieSpawning() for i, ped in ipairs(getElementsByType("ped")) do --PLAY ZOMBIE SOUNDS local Zx,Zy,Zz = getElementPosition( ped ) local randnum = math.random(1,10) local gemido = playSound3D("sounds/mgroan"..randnum..".ogg", Zx, Zy, Zz, false) setSoundMaxDistance(gemido, 20) if gemido then setTimer(function () stopSound(gemido),10000,1) end local x, y, z = getElementPosition(getLocalPlayer()) local material, hitX, hitY, hitZ = isObjectAroundPlayer2(getLocalPlayer(), 30, 3) if material == 0 and not isInBuilding(x, y, z) then triggerServerEvent("createZomieForPlayer", getLocalPlayer(), hitX, hitY, hitZ) end end end setTimer(zombieSpawning, 3000, 0)
  3. getVehicleNameFromModel getVehicleName getPedOccupiedVehicle
  4. No es un problema del evento, sino del spawn..
  5. Ya se, pero es mas eficiente que se accione tras un evento.. De igual manera, no funciona, ya lo hable con el por privado
  6. Lo que quiere es que los teams se creen antes que los jugadores den spawn..Entonces cuando dan spawn, ya estan creados los team..
  7. Server - Side: Con eso deberia funcionar..Inicia eso y luego reinicia el spawn.. function teams () createTeam ("G.G.C", 0, 66, 66) createTeam ("B.F.P.A", 0, 0, 0) createTeam ("U.S.F.U", 102, 51, 51) createTeam ("U.T.R", 102, 102, 102) createTeam ("C.E.A", 0, 0, 68) createTeam ("S.T.T.A", 97, 185, 164) end addEventHandler ( "onResourceStart", getThisResource(), teams )
  8. Fail mio..No era lo que pedias, vas a tener que hacerlo me parece..
  9. Eso es porque tenes un timer infinito... -- usa esto, o un trigger desde el server side: function zombieSpawning() for i, ped in ipairs(getElementsByType("ped")) do --PLAY ZOMBIE SOUNDS local Zx,Zy,Zz = getElementPosition( ped ) local randnum = math.random(1,10) local gemido = playSound3D("sounds/mgroan"..randnum..".ogg", Zx, Zy, Zz, false) setSoundMaxDistance(gemido, 20) local x, y, z = getElementPosition(getLocalPlayer()) local material, hitX, hitY, hitZ = isObjectAroundPlayer2(getLocalPlayer(), 30, 3) if material == 0 and not isInBuilding(x, y, z) then triggerServerEvent("createZomieForPlayer", getLocalPlayer(), hitX, hitY, hitZ) end end end addCommandHandler("gemido",zombieSpawning)
  10. Podes usar el de Sora..Esta en la comunidad..Y adaptarlo a tus necesidades.. Sino puedes hacer uno como yo..No es tan difici
  11. @Pekio te falto sacar theClient de los argumentos addEvent("Ban", true ) addEventHandler("Ban", root, function (reason, punished, timePunish) if ( hasObjectPermissionTo ( client, "function.banPlayer" ) ) then banPlayer ( punished, client, reason ) for _, player in ipairs ( getElementsByType ( "player" ) ) do outputChatBox ( "" .. punished .. " Fue Baneado Por ".. timePunish .." (Razon: ".. reason ..".", player, 255, 0, 0, true ) exports["notifications"]:showBox ( theClient, "info","El Usuario " .. punished .. " Ha Sido Baneado Exitosamente!!\n\nRazon: " .. reason .. "." ) exports["notifications"]:showBox ( theClient, "error","Usted No Posee Los Permisos para Banear!!" ) end end end )
  12. Un ejemplo function masa(yo,cmd,valor) if valor then local veh = getPedOccupiedVehicle ( yo ) -- obtener el auto local variable = tonumber(valor) setVehicleHandling ( veh, "mass", variable ) end end addCommandHandler ( "cambiarmasa", masa)--El comando seria /cambiarmasa [Nuevo valor de Masa] Otro ejemplo: function hand(yo,cmd,propiedad,valor) if propiedad and valor then local veh = getPedOccupiedVehicle ( yo ) -- obtener el auto local variable = tonumber(valor) setVehicleHandling ( veh, propiedad, variable ) end end addCommandHandler ( "hand", hand)--El comando seria /hand [propiedad a cambiar][valor de la propiedad] Tambien podes usar:(para modificar el handling para todos los autos de ese modelo) bool setModelHandling ( int modelId, [ string property, var value ] )
  13. 0xCiBeR

    Gui

    Asi tampoco me lo abre.. GUIEditor = { window = {}, edit = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(178, 218, 641, 409, "Guia del server", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible ( GUIEditor.window[1], false ) GUIEditor.edit[1] = guiCreateEdit(9, 21, 588, 28, " Bienvenido al servidor", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(582, 28, 15, 132, "", false, GUIEditor.edit[1]) Guia_del_server = guiCreateEdit(6666, 52, 0, 20, "", false, GUIEditor.window[1]) GUIEditor.memo[1] = guiCreateMemo(10, 48, 583, 330, "Hola bienvenido al server,mientras que estas aqui no olvides divertirte y pasarla bien recuerda qué cada vez que mejoremos mejor sera tu divercion. \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />", false, GUIEditor.window[1]) end ) abierto = false function gui() if abierto == false then guiSetVisible(GUIEditor.window[1], true) showCursor(true) abierto = true else abierto = false guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end bindKey("f1","down",gui)
  14. Porque en el meta del Gang system espesifica un minimo de version del cliente..Podes sacarle esa limitacion del Meta removiendo min client version(aunque no lo recomiendo) o directamente forzando que cada cliente que se conecte a tu server use la ultima version espesificando en tu mtaserver.config min client version. Saludos
  15. Ah, entonces con la funcion exportada spawnZombie lo podes hacer perfectamente
  16. 0xCiBeR

    Gui

    No me abre el GUI: GUIEditor = { window = {}, edit = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(178, 218, 641, 409, "Guia del server", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible ( GUIEditor.window[1], false ) GUIEditor.edit[1] = guiCreateEdit(9, 21, 588, 28, " Bienvenido al servidor", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(582, 28, 15, 132, "", false, GUIEditor.edit[1]) Guia_del_server = guiCreateEdit(6666, 52, 0, 20, "", false, GUIEditor.window[1]) GUIEditor.memo[1] = guiCreateMemo(10, 48, 583, 330, "Hola bienvenido al server,mientras que estas aqui no olvides divertirte y pasarla bien recuerda qué cada vez que mejoremos mejor sera tu divercion. \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />", false, GUIEditor.window[1]) end ) local jugador = getLocalPlayer() abierto = false addEventHandler("onClientResourceStart",getRootElement(), function() for theKey,thePlayer in ipairs(getElementsByType ( "player" )) do bindKey(thePlayer,"f1","down",gui) end end ) function gui() if abierto == false then guiSetVisible(GUIEditor.window[1], true) showCursor(true) abierto = true else abierto = false guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end
  17. Dijiste dentro de un interior..No al entrar a la zona del area 51.. De igual manera podes usar colShapes..Buscalo en la wiki
  18. Well it's a pretty simple question..How do you update your server to 1.3.4?? Thx
  19. No es un tema del ACL..El join Flood es un metodo anti Flood por multiples conexiones repetidas y canceladas..Aparentemente no tiene solución, solo pueden esperar los afectados hasta que se les salga el bloqueo.
  20. Usa la funcion exportada del Script: element createZombie( float x, float y, float z, [int rotation = 0, int skinID = 0, int interior = 0, int dimension = 0 ] ) Wiki Zombie
  21. 0xCiBeR

    dxDrawLine

    Bueno mi idea es hacer como una linea como la del medidor de Pulsos de un hospital..Que valla variando de acuerdo a la vida que tenemos..Cuanto menos vida tenemos menos va a ser la onda.. PD:La idea es que esta linea se mueva..O sea que ocile Que funciones puedo utilizar? Gracias!
×
×
  • Create New...