Hukaeshi

Members
  • Content Count

    37
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Hukaeshi

  • Rank
    Rat

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hukaeshi

    Help with Warp panel.

    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)
  2. Hukaeshi

    Help with Warp panel.

    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)
  3. Hukaeshi

    Ayuda con panel de warpeo.

    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)
  4. Hukaeshi

    Como usar set timer y algo mas

    Gracias lo hasta ahora veo tu respuesta me sirvio
  5. Hukaeshi

    como crear explosión

    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
  6. Hukaeshi

    Como usar set timer y algo mas

    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 )
  7. Hukaeshi

    Help function give weapons panel moderator

    Please help me what this problem
  8. Hukaeshi

    Ayuda funcion dar armas panel moderador

    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)
  9. 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)
  10. 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)
  11. Hukaeshi

    Problema con funcion de Spectador

    Osea quisiera solo desactivar el boton espectar de mi panel solo para el jugador local y solo funcione para los demas
  12. Hukaeshi

    Problema con funcion de Spectador

    asi seria la unica solucion? es que es un panel de moderador y el staff tambien debe darse cosas
  13. Hukaeshi

    Problema con funcion de Spectador

    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)
  14. Hukaeshi

    Barrita de Vida en boss

    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
  15. Hukaeshi

    Chat Login

    gracias Arsilex