-
Posts
2,869 -
Joined
-
Last visited
Everything posted by Alexs
-
btn = {}Lbl = {} mgv = guiCreateWindow(262, 241, 291, 129, "Mensaje global", false) guiWindowSetSizable(mgv, false) guiSetVisible(mgv,false) btn[1] = guiCreateButton(200, 61, 82, 26, "Enviar", false, mgv) btn[2] = guiCreateButton(9, 94, 82, 26, "Cancelar", false, mgv) mge = guiCreateEdit(9, 64, 189, 20, "", false, mgv) Lbl[1] = guiCreateLabel(17, 33, 253, 15, "INTRODUCE EL MENSAJE", false, mgv) guiSetFont(Lbl[1], "default-bold-small") guiLabelSetHorizontalAlign(Lbl[1], "center", false) guiLabelSetVerticalAlign(Lbl[1], "center") Lbl[2] = guiCreateLabel(102, 107, 183, 15, "Attack of the Terrorist!", false, mgv) guiSetFont(Lbl[2], "default-bold-small") guiLabelSetColor(Lbl[2], 30, 30, 30) guiLabelSetHorizontalAlign(Lbl[2], "center", false) guiLabelSetVerticalAlign(Lbl[2], "center") addCommandHandler("gmsg",function()guiSetVisible(mgv,true)showCursor(true)end) addEventHandler("onClientGUIClick",root,function() local msj = guiGetText(mge) if btn[1] == source and msj ~= "" then text = msj addEventHandler("onClientRender",root,envio) setTimer(function()removeEventHandler("onClientRender",root,envio)end,2000,1) elseif source == btn[2] then guiSetVisible(mgv,false)showCursor(false) end end) function envio() dxDrawText(tostring(text), 0, -2, 799, 598, tocolor(200, 0, 0, 255), 2.00, "pricedown", "center", "center", false, false, false, false, false) end 'mge' es un label, no un string, utiliza eso.
-
LOL Yo estaba en clases y me perdí la ultima discusión.
-
-
Buenas a todos, les vengo a publicar una guía de como hacer un post de mas de 40 respuestas y que este sea cerrado en menos de 10 horas. Crear una comunidad medianamente grande de servidores (o en su defecto, robarla). Conseguir a un usuario con conflictos megalomanos para que apoye vagamente. *Es importante que el usuario anterior tenga acceso a todo. Esmerarse en hacer que la comunidad crezca hasta un punto decente. Esperar a tener muchos reclamos del usuario mencionado en el paso 2. Expulsarlo de la comunidad y liarsela un poco. El usuario debe tomar posesión de todo lo posible y luego largarse. El usuario tomara algo de venganza publicando las cosas que tomo. Ahora es cuando se deben tomar acciones. (Por ejemplo, dejarlo todo) El usuario ahora publicara el post. Al cabo de unos momentos comenzara una discusión sobre la veracidad de lo que dice. Esperar a que vengan muchos usuarios recién registrados a calentar la cosa. Defenderse con pruebas medianamente coherentes para evitar que la discusión se muera. Esperar a @Solidsnake14 quien cerrara el post. De paso quizá la discusión se pase a otros posts que no tienen absolutamente nada que ver. (@PhantomDamn) Si siguen estos pasos, conseguirán un buen foro bardo y un post muy, muy inútil. -Dato útil, no hago esto para armar otra discusión de pendejos, solo para reírme y tomar las cosas con cierto humor. Realmente ni se ni me interesa saber nada de lo que paso, así que os pido por favor (se que no cumplirán) que publiquen solo con tono humorístico y no sigan con la discusión anterior que no tenia ningún sentido.
-
crun local x, y, z, lx, ly, lz = getCameraMatrix() setClipboard( x..", "..y..", "..z..", "..lx..", "..ly..", "..lz ) Ejecuta ese comando con el runcode y la posición actual de la cámara local quedara en el porta papeles (Control + V).
-
¿Que tal Payment Wall? Cada donación latinoamericana de 1U$D la recibes como la basta cantidad de 0.01U$D.
-
Ok gracias que argumentos estan mal? 'getTeamName' requiere un 'team', pero tu proporcionas un jugador ( localPlayer ) y mas abajo, concaneas una variable no definida.
-
Pusiste 'getTeamname', pero es 'getTeamName' con mayúscula. -También te recomiendo leer mejor la Pagina en la Wiki de algunas de tus funciones, ya que proporcionas argumentos erróneos.
-
El tuyo también falla: 'getElementModel' devuelve un Numero, no un string.
-
Eso no sirve, 'auto' es un boolean, no un numero y mucho menos un string.
-
Esto en main_client.lua: local localplayer = getLocalPlayer() setElementData(localplayer,"abseiling","") local vehiclesToWatch = {} local tick function abseilBind() local data = getElementData(localplayer,"abseiling") if data == "" then local veh = getPedOccupiedVehicle(localplayer) if veh then if getVehicleType(veh) == "Helicopter" then local vx,vy,vz = getElementPosition(veh) if not processLineOfSight(vx,vy,vz,vx,vy,vz-10,true,true,false,true,false,true,true,false,veh) then triggerServerEvent("doStartPlayerAbseil",localplayer) end end end elseif data == "true" then triggerServerEvent("doCancelPlayerAbseil",localplayer) end end addCommandHandler("abseil",abseilBind) bindKey("b","down","abseil") function startAbseil(veh,seat,ped) if seat > 0 then setElementCollidableWith(source,veh,false) setElementCollidableWith(source,ped,false) if source == localplayer then addEventHandler("onClientPlayerDamage",source,cancelDamage) setCameraClip(true,false) end setElementAlpha(ped,0) ---[[ if seat == 1 then attachElements(source,ped,-0.5,0,0.85) elseif seat == 2 then attachElements(source,ped,-0.10,0,0.85) elseif seat == 3 then attachElements(source,ped,0.10,0,0.85) end setPedAnimation(source,"SWAT","swt_vent_02",-1,false,false,false) --]] --[[ if seat == 0 then attachElements(source,ped,0.15,0,0.85) elseif seat == 1 then attachElements(source,ped,-0.15,0,0.85) elseif seat == 2 then attachElements(source,ped,-0.10,0,0.85) elseif seat == 4 then attachElements(source,ped,0.10,0,0.85) end setPedAnimation(source,"SWAT","swt_vent_01",-1,false,false,false) --]] setTimer(abseil,3400,1,source,veh,seat,ped) end end addEvent("doStartAbseil",true) addEventHandler("doStartAbseil",getRootElement(),startAbseil) function abseil(player,veh,seat,ped) addEventHandler("onClientPlayerWasted",player,deathAnim) local x,y,z = getPedBonePosition(player,2) local rx,ry,rz = getElementRotation(player) detachElements(player,ped) if player == localplayer then triggerServerEvent("doSetPos",player,x,y,z) end setElementPosition(player,x,y,z) --setElementRotation(player,0,0,getPedRotation(player)) setPedAnimation(player,"ped","abseil",-1,false,false,true) setElementCollidableWith(player,veh,true) setElementCollidableWith(player,ped,true) if player == localplayer then setElementCollidableWith(player,veh,true) setElementCollidableWith(player,ped,true) removeEventHandler("onClientPlayerDamage",localplayer,cancelDamage) end if player == localplayer then setCameraClip(true,true) end end function render() tick = tick or getTickCount() local nowtick = getTickCount() for i,v in ipairs(getElementsByType("player")) do local data = getElementData(v,"abseiling") if data ~= "" then local ped = getElementData(v,"abseilped") local veh = getPedOccupiedVehicle(ped) if tonumber(data) == 0 or tonumber(data) == 2 then setPedRotation(v,getPedRotation(ped)+90) elseif tonumber(data) == 1 or tonumber(data) == 3 then setPedRotation(v,getPedRotation(ped)-90) elseif data == "true" then local x,y,z = getElementPosition(v) local b1x,b1y,b1z = getPedBonePosition(v,36) local b2x,b2y,b2z = getPedBonePosition(v,25) local z3 = getGroundPosition(b2x,b2y,b2z) local px4,py4,pz4 = getElementPosition(ped) dxDrawLine3D(b1x,b1y,b1z,px4,py4,pz4,tocolor(0,0,0,255),2,false,0) dxDrawLine3D(b1x,b1y,b1z,b2x,b2y,b2z,tocolor(0,0,0,255),2,false,0) dxDrawLine3D(b2x,b2y,b2z,b2x,b2y,z3,tocolor(0,0,0,255),2,false,0) if not isPedOnGround(v) and not (isElementInWater(v) or testLineAgainstWater(x,y,z+1,x,y,z-1)) then if v == localplayer then local _,_,vvelz = getElementVelocity(veh) local vx,vy,_ = getElementPosition(getElementData(v,"abseilped")) local px,py,_ = getElementPosition(v) local sx,sy = 0.1*(vx-px),0.1*(vy-py) local speed = tonumber(getElementData(v,"abseilspeed")) if getControlState("forwards") and not getControlState("backwards") then speed = speed - (getTickCount()-tick)*0.0005 if speed < -0.4 then speed = -0.4 end elseif getControlState("backwards") and not getControlState("forwards") then speed = speed + (getTickCount()-tick)*0.0005 if speed > -0.1 then speed = -0.1 end end setElementData(v,"abseilspeed",speed) setElementVelocity(v,sx,sy,speed+vvelz) end else setElementData(v,"abseiling","") setElementData(v,"abseilped","") setElementData(v,"abseilspeed",-0.25) setPedAnimation(v) removeEventHandler("onClientPlayerWasted",v,deathAnim) if v == localplayer then triggerServerEvent("doForceStopAbseiling",v,ped) else setElementCollidableWith(v,veh,true) setElementCollidableWith(v,ped,true) removeEventHandler("onClientPlayerDamage",v,cancelDamage) end end end end end for i,v in ipairs(vehiclesToWatch) do if isElement(v) then local x,y,z = getElementPosition(v) local gz = getGroundPosition(x,y,z) if gz then if z - gz <= 2 then triggerServerEvent("doRemovePilotDummy",v) table.remove(vehiclesToWatch,i) end end else table.remove(vehiclesToWatch,i) end end tick = nowtick end addEventHandler("onClientRender",getRootElement(),render) function cancelDamage() cancelEvent() end function deathAnim() if getElementData(source,"abseiling") == "true" then local ped = getElementData(source,"abseilped") local veh = getPedOccupiedVehicle(ped) setElementData(source,"abseiling","") setElementData(source,"abseilped","") setElementData(source,"abseilspeed",-0.25) setPedAnimation(source,"ped","KO_shot_front",-1,false,false,false) removeEventHandler("onClientPlayerWasted",source,deathAnim) if source == localplayer then triggerServerEvent("doForceStopAbseiling",source,ped) else setElementCollidableWith(source,veh,true) setElementCollidableWith(source,ped,true) removeEventHandler("onClientPlayerDamage",source,cancelDamage) end end end function cancelAbseiling() local ped = getElementData(source,"abseilped") setElementData(source,"abseiling","") setElementData(source,"abseilped","") setElementData(source,"abseilspeed",-0.25) setPedAnimation(source) removeEventHandler("onClientPlayerWasted",source,deathAnim) if source == localplayer then triggerServerEvent("doForceStopAbseiling",source,ped) else setElementCollidableWith(source,veh,true) setElementCollidableWith(source,ped,true) removeEventHandler("onClientPlayerDamage",source,cancelDamage) end end addEvent("doCancelAbseil",true) addEventHandler("doCancelAbseil",getRootElement(),cancelAbseiling) function getMatrixOffsets(element,x,y,z) local matrix = getElementMatrix(element) local offX = x * matrix[1][1] + y * matrix[2][1] + z * matrix[3][1] + matrix[4][1] local offY = x * matrix[1][2] + y * matrix[2][2] + z * matrix[3][2] + matrix[4][2] local offZ = x * matrix[1][3] + y * matrix[2][3] + z * matrix[3][3] + matrix[4][3] return offX, offY, offZ end function addVehicleToWatch() table.insert(vehiclesToWatch,source) end addEvent("doAddVehicleToWatch",true) addEventHandler("doAddVehicleToWatch",getRootElement(),addVehicleToWatch) function removeVehicleToWatch() for i,v in ipairs(vehiclesToWatch) do if v == source then table.remove(vehiclesToWatch,i) break end end end addEvent("doRemoveVehicleToWatch",true) addEventHandler("doRemoveVehicleToWatch",getRootElement(),removeVehicleToWatch)
-
Ayer tampoco podía entrar pero luego de un rato volvieron a aparecer en la lista. PD: @CiBeR~! Volviste mas rápido de lo que pensaba.
-
No te intento hacer quedar mal, te estoy corrigiendo, lee la wiki de 'getLocalPlayer' y notaras que tu script es estúpido. @[AGX]Sandman usa esto: local wS, wH = guiGetScreenSize() addEventHandler( "onClientRender", root, function() local x, y, z = getElementPosition( localPlayer ) dxDrawText( x..", "..y..", "..z , wS*.04, wH*.95, wS*.23, wH*.99, tocolor( 230, 230, 230, 255), 0.45, "pricedown", "left", "top" ) end ) PD: Poner "fin" al final de una publicación no te hace tener la razón @Brad_Vickers.
-
Ese script no tiene mucho sentido... -El loop es innecesario. -'getLocalPlayer' no tiene argumentos, devuelve al jugador local. -Como dato aparte: Usa 'guiGetScreenSize' fuera de la función ya que el valor devuelto no variara a lo largo de la ejecución del código.
-
...Y por que 'onClientPlayerJoin' se ejecuta cuando entra cualquier jugador excepto el local.
-
FileZilla Server es para dar acceso FTP a tu PC, Client es para acceder tu a un servicio FTP.
-
¿Probaste cargando los binds por defecto desde el Menú?, ¿Se da este error en la versión single-player?
-
No, uso el spawn por acl, pero lo edite para que solo spawneen por team. Tendrás que postear tu Spawn ya que acá, por lo que se, nadie tiene poderes sobrenaturales para adivinar.
-
Así ya no dará dinero hasta que se reinicie el recurso.
-
Es fácil, hay una función para eso pero necesitaras el DayZ descompilado.
-
Cuida tu temperamento @Alexs No empieces con el resentimiento ni con el Off Topic, si te molesta algo que diga, mejor déjalo ahí.
-
--***********************************-- --***********************************-- -- Random Words -- -- By Al3grab -- --***********************************-- --***********************************-- ---- Changeable captchaNums = 5 -- captcha letters length wordTimeInSec = 25 --- the time before the word disappear in seconds [ default 11 seconds ] prizess = { 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 } -- the prize random num timerfrom,timerto = 1.5,5.5 -- the random timer that shows the word [ default from 3 to 15 minutes ] ---- unChangeable wordOn = false theWord = nil thePrize = nil wordTime = wordTimeInSec * 1000 -- outputDebugString("Random Words By Al3grab | Started") -- function createCode(code,prize) for k,v in ipairs( getElementsByType("player") ) do exports.easytext:displayMessageForPlayer(v,1, "=========", wordTime, 0.07, 0.5, 0, 255, 0, 255, 1.6) exports.easytext:displayMessageForPlayer(v,2, "Word : "..code.."", wordTime, 0.07, 0.533, 255, 255, 0, 255, 1.6) exports.easytext:displayMessageForPlayer(v,3, "Prize : "..getWeaponNameFromID( prize ), wordTime, 0.07, 0.563, 255, 255, 0, 255, 1.6) exports.easytext:displayMessageForPlayer(v,4, "=========", wordTime, 0.07, 0.593, 0, 255, 0, 255, 1.6) end outputChatBox("- Random Words : #FFFF00Enter the word shown below to win the prize.",root,0,255,0,true) outputChatBox("=========",root,0,255,0,true) outputChatBox("Word : "..code.."",root,255,255,0,true) outputChatBox("Prize : "..getWeaponNameFromID( prize ),root,255,255,0,true) outputChatBox("=========",root,0,255,0,true) outputChatBox("- #FFFF00You can see the word down on your screen.",root,0,255,0,true) -- startCodeTimer() wordOn = true end function makeRandomCode(Word,Prize) if ( Word and Prize ) then theWord = Word thePrize = Prize else theWord = makeCaptcha(captchaNums) thePrize = prizess[ math.random( 1, #prizess) ] end if ( tostring(theWord) and tonumber(thePrize) ) then createCode(theWord,thePrize) end end function startCodeTimer() codeTimer = setTimer( function () removeCode() outputChatBox("- #FFFF00No one won the prize",root,0,255,0,true) end , wordTime , 1 ) end function removeCode() for k,v in ipairs( getElementsByType("player") ) do exports.easytext:clearMessageForPlayer(v,1) exports.easytext:clearMessageForPlayer(v,2) exports.easytext:clearMessageForPlayer(v,3) exports.easytext:clearMessageForPlayer(v,4) end if isTimer ( codeTimer ) then killTimer(codeTimer) end theWord = nil thePrize = nil wordOn = false end function makeCaptcha(capNumz) theC = "" tCode = { "a","A", "b","B", "c","C", "d","D", "e","E", "f","F", "g","G", "h","H", "j","J", "k","K", "l","L", "m","L", "n","N", "o","O", "p","P", "q","Q", "r","R", "s","S", "t","T", "u","U", "v","V", "x","X", "y","Y", "z","Z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "!", "@", "#", "?" } for k=1,capNumz or 5 do randomCode = math.random (#tCode ) theC = ""..theC..""..tCode[randomCode].."" end return theC end function onPlayerWin(player) outputChatBox("* "..getPlayerName(player).." #FFFF00Has won the Prize ("..getWeaponNameFromID(thePrize)..")",root,255,255,0,true) giveWeapon(player,thePrize, 200) removeCode() end function detcetChatMessage(msg,msgtype) if ( wordOn == true and msg and msgtype == 0 ) then if msg == theWord then onPlayerWin(source) end end end addEventHandler("onPlayerChat",root,detcetChatMessage) addEventHandler("onResourceStop",resourceRoot,function() removeCode() end ) function setRandomTimer() setTimer(function() if not wordOn then makeRandomCode() end setRandomTimer() end , math.random(timerfrom,timerto) * 60 * 1000 , 1 ) end addEventHandler("onResourceStart",resourceRoot,function() setRandomTimer() easytext = getResourceFromName("easytext") if ( easytext ) then if getResourceState(easytext) == "loaded" then startResource(easytext) end else outputChatBox("* Error , need for easytext resource to start") cancelEvent() end end ) for k,v in ipairs ( {"randomcode","randomword","rw","rd"} ) do addCommandHandler(v,function(plr,cmd,prize,...) if plr and hasObjectPermissionTo(plr,"function.kickPlayer") then if ( not prize ) then makeRandomCode() else word = table.concat({...}, " ") if ( word ) then makeRandomCode(word,prize) end end end end ) end Usa eso, hacerlo con if's es estúpido.
-
Usa 'getWeaponNameFromID'.
