Jump to content

JAVI10210

Members
  • Posts

    39
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by JAVI10210

  1. Buenas a todos. A ver, quiero hacer esto: local ntest = 0000 local id = 32 local suma = id + ntest local suma = tonumber(suma) El problema es que al hacer eso, quiero que suma fuera 0032, y sin embargo, MTA me quita los 0 y me lo deja en 32.
  2. Prueba esto: local Area = createColCircle ( 1481.2875976563,-1655.6435546875, 1000 ) function Mutacion (pHitElement) local ID = getElementModel(pHitElement) local Mutta = getElementData(pHitElement,"Mutacion") or 0 if getElementType(pHitElement) == 'player' then Muta = setTimer(Mutacion,10000,0) if ID == 260 then return else setElementData(pHitElement,"Mutacion", Mutta + 10) if Mutta >= 100 then ---setElementData(localPlayer,"blood",5) setElementData(pHitElement,"bleeding",500) elseif Mutta >= 50 then setElementData(pHitElement,"bleeding",200) ---setElementData(localPlayer,"pain",true) end end end end addEventHandler('onClientColShapeHit', Area, Mutacion) addEventHandler('onClientColShapeLeave', Area, function (pHitElement) if getElementType( pHitElement ) == 'player' then if Muta then killTimer(Muta) end end end ) addEventHandler('onClientPlayerWasted', root, function () killTimer(Muta) setElementData(localPlayer,"Mutacion",0) end )
  3. Lo que yo te recomendaría es que cambiaras la contraseña del FTP, y del TCAdmin por una más segura. En http://password.es te generan passwords super seguras. En cuanto al DoS, eso lo tiene que resolver tu host, pero vamos, que un DoS te deniega el acceso a entrar al server. No accede a la FTP y te borra archivos.
  4. And now, all the servers hosted in Sane they are offline...
  5. Una solucion más sencilla sería poner cada marker separado y usar el evento onMarkerHit.
  6. I went offline, you see, computer or sanehosting is not my life. I would never block anyone from skype, if guy annoys me, i will delete him, blocking is for gays. Little notification to everybody: We are experiencing problems with TCAdmin like someones have noticed so it is pretty normal that starting and stopping can be bit slow and server status is unknown for littlewhile. Waiting support from TCA... And now, I can´t access the FTP server... Very Well Sane!
  7. Buenas a todos. Quiero hacer un /nearbyints para ver los interiores cercanos ( Paradise ) He hecho esto, pero no me funciona. ¿Me podeis ayudar? addCommandHandler ( " nearbyints " function ( player, commandName ) hasObjectPermissionTo if ( player, " command.createint ", false ) or hasObjectPermissionTo ( player, " command.deleteint ", false ) then Local x , y, z = getElementPosition ( player) Local dimension = getElementDimension ( player) Local inner = getElementInterior ( player) outputChatBox ( "Nearby Interiors " , player , 255, 255, 0 ) for key, value in pairs ( interiors ) do isElement if (key) and getElementDimension (key) == dimension and getElementInterior (key) == inside then Local getDistanceBetweenPoints3D distance = (x, y, z, getElementPosition (key) ) if distance < 20 then outputChatBox ( "Interior" .. value .. " . " player , 255, 255, 0 ) end end end end end ) PD: Solo es porque estoy aprendiendo a scriptear, así que no tengo prisa ni nada.
  8. No me refiero a esto, me refiero al /call 911 Y que avise a los policias, por ejemplo. O darme un ejemplo y ya lo monto yo.
  9. Buenas. Estoy montando mi propio servidor de rol, y necesito el phones ya hecho, que por ejemplo al llamar 911 llame a la policia. Muchas gracias, y espero respuesta.
  10. Hola, estoy montando un server con MTA Paradise, y va todo genial, pero tengo algunas dudas, y un problema con una resource, bueno, empezemos. 1. Cuando te metes al sv, esta en ingles todo eso, donde edito eso, lo de new chartacter y todo eso, es que no se donde. 2. Lo de la resource: local rbWindow, rbList, bUse, bClose, tempObject, tempObjectID, tempObjectRot = nil local tempObjectPosX, tempObjectPosY, tempObjectPosZ, tempObjectPosRot = nil local roadblockID = { "978", "981", "3578", "1228", "1282", "1422", "1424", "1425", "1459", "3091" } -- objectid local roadblockTypes = { "Bloqueo pequeño", "Bloqueo grande", "Barrera amarilla", "Pequeña barrera de aviso", "Pequeña barrera de aviso con luz", "Barrera fea pequeña", "Bloqueo de paso", "Desvio ->", "Barrera de aviso","Vehiculos ->" } -- name local roadblockRot = { "180", "0", "0", "90", "90", "0", "0", "0", "0", "0" } -- rotation needed to face to player local thePlayer = getLocalPlayer() function enableRoadblockGUI(enable) if not (rbWindow) then local width, height = 300, 400 local scrWidth, scrHeight = guiGetScreenSize() local x = scrWidth*0.8 - (width/2) local y = scrHeight*0.75 - (height/2) rbWindow = guiCreateWindow ( x, y, width, height, "Crear bloqueos", false) rbList = guiCreateGridList(0.05, 0.05, 0.9, 0.8, true, rbWindow) addEventHandler("onClientGUIDoubleClick", rbList, selectRoadblockGUI, false) local column = guiGridListAddColumn(rbList, "ID", 0.2) local column2 = guiGridListAddColumn(rbList, "Tipo", 0.6) local column3 = guiGridListAddColumn(rbList, "Rot", 0.1) for key, value in ipairs(roadblockID) do local newRow = guiGridListAddRow(rbList) guiGridListSetItemText(rbList, newRow, column, roadblockID[key], true, false) guiGridListSetItemText(rbList, newRow, column2, roadblockTypes[key], false, false) guiGridListSetItemText(rbList, newRow, column3, roadblockRot[key], false, false) end bUse = guiCreateButton(0.05, 0.85, 0.45, 0.1, "Usar", true, rbWindow) addEventHandler("onClientGUIClick", bUse, selectRoadblockGUI, false) bClose = guiCreateButton(0.5, 0.85, 0.45, 0.1, "Cerrar", true, rbWindow) addEventHandler("onClientGUIClick", bClose, cancelRoadblockGUI, false) outputChatBox("Selecciona una barrera y ponla donde tu quieras.", 0, 255, 0) outputChatBox("Pulsa alt izda para poner el objeto.", 0, 255, 0) showCursor(true) else cleanupRoadblockGUI() end end function cleanupRoadblockGUI() cleanupRoadblock() destroyElement(rbWindow) rbWindow = nil showCursor(false) end function cleanupRoadblock() if (isElement(tempObject)) then destroyElement(tempObject) tempObjectPosX, tempObjectPosY, tempObjectPosZ, tempObjectPosRot = nil tempObjectID, tempObjectRot = nil unbindKey ( "lalt", "down", convertTempToRealObject) end removeEventHandler("onClientPreRender",getRootElement(),updateRoadblockObject) end function selectRoadblockGUI(button, state) if (source==bUse) and (button=="left") or (source==rbList) and (button=="left") then local row, col = guiGridListGetSelectedItem(rbList) if (row==-1) or (col==-1) then outputChatBox("¡Por favor elige un tipo!", 255, 0, 0) else if (isElement(tempObject)) then destroyElement(tempObject) end local objectid = tonumber(guiGridListGetItemText(rbList, guiGridListGetSelectedItem(rbList), 1)) local objectrot = tonumber(guiGridListGetItemText(rbList, guiGridListGetSelectedItem(rbList), 3)) spawnTempObject(objectid, objectrot) showCursor(false) end end end function spawnTempObject(objectid, objectrot) -- create temporary object tempObjectID = objectid tempObjectRot = objectrot tempObject = createObject( objectid, 0, 0, 0, 0, 0, 0) setElementAlpha(tempObject, 150) setElementInterior ( tempObject, getElementInterior ( thePlayer ) ) setElementDimension ( tempObject, getElementDimension ( thePlayer ) ) bindKey ( "lalt", "down", convertTempToRealObject) updateRoadblockObject() addEventHandler("onClientPreRender",getRootElement(),updateRoadblockObject) end function convertTempToRealObject(key, keyState) if (isElement(tempObject)) then triggerServerEvent("roadblockCreateWorldObject", thePlayer, tempObjectID, tempObjectPosX, tempObjectPosY, tempObjectPosZ, tempObjectPosRot) cleanupRoadblock() showCursor(true) end end function updateRoadblockObject(key, keyState) if (isElement(tempObject)) then local distance = 6 local px, py, pz = getElementPosition ( thePlayer ) local rz = getPedRotation ( thePlayer ) local x = distance*math.cos((rz+90)*math.pi/180) local y = distance*math.sin((rz+90)*math.pi/180) local b2 = 15 / math.cos(math.pi/180) local nx = px + x local ny = py + y local nz = pz - 0.5 local objrot = rz + tempObjectRot if (objrot > 360) then objrot = objrot-360 end setElementRotation ( tempObject, 0, 0, objrot ) moveObject ( tempObject, 10, nx, ny, nz) tempObjectPosX = nx tempObjectPosY = ny tempObjectPosZ = nz tempObjectPosRot = objrot end end function cancelRoadblockGUI(button, state) if (source==bClose) and (button=="left") then cleanupRoadblockGUI() end end addEvent( "enableRoadblockGUI", true ) addEventHandler( "enableRoadblockGUI", getRootElement(), enableRoadblockGUI ) addCommandHandler("bloqueos", enableRoadblockGUI) Todo va bien, pero cuando le doy ya al lalt para ponerlo, el srv en la consola me da el siguiente error: but event is not added serverside. Espero respuestas.
  11. A ver, ahora que ha pasado el tiempo, tengo varias dudas mas: 1.¿No hay un freeroam o un script ya hecho para lo del coche? 2.La mayoria de las veces, al intentar warp con el freeroam no va, sabes por que o hay algún fix o algo? 3. El godmode va perfecto, pero al montar en un coche si te dan al coche, te matas. En un server he visto que al poner /dp siendo staff, todos los coches si tu vas conduciendo son indestructibles. ¿Hay algo asi?
  12. Unas preguntas, en algunos servers, al cojer un coche en el freeroam, ya apareces montado en el. ¿Cómo se hace eso? Y también, para que salga en las listas, como cualquier otro server, ¿Qué debo hacer?
  13. Gracias, todo me ha servido.Otra pregunta, como puedo crear un recurso para lo de godmode? es que no tengo ni idea... Y ya la ultima, muchos servers, debajo del dinero tienen un numerito rojo que indican cuantos zombies has matado. ¿Que resource es ese? Lo busco pero nunca lo encunetro.
  14. Hola, me presento, Soy JAVI10210 y quiero haceros varias preguntas que no consigo yo solo resolverlas. 1. ¿Que hay que hacer para que se pueda disparar desde los coches? 2. ¿Cual es el comando para ponerse godmode e invisible? 3. ¿Alguna recomendación sobre algún panel que tenga para poder poner godmode e invisible? 4. ¿Sabeis que resource se utiliza para proteger el spawn que hay en los santos? Acuden todos los zombies, y matan. No me refiero a un resource que pasados 10 segundos ya te atacan, no, me refiero a que yo le doy unas coordenadas, y todo eso lo protege, y al intentar entrar un zombie muere. Y eso es todo, espero respuesta
×
×
  • Create New...