Hukaeshi
Members-
Posts
36 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Hukaeshi's Achievements
Rat (9/54)
0
Reputation
-
Buen día quiero ponerle texto a un marcador pero que cuando un obstáculo este entre el texto no se vea, este es el código que tengo: local g_screenX, g_screenY = guiGetScreenSize(); local gScale = 0.3; local gAlphaDistance = 25; local gMaxDistance = 50; local gTextAlpha = 255; local gTextSize = 0.7; 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 BincoSkinLS = createMarker( 207.69, -100.3, 1003.9 , 'Cylinder', 1.5, 0, 0, 255, 150 ); addEventHandler ( 'onClientRender', root, function ( ) -- local px, py, pz = getElementPosition ( localPlayer ); local x, y, z = getCameraMatrix(); local x1, y1, z1 = getElementPosition ( BincoSkinLS ); local distance_1 = getDistanceBetweenPoints3D( x, y, z, x1, y1, z1 ); 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( "Skins", x1_, y1_, x1_, y1_, tocolor ( 0, 255, 0, textalpha ), textscale * gTextSize, "bankgothic", "center", "bottom", false, false, false, true ); end end end ); local g_screenX, g_screenY = guiGetScreenSize(); local gScale = 0.3; local gAlphaDistance = 25; local gMaxDistance = 50; local gTextAlpha = 255; local gTextSize = 0.45; 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 } }; Agradeciera la ayuda, gracias...
-
I Am creating a panel for moderators and I want to implement a warp function a selected player in one GridList to another Player selected in another GridList. But I can't do it. I Have the following code: Client Side: function WarpearJugadores(btn, state) if source == WarpearOtroJugador then local r, c = guiGridListGetSelectedItem (JugadorListadoWarpeo) if not r or r == -1 or not c or c == -1 then return outputChatBox("#FF0000Moderador: #55FF00Selecciona a un jugador de la lista.", 255, 255, 255, true) end local WarpData = guiGridListGetItemData (JugadorListadoWarpeo, r, c) if not WarpData or not isElement(WarpData) then return outputChatBox("#FF0000Moderador: #55FF00El jugador #FFE800"..getPlayerName(WarpData).." #55FF00No existe o no se encuentra conectado.", 255, 255, 255, true) end player = guiGridListGetItemText(GridJugadores, guiGridListGetSelectedItem(GridJugadores), 1) selected2 = guiGridListGetItemText(JugadorListadoWarpeo, guiGridListGetSelectedItem(JugadorListadoWarpeo), 1) triggerServerEvent ("WarpOtro", getLocalPlayer(), selected1) triggerServerEvent ("WarpOtro", getLocalPlayer(), selected2) end end addEventHandler ("onClientGUIClick", root, WarpearJugadores) Server Side: function warpearOtro (thePlayer) toggleControl ( source, "radio_next", false ) toggleControl ( source, "radio_previous", false ) if isPedInVehicle(source) == true then return outputChatBox("#FF0000Moderador: #55FF00No puedes teletransportarte a un jugador si estas en un vehiculo." , source, 255, 255, 255, true) end local player = getPlayerFromName(thePlayer) local x, y, z = getElementPosition(player) local int = getElementInterior(player) local dim = getElementDimension(player) local vehicle = getPedOccupiedVehicle ( player ) local seat = 0 if ( vehicle ) then seat = getPedOccupiedVehicleSeat ( player ) end if ( vehicle ) then warpPedIntoVehicle ( player, vehicle, seat ) end if ( isPedInVehicle ( player ) ) then local vehicle = getPedOccupiedVehicle ( player ) local seats = getVehicleMaxPassengers ( vehicle ) + 1 local i = 0 while ( i < seats ) do if ( not getVehicleOccupant ( vehicle, i ) ) then warpPedIntoVehicle (source, vehicle, i ) break end i = i + 1 end if ( i >= seats ) then warp ( source, player ) end end setElementPosition(source, x + 0.5,y,z ) setElementInterior(source,int) setElementDimension(source,dim) end addEvent("WarpOtro", true) addEventHandler("WarpOtro", getRootElement(), warpearOtro)
-
I Am creating a panel for moderators and I want to implement a warp function a selected player in one GridList to another Player selected in another GridList. But I can't do it. I Have the following code: Client Side: function WarpearJugadores(btn, state) if source == WarpearOtroJugador then local r, c = guiGridListGetSelectedItem (JugadorListadoWarpeo) if not r or r == -1 or not c or c == -1 then return outputChatBox("#FF0000Moderador: #55FF00Selecciona a un jugador de la lista.", 255, 255, 255, true) end local WarpData = guiGridListGetItemData (JugadorListadoWarpeo, r, c) if not WarpData or not isElement(WarpData) then return outputChatBox("#FF0000Moderador: #55FF00El jugador #FFE800"..getPlayerName(WarpData).." #55FF00No existe o no se encuentra conectado.", 255, 255, 255, true) end player = guiGridListGetItemText(GridJugadores, guiGridListGetSelectedItem(GridJugadores), 1) selected2 = guiGridListGetItemText(JugadorListadoWarpeo, guiGridListGetSelectedItem(JugadorListadoWarpeo), 1) triggerServerEvent ("WarpOtro", getLocalPlayer(), selected1) triggerServerEvent ("WarpOtro", getLocalPlayer(), selected2) end end addEventHandler ("onClientGUIClick", root, WarpearJugadores) Server Side: function warpearOtro (thePlayer) toggleControl ( source, "radio_next", false ) toggleControl ( source, "radio_previous", false ) if isPedInVehicle(source) == true then return outputChatBox("#FF0000Moderador: #55FF00No puedes teletransportarte a un jugador si estas en un vehiculo." , source, 255, 255, 255, true) end local player = getPlayerFromName(thePlayer) local x, y, z = getElementPosition(player) local int = getElementInterior(player) local dim = getElementDimension(player) local vehicle = getPedOccupiedVehicle ( player ) local seat = 0 if ( vehicle ) then seat = getPedOccupiedVehicleSeat ( player ) end if ( vehicle ) then warpPedIntoVehicle ( player, vehicle, seat ) end if ( isPedInVehicle ( player ) ) then local vehicle = getPedOccupiedVehicle ( player ) local seats = getVehicleMaxPassengers ( vehicle ) + 1 local i = 0 while ( i < seats ) do if ( not getVehicleOccupant ( vehicle, i ) ) then warpPedIntoVehicle (source, vehicle, i ) break end i = i + 1 end if ( i >= seats ) then warp ( source, player ) end end setElementPosition(source, x + 0.5,y,z ) setElementInterior(source,int) setElementDimension(source,dim) end addEvent("WarpOtro", true) addEventHandler("WarpOtro", getRootElement(), warpearOtro)
-
Estoy creando un panel para moderadores y quiero implementar una función de warpear un jugador seleccionado en una GridList a otro Jugador seleccionado en otra gridlist. Pero no logro hacerlo. Tengo el siguiente codigo: ---Lado Client function WarpearJugadores(btn, state) if source == WarpearOtroJugador then local r, c = guiGridListGetSelectedItem (JugadorListadoWarpeo) if not r or r == -1 or not c or c == -1 then return outputChatBox("#FF0000Moderador: #55FF00Selecciona a un jugador de la lista.", 255, 255, 255, true) end local WarpData = guiGridListGetItemData (JugadorListadoWarpeo, r, c) if not WarpData or not isElement(WarpData) then return outputChatBox("#FF0000Moderador: #55FF00El jugador #FFE800"..getPlayerName(WarpData).." #55FF00No existe o no se encuentra conectado.", 255, 255, 255, true) end player = guiGridListGetItemText(GridJugadores, guiGridListGetSelectedItem(GridJugadores), 1) selected2 = guiGridListGetItemText(JugadorListadoWarpeo, guiGridListGetSelectedItem(JugadorListadoWarpeo), 1) triggerServerEvent ("WarpOtro", getLocalPlayer(), selected1) triggerServerEvent ("WarpOtro", getLocalPlayer(), selected2) end end addEventHandler ("onClientGUIClick", root, WarpearJugadores) -----Lado Server function warpearOtro (thePlayer) toggleControl ( source, "radio_next", false ) toggleControl ( source, "radio_previous", false ) if isPedInVehicle(source) == true then return outputChatBox("#FF0000Moderador: #55FF00No puedes teletransportarte a un jugador si estas en un vehiculo." , source, 255, 255, 255, true) end local player = getPlayerFromName(thePlayer) local x, y, z = getElementPosition(player) local int = getElementInterior(player) local dim = getElementDimension(player) local vehicle = getPedOccupiedVehicle ( player ) local seat = 0 if ( vehicle ) then seat = getPedOccupiedVehicleSeat ( player ) end if ( vehicle ) then warpPedIntoVehicle ( player, vehicle, seat ) end if ( isPedInVehicle ( player ) ) then local vehicle = getPedOccupiedVehicle ( player ) local seats = getVehicleMaxPassengers ( vehicle ) + 1 local i = 0 while ( i < seats ) do if ( not getVehicleOccupant ( vehicle, i ) ) then warpPedIntoVehicle (source, vehicle, i ) break end i = i + 1 end if ( i >= seats ) then warp ( source, player ) end end setElementPosition(source, x + 0.5,y,z ) setElementInterior(source,int) setElementDimension(source,dim) end addEvent("WarpOtro", true) addEventHandler("WarpOtro", getRootElement(), warpearOtro)
-
Gracias lo hasta ahora veo tu respuesta me sirvio
-
Hola mi problema es que no puedo usar la funcion de createexplosion, quiero que cuando muera mi bot, aparesca una explosion. local hillRadar = createRadarArea ( 1666.548828125, -1057.265625, 0, 0, 0, 0, 0, 255 ) function Nemesisbymanawydan ( ) nemesi = exports [ "slothBot" ]:spawnBot ( 1666.548828125, -1057.265625, 23.8984375, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 34, "hunting", true ) setElementModel ( nemesi, 310 ) outputChatBox ("#FF0000BOSS: #00FF22El Boss Sniper ha vuelto a la vida. en la Ciudad #FF0000 Los Santos",getRootElement(), 255, 255, 255, true ) outputChatBox ("#F7FF00$15.000 como recompenza al matarlo!",getRootElement(), 255, 255, 255, true ) local myBlip = (createBlipAttachedTo ( nemesi, 23 )) attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) triggerClientEvent ( "nsound", root ) setElementData(Nemesisbymanawydan, "nemesi",true) setTimer( function() exports.extra_health:setElementExtraHealth(nemesi, 500) end, 100, 100) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement) function money (theKiller) if (source == nemesi) then givePlayerMoney(theKiller,math.random(1500)) outputChatBox("#FF0000BOSS: #F7FF00".. getPlayerName ( theKiller ) .." #00FF22ha matado al #FF0000Boss Sniper, #00FF22ha ganado $15.000 como recompenza.",player,255, 255, 255, true) setTimer(Nemesisbymanawydan, 16000, 1) end end addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement(), money) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function () if (source == nemesi) then destroyElement(myBlip) end
-
Hola, no se como puedo hacer que al momento de que mi boss exportado por slothbot al morir cree una especie de explosion y que vuelva a reaparecer en 1 hora., espero alguien pueda ayudarme gracias. local hillRadar = createRadarArea ( 1666.548828125, -1057.265625, 0, 0, 0, 0, 0, 255 ) function Nemesisbymanawydan ( ) nemesi = exports [ "slothBot" ]:spawnBot ( 1666.548828125, -1057.265625, 23.8984375, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 34, "hunting", true ) setElementModel ( nemesi, 310 ) outputChatBox ("#FF0000BOSS: #00FF22El Boss Sniper ha vuelto a la vida. en la Ciudad #FF0000 Los Santos",getRootElement(), 255, 255, 255, true ) outputChatBox ("#F7FF00$15.000 como recompenza al matarlo!",getRootElement(), 255, 255, 255, true ) local myBlip = (createBlipAttachedTo ( nemesi, 23 )) attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) triggerClientEvent ( "nsound", root ) setElementData(Nemesisbymanawydan, "nemesi",true) setTimer( function() exports.extra_health:setElementExtraHealth(nemesi, 500) end, 100, 100) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement) function money (theKiller) if (source == nemesi) then givePlayerMoney(theKiller,math.random(1500)) outputChatBox("#FF0000BOSS: #F7FF00".. getPlayerName ( theKiller ) .." #00FF22ha matado al #FF0000Boss Sniper, #00FF22ha ganado $15.000 como recompenza.",player,255, 255, 255, true) setTimer(Nemesisbymanawydan, 16000, 1) end end addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement(), money) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function () if (source == nemesi) then destroyElement(myBlip) end end )
-
Please help me what this problem
-
intente de esta manera pero no logro, sigue aun permitiendo dar las armas function DarArmaF(client, getText) local NoArmas = {[38] = true , [34] = true} player = getPlayerFromName(client) if not isElement(player) then return end local wepID,wepName = getWeaponIDFromName(getText),getWeaponNameFromID(getText) if wepID then id = wepID else id = wepName end if player == source then amount = 9999 outputChatBox("#FF0000Moderador: #55FF00te has dado "..amount.." balas del arma "..id..".", source, 255, 255, 255, true) else if NoArmas[id] then outputChatBox("No puedes dar municion de esta arma a usuarios",source,255,0,0) return end amount = 90 outputChatBox("#FFFF00Alerta: #55FF00El Moderador #FF0000"..getPlayerName(source).." #55FF00Le ha dado "..amount.." balas del arma " ..id.." al jugador #FF0000"..getPlayerName(player)..".", root, 255, 225, 255, true) outputChatBox("#FF0000Moderador: #55FF00Le has dado a "..getPlayerName(player).." "..amount.." balas del arma "..id..".", source, 255, 255, 255, true) end giveWeapon(player, id,amount, true) end addEvent("DarArma", true) addEventHandler("DarArma", getRootElement(), DarArmaF)
-
Good day guys, I was creating a panel of moderator, but... i need help with my function of giving weapons, what I want to do is block so that you can not give Minigun or Sniper to a player can only give the moderator itself. function DarArmaF(client, getText) player = getPlayerFromName(client) if not isElement(player) then return end local wepID,wepName = getWeaponIDFromName(getText),getWeaponNameFromID(getText) if wepID then id = wepID else id = wepName end if player == source then amount = 9999 outputChatBox("#FF0000Moderador: #55FF00te has dado "..amount.." balas del arma "..id..".", source, 255, 255, 255, true) else amount = 90 outputChatBox("#FFFF00Alerta: #55FF00El Moderador #FF0000"..getPlayerName(source).." #55FF00Le ha dado "..amount.." balas del arma " ..id.." al jugador #FF0000"..getPlayerName(player)..".", root, 255, 225, 255, true) outputChatBox("#FF0000Moderador: #55FF00Le has dado a "..getPlayerName(player).." "..amount.." balas del arma "..id..".", source, 255, 255, 255, true) end giveWeapon(player, id,amount, true) end addEvent("DarArma", true) addEventHandler("DarArma", getRootElement(), DarArmaF)
-
Buen dias chicos, estuve creando un panel de moderador, pero... necesito ayuda con mi funcion de dar armas, lo que quiero hacer es bloquear para que no se le pueda dar Minigun ni Sniper a un jugador solo se lo pueda dar el moderador a si mismo. function DarArmaF(client, getText) player = getPlayerFromName(client) if not isElement(player) then return end local wepID,wepName = getWeaponIDFromName(getText),getWeaponNameFromID(getText) if wepID then id = wepID else id = wepName end if player == source then amount = 9999 outputChatBox("#FF0000Moderador: #55FF00te has dado "..amount.." balas del arma "..id..".", source, 255, 255, 255, true) else amount = 90 outputChatBox("#FFFF00Alerta: #55FF00El Moderador #FF0000"..getPlayerName(source).." #55FF00Le ha dado "..amount.." balas del arma " ..id.." al jugador #FF0000"..getPlayerName(player)..".", root, 255, 225, 255, true) outputChatBox("#FF0000Moderador: #55FF00Le has dado a "..getPlayerName(player).." "..amount.." balas del arma "..id..".", source, 255, 255, 255, true) end giveWeapon(player, id,amount, true) end addEvent("DarArma", true) addEventHandler("DarArma", getRootElement(), DarArmaF)
-
Osea quisiera solo desactivar el boton espectar de mi panel solo para el jugador local y solo funcione para los demas
-
asi seria la unica solucion? es que es un panel de moderador y el staff tambien debe darse cosas
-
Hola buenas, tengo un problema estoy creando un panel para mi servidor, entonces lo que yo quiero hacer es que cuando yo me seleccione en la GridList no me deje spectarme ami pero si a los demas y que me bote un mensaje que diga "No puedes spectarte a ti mismo". function spectatePlayer(thePlayer) local player = getPlayerFromName(thePlayer) local target = getCameraTarget(source) if (target == source) then local x, y, z = getElementPosition(source) sourcePos[source] = {x, y, z} sourceDim[source] = getElementInterior(source) sourceINT[source] = getElementDimension(source) setCameraTarget(source, player) setElementInterior(source, getElementInterior(player)) setElementDimension(source, getElementDimension(player)) setElementFrozen(source, true) toggleControl ( source, "fire", false ) toggleControl ( source, "aim_weapon", false ) toggleControl ( source, "next_weapon", false ) toggleControl ( source, "previous_weapon", false ) toggleControl ( source, "walk", false ) toggleControl ( source, "jump", false ) toggleControl ( source, "sprint", false ) toggleControl ( source, "forwards", false ) toggleControl ( source, "backwards", false ) toggleControl ( source, "left", false ) toggleControl ( source, "right", false ) outputChatBox("#FF0000Moderador: #55FF00Estas espectando a "..getPlayerName(player)..".", source, 255, 225, 255, true) elseif (not (target == source)) then setCameraTarget(source) setElementFrozen(source, false) toggleControl ( source, "fire", true ) toggleControl ( source, "aim_weapon", true ) toggleControl ( source, "next_weapon", true ) toggleControl ( source, "previous_weapon", true ) toggleControl ( source, "walk", true ) toggleControl ( source, "jump", true ) toggleControl ( source, "sprint", true ) toggleControl ( source, "forwards", true ) toggleControl ( source, "backwards", true ) toggleControl ( source, "left", true ) toggleControl ( source, "right", true ) outputChatBox("#FF0000Moderador: #55FF00Ya no estas espectando.", source, 255, 225, 255, true) setElementPosition(source, sourcePos[source][1], sourcePos[source][2], sourcePos[source][3]) setElementInterior(source, sourceDim[source]) setElementDimension(source, sourceINT[source]) sourcePos[source] = nil sourceDim[source] = nil sourceINT[source] = nil end end addEvent("Spectar", true) addEventHandler("Spectar", root, spectatePlayer)
-
Hola quisiera crear un dxDrawRectangle donde me muestre cuanta vida tiene mi boss, pero el problema es que lo pongo y no me funsiona, es decir me sale es una barrita en negro pero no me muestra la vida que tiene, gra local screenW, screenH = guiGetScreenSize() local drawFontBoss = dxCreateFont("bossi.ttf", 10) local maxDist = 50 function witchNameTagNemesis() local bosses = getElementsByType ( "ped",getRootElement(),true ) local Px,Py,Pz = getCameraMatrix( ) for theKey,nemesis2 in ipairs(bosses) do if ( isElement( nemesis2 ) ) then local Zx,Zy,Zz = getElementPosition( nemesis2 ) local zhx,zhy,zhz = getPedBonePosition( nemesis2,6 ) if (getDistanceBetweenPoints3D( Px, Py, Pz, Zx, Zy, Zz ) < maxDist ) then if ( getElementData (nemesis2, "NameTagP") == true) then local sxx,syy = getScreenFromWorldPosition(zhx,zhy,zhz+0.3) local currentDistance = getDistanceBetweenPoints3D(Px, Py, Pz, Zx, Zy, Zz) local zombieHealth = getElementHealth(nemesis2) local maxHP = exports.extra_health:getElementExtraHealth(nemesis2) local currentHealth = getElementData(nemesis2, "currenthealth") if sxx and getElementHealth(nemesis2) > 0 then sx,sy = sxx-60,syy-10 dxDrawRectangle(sx-50,sy-18,260.0,25.0,tocolor(0,0,0,100),false) -- bg health dxDrawText("Boss NmesiS",sx+7,sy-50,596.0,236.0,tocolor(255,0,0,255),0.80,"bankgothic","left","top",false,false,false) dxDrawText("Boss Health : "..math.floor(maxHP),sx-50,sy-18,200.0,25.0,tocolor(0,255,0,255),0.80, "bankgothic","left","top",false,false,false) dxDrawRectangle(sx+5,sy+25,131.0/maxHP,12.0,tocolor(255,0,0,200),false) -- health dxDrawRectangle(sx,sy,146.0,46.0,tocolor(0,0,0,0),false) -- background dxDrawRectangle(sx+5,sy+25,131.0,12.0,tocolor(0,0,0,100),false) -- bg health end end end end end end addEventHandler( "onClientRender", root, witchNameTagNemesis ) cias