Jump to content

PhantomDamn

Members
  • Posts

    381
  • Joined

  • Last visited

Everything posted by PhantomDamn

  1. Ese es el ejemplo de la wiki, pero el unico numero que veo es el "2000" y supongo que tambn hace referencia del 2000 del setTimer que se encuentra debajo... por si quiza no haya puesto todo lo que refiere al error me asegurare de pegar todo el script : gateList = {} gateListMoveToX = {} gateListMoveToY = {} gateListMoveToZ = {} gateListMoveTorX = {} gateListMoveTorY = {} gateListMoveTorZ = {} shapes = {} team = {} temp = {} status = {} -- 0 = not moving. 1 = moving to open. 2 = moving to close function checkClass(hitElement, matchingDimension) if ( getElementType(hitElement) == "vehicle" ) then hitElement = getVehicleController(hitElement) end for i=0,#gateList do local name = getTeamName(getPlayerTeam(hitElement)) if(name == false) then name = "false" end if ( name == team[i] or name == "true") then detection = isElementWithinColShape ( hitElement, shapes[i] ) if detection == true then move(i, false) end end end end function loadup(startedResource) gates = xmlLoadFile ( "gates.xml" ) count = xmlNodeGetChildren(gates) for i=1,#count do local gate = xmlFindChild ( gates, "gate", i-1 ) local attributes = xmlNodeGetAttributes ( gate ) for name,value in pairs ( attributes ) do temp["" .. name .. ""] = value end gateList[i] = createObject(temp["objectID"], temp["x"], temp["y"], temp["z"], temp["rx"], temp["ry"], temp["rz"]) gateListMoveToX[i] = temp["x2"] gateListMoveToY[i] = temp["y2"] gateListMoveToZ[i] = temp["z2"] gateListMoveTorX[i] = temp["rx2"] gateListMoveTorY[i] = temp["ry2"] gateListMoveTorZ[i] = temp["rz2"] outputDebugString("" .. temp["objectID"] .. "") shapes[i] = createColRectangle(temp["collisionx"], temp["collisionY"], temp["collisionZ"], temp["collisionSize"],temp["collisionSize"]) team[i] = temp["team"] setElementInterior(gateList[i], temp["interiorID"]) status[i] = 0 addEventHandler ( "onColShapeHit", shapes[i], checkClass ) end xmlUnloadFile ( gates ) end function move(gateIndex, rotate) -- 0 = not moving. 1 = moving to open. 2 = moving to close outputDebugString("moving..") x,y,z = getElementPosition(gateList[gateIndex]) rx,ry,rz = getObjectRotation(gateList[gateIndex]) if status[gateIndex] == 0 then moveObject ( gateList[gateIndex], 2000, gateListMoveToX[gateIndex], gateListMoveToY[gateIndex],gateListMoveToZ[gateIndex]) status[gateIndex] = 1 setTimer ( moveBack, 3000, 1,gateIndex, x,y,z,rx,ry,rz, raising ) end end function moveBack(index, x,y,z, raising) if status[index] == 1 then status[index] = 2 moveObject ( gateList[index], 2000, x,y,z, gateListMoveTorX[gateIndex],gateListMoveTorY[gateIndex],gateListMoveTorZ[gateIndex],rx,ry,rz ) setTimer ( resetTimer, 2000, 1, index ) end end function resetTimer(index) status[index] = 0 end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), loadup ) Este es el archivo "New_gatemaker" https://community.multitheftauto.com/index.php?p=resources&s=details&id=3949
  2. False: https://community.multitheftauto.com/index.php?p=resources&s=details&id=6076 Original: https://community.multitheftauto.com/index.php?p=resources&s=details&id=3949 Creator: Yasser_2012 DONE
  3. Esto me tira error: gateList = {} gateListMoveToX = {} gateListMoveToY = {} gateListMoveToZ = {} gateListMoveTorX = {} gateListMoveTorY = {} gateListMoveTorZ = {} function moveBack(index, x,y,z, raising) if status[index] == 1 then status[index] = 2 moveObject ( gateList[index], 2000, x,y,z, gateListMoveTorX[gateIndex],gateListMoveTorY[gateIndex],gateListMoveTorZ[gateIndex],rx,ry,rz ) setTimer ( resetTimer, 2000, 1, index ) end end ERROR:'move' [Expected easing-type at argumen 9, got numer '0' ] PD: el error esta en la linea 14. alguna idea de porque? o quiza algo que ya la nueva version no reconoce...
  4. Lo testeare de nuevo y te aviso en un momento. ---------------------------------------------------------- Efectivamente, tratare de ver por que.
  5. Si desaparecen, ya lo comprove.. solo debes cambiar el setTimer esta en 20000 milisegundos ( 20 Segundos ) , o quiza no tengas la ultima version ( https://community.multitheftauto.com/index.php?p=resources&s=details&id=2363 )
  6. el post esta resuelto.. pero tengo una duda.. si en mi servidor uso mas de 5 mapas y solo le edito esto a uno solo que pasaria?
  7. agrega este escript al client side.. y le modificas el texto, te aparecera a cierta distancia del marker. --\\\\\\\\\\\\\\\\\\\\\\\\\\ --// Setting local g_screenX, g_screenY = guiGetScreenSize(); local gScale = 0.3; local gAlphaDistance = 25; local gMaxDistance = 50; -- Max Distance local gTextAlpha = 120; local gTextSize = 1; local gAlphaDiff = gMaxDistance - gAlphaDistance; gScale = 1 / gScale * 800 / g_screenY; local gMaxScaleCurve = { { 0, 0 }, { 3, 3 }, { 13, 5 } }; local gTextScaleCurve = { { 0, 0.8 }, { 0.8, 1.2 }, { 99, 99 } }; local gTextAlphaCurve = { { 0, 0 }, { 25, 100 }, { 120, 190 }, { 255, 190 } }; local marker = createMarker( 2104.6, -1787.8, 12.6, 'Cylinder', 1.5, 255, 255, 0, 0 ); addEventHandler ( 'onClientRender', root, function ( ) -- local x, y, z = getCameraMatrix(); local x1, y1, z1 = getElementPosition ( marker ); local distance_1 = getDistanceBetweenPoints3D( x, y, z, x1, y1, z1 ); -- -- Marker #1 if distance_1 <= gMaxDistance then local x1_, y1_ = getScreenFromWorldPosition( x1, y1, z1 + 0.95, 0.06 ); if x1_ and y1_ then -- local scale = 1 / ( gScale * ( distance_1 / gMaxDistance ) ); local alpha = ( ( distance_1 - gAlphaDistance ) / gAlphaDiff ); alpha = ( alpha < 0 ) and gTextAlpha or gTextAlpha - ( alpha * gTextAlpha ); scale = math.evalCurve( gMaxScaleCurve, scale ); local textscale = math.evalCurve( gTextScaleCurve, scale ); local textalpha = math.evalCurve( gTextAlphaCurve, alpha ); -- dxDrawText( "Agregar palabra o frase aqui", x1_, y1_, x1_, y1_, tocolor ( 255, 0, 0, textalpha ), textscale * gTextSize, "Bankgothic", "center", "bottom", false, false, false, true ); end end end ); -- ////////////////////////////////// -- // MATH FUNCTIONS // -- ////////////////////////////////// function math.evalCurve( curve, input ) if input < curve[ 1 ][ 1 ] then return curve[ 1 ][ 2 ]; end for idx = 2, #curve do if input < curve[ idx ][ 1 ] then local x1 = curve[ idx - 1 ][ 1 ]; local y1 = curve[ idx - 1 ][ 2 ]; local x2 = curve[ idx ][ 1 ]; local y2 = curve[ idx ][ 2 ]; local alpha = ( input - x1 ) / ( x2 - x1 ); return math.lerp( y1, y2, alpha ); end end return curve[ #curve ][ 2 ]; end function math.lerp( from, to, alpha ) return from + ( to-from ) * alpha; end
  8. en la comunidad hay diversos scripts para estos busca por spawn vehicles, spawn cars.. tambn hay scripts con markers que te cambian el team ( si es que eres perezoso para crear o reparar los scrips )
  9. I was not the creator of this, just edit it but it is not mine... thx Solid
  10. https://wiki.multitheftauto.com/wiki/Scripting_Introduction
  11. https://community.multitheftauto.com/index.php?p=resources&s=details&id=6325 detener el tiempo para el clima puedes usar el panel admin en la tabla "Server"
  12. por eso en el grupo Console agrego resource.black ( nombre del script ) o hay que agregar como user?
  13. por que el recurso de la comunidad "bl" no me quiere funcionar.. le agrego resource.bl en el grupo Console y le he dado en Admin y no me sirve el comando bl... aqui les dejo el link https://community.multitheftauto.com/index.php?p=resources&s=details&id=8185
  14. Listo, solucionado gracias
  15. Claro mira la imagen, y ahi debajo se ve el error que me tira
  16. alguna ayuda function login() if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then outputChatBox("* #000000[LOGIN] #ffffff El Super Moderador" .. getPlayerName(source) .. "#000000, #00bbcc Ha logueado #000000!!", getRootElement(), 255,0,0, true) -- elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then outputChatBox("* #000000[LOGIN] #ffffff El Admin " .. getPlayerName(source) .. "#000000, #00bbcc Ha logueado #000000!!", getRootElement(), 255,0,0, true) end -- The End of " if " elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("VIP")) then outputChatBox("* #ff0000[LOGIN] #ffffff El VIP" .. getPlayerName(source) .. "#000000, #00bbcc Ha logueado #000000!!", getRootElement(), 255,0,0, true) end no me quiere andar y el error esta en la linea 9 ._.
  17. Exacto, hay dos GUI y ambas aparecen al mismo tiempo, Pero el login aparece primero, le he agregado imagenes estaticas y usado guiSetVisible y no he podido... mis players loguean en f8 ya que el spawn no lo permite ------------------- Ya solucione el problema, edite unas cosas del spawn y mas unas lineas que me envio alexs.
  18. Testie el spawn_localitation y no tiene nada de malo ahi te mando un screenshot
  19. Que tipo de spawn estas usando o bien puedes postear el script
  20. I need the main functions, just that. (Use google translator)
  21. hi guys... i wanna make a gang system ... can you tell me some Funtions??
  22. Si es cierto.. ellos hacen una muralla como la de Berlin y no dejan entrar a nadie.. un elefante rosa me lo conto ( )
  23. El admin2 no se para que sirve y no me interesa, yo siempre elimino la carpeta completa y se quita el error que muestra al dar refresh
  24. Tengo un spawn creado por SolidSnake y de igualmanera el gang system.. necesito un gang system que abra la GUI por medio de bindkey, otra GUI que abra por AddCommandHandler para poder ver la lista de los clanes con la cuenta de sus respectivos lideres, una funcion para que los players puedan ver que miembros de su clan esta conectado...
×
×
  • Create New...