OrbTanT
Members-
Posts
226 -
Joined
-
Last visited
Everything posted by OrbTanT
-
Effects sparks, more appear the effects only, for the gang, and not for those who cannot use
-
How can I set a effect, when player pass above the pickup, I tried to use createEffect, more not working with pickup. server addEventHandler("onPickupHit", grovepickup, function (player) local playerTeam = getPlayerTeam(player) if (playerTeam) then local r, g, b = getTeamColor(playerTeam) local aR, aG, aB = getRadarAreaColor(GROVE) if (r == aR) and (g == aG) and (b == aB) then outputChatBox("", player, 0, 0, 0, true) else outputChatBox("#F4A460[AVISO]#F08080 Você não faz parte desta gang.", player, 0, 0, 0, true) cancelEvent() end else outputChatBox("#F4A460[AVISO]#F08080 Você não faz parte desta gang.", player, 0, 0, 0, true) cancelEvent() end end)
-
working on right now, I had forgotten to change inside the ped
-
I am editing a skin selector for my server, the position of the camera and the ped are in the right place, more the ped does not appear in the place, and when I click the button to change the skin, he appears and quickly disappears. I don't know if it is the inner, or dimension, more does not work. Fixado.
-
Thanks for the help, one more thing, within the script skinSelector has an object created that would be the place where the ped is on top, how can I leave this object with alpha 0. I tried to do it this way, plus did not work. local object = createObject ( 3095, 2276.4716796875,-3781.8464355459,41.400001525879, 0, 0, 270 ) function object1() if isElement (object) then setElementAlpha (object, 0) end end addEventHandler("onResourceStart", getRootElement(), object1)
-
It is possible to use dxDrawImage, or fadeCamera?
-
How can I set a picture in the background, an image to behind the skins, someone can help if possible. client: local x, y = guiGetScreenSize() SkinMusic = "data/music/SkinSelectMusic.mp3" SkinAnims = {"dnce_M_b","DAN_Left_A","DAN_Down_A","DAN_Loop_A"} StartSkin = 0 NewSkin = false --client addEvent("TriggerClient",true) function SelectSkin () setElementInterior ( getLocalPlayer(), 0, 0,0,0 ) setCameraMatrix( 2745.8266601563,-2231.1694335938,62.25520324707, 3999.9999499991,-2607.4000244141,16.1) skin = createPed ( StartSkin, 2749.7502441406,-2232.7170410156,61.727611541748,60 ) setPedAnimation( skin, "DANCING", SkinAnims[math.random(1,4)]) fadeCamera( true, 10) setTime(0,0) SkinSelectMusic = playSound(SkinMusic,true) bindKey("arrow_r","down",NextSkin) bindKey("arrow_l","down",LastSkin) bindKey(".","down",SpawnPlayer) addEventHandler("onClientRender",getRootElement(),AnnounceSkinJob) guiSetVisible(lnextskin,true) guiSetVisible(rnextskin,true) guiSetVisible(spawnskin,true) showCursor(true) showChat(false) showPlayerHudComponent ( "radar", false ) end addEventHandler("TriggerClient",root,SelectSkin) function SpawnPlayer() local r,g,b = math.random(0,255),math.random(0,255),math.random(0,255) triggerServerEvent ( "onClientWantsToSpawn", getLocalPlayer(), getLocalPlayer(),StartSkin,r,g,b) unbindKey("arrow_r","down",NextSkin) unbindKey("arrow_l","down",LastSkin) unbindKey("lshift","down",SpawnPlayer) setTime(12,0) stopSound(SkinSelectMusic) removeEventHandler("onClientRender",getRootElement(),AnnounceSkinJob) showCursor(false) showChat(true) showPlayerHudComponent ( "radar", true ) guiSetVisible(lnextskin,false) guiSetVisible(rnextskin,false) guiSetVisible(spawnskin,false) setElementData(getLocalPlayer(),"red",r) setElementData(getLocalPlayer(),"green",g) setElementData(getLocalPlayer(),"blue",b) end function NextSkin() if StartSkin == 312 then StartSkin = -1 elseif StartSkin == 2 then StartSkin = 8 end StartSkin = StartSkin + 1 setElementModel(skin,StartSkin) setPedAnimation( skin, "DANCING", SkinAnims[math.random(1,4)]) SkinJobTextColor() end function LastSkin() if StartSkin == 0 then StartSkin = 313 elseif StartSkin == 9 then StartSkin = 3 end StartSkin = StartSkin - 1 setElementModel(skin,StartSkin) setPedAnimation( skin, "DANCING", SkinAnims[math.random(1,4)]) SkinJobTextColor() end lnextskin = guiCreateButton(x-x/1.30,y/1.22,x/5,y/20,"<<<",false) guiSetProperty(lnextskin,"PushedTextColour","FFFFFF00") guiSetFont(lnextskin,"sa-header") rnextskin = guiCreateButton(x-x/2.90,y/1.22,x/5,y/20,">>>",false) guiSetProperty(rnextskin,"PushedTextColour","FFFFFF00") guiSetFont(rnextskin,"sa-header") spawnskin = guiCreateButton(x-x/1.80,y/1.22,x/5,y/20,"Play",false) guiSetProperty(spawnskin,"PushedTextColour","FFFFFF00") guiSetFont(spawnskin,"sa-header") guiSetVisible(lnextskin,false) guiSetVisible(rnextskin,false) guiSetVisible(spawnskin,false) addEventHandler( "onClientGUIClick", getRootElement(), function() if source == lnextskin then LastSkin() elseif source == rnextskin then NextSkin() elseif source == spawnskin then SpawnPlayer() end end) ------PEDS function FreezeBots() local Bots = getElementsByType("ped") for k,v in ipairs(Bots) do setElementFrozen(v,true) end end
-
bom, estou criando um sistema de paraquedismo, onde depois de digitar o /pular no marker, o jogador é teleportado para o topo do mapa com um parachute, onde tem que cair dentro do marker1, alguém pode me ajudar a corrigir e melhorar esse script. gostaria que se o jogador sair dentro do marker 1, ele ganha 5000$ e depois de cair dentro e receber o dinheiro o marker1 é destruído, o mesmo acontece quando o jogador cai fora do marker1, mais se cair fora do marker1 ele não ganha o dinheiro e o marker1 é destuído, não estou conseguindo fazer. está apresentando o seguinte erro WARNING: paraquedismo\server.lua:34: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil] local Marker = createMarker ( -2235.21, -1736.60, 479.80, "cylinder", 2.5, 0, 0, 255, 170 ) function paraquedismo ( thePlayer, matchingDimension ) if isElementWithinMarker( thePlayer, Marker) then outputChatBox("Para pular de paraquedas digite /pular!", thePlayer, 255, 0, 0) end end addEventHandler ("onMarkerHit", Marker, paraquedismo) function pular ( playerSource, matchingDimension ) if isElementWithinMarker( playerSource, Marker) then setElementPosition( playerSource, -2235.21, -1736.60, 1300.80 ) giveWeapon ( playerSource, 46 ) setPedWeaponSlot(playerSource, getSlotFromWeapon(46)) outputChatBox("Caia no Alvo para ganhar 5000$!", thePlayer, 255, 0, 0) local Marker1 = createMarker ( -2407.97, -596.58, 131.80, "cylinder", 7.0, 0, 0, 255, 170 ) local blip1 = createBlip( -2407.97, -596.58, 132.64, 0, 0, 0, 255, 255 ) setBlipSize ( blip1, 5 ) else outputChatBox("Você não está na área de Paraquedismo!", thePlayer, 255, 0, 0) end end addCommandHandler ( "pular", pular ) function cairmarker ( playerSource, matchingDimension ) if isElementWithinMarker( playerSource, Marker1) then givePlayerMoney(playerSource, 5000) outputChatBox("Você ganhou 5000$ por cair no alvo!", playerSource, 255, 0, 0) else outputChatBox("Você não conseguiu cair no Alvo!", playerSource, 255, 0, 0) end end addEventHandler ("onMarkerHit", Marker1, cairmarker)
-
Is occurring error marker, somebody could help, should give money when the player enter within the Marker1. error: WARNING: paraquedismo\server.lua:34: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil] server: local Marker = createMarker ( -2235.21, -1736.60, 479.80, "cylinder", 2.5, 0, 0, 255, 170 ) function paraquedismo ( thePlayer, matchingDimension ) if isElementWithinMarker( thePlayer, Marker) then outputChatBox("Para pular de paraquedas digite /pular!", thePlayer, 255, 0, 0) end end addEventHandler ("onMarkerHit", Marker, paraquedismo) function pular ( playerSource, matchingDimension ) if isElementWithinMarker( playerSource, Marker) then setElementPosition( playerSource, -2235.21, -1736.60, 1300.80 ) giveWeapon ( playerSource, 46 ) setPedWeaponSlot(playerSource, getSlotFromWeapon(46)) outputChatBox("Caia no Alvo para ganhar 5000$!", thePlayer, 255, 0, 0) local Marker1 = createMarker ( -2407.97, -596.58, 131.80, "cylinder", 7.0, 0, 0, 255, 170 ) local blip1 = createBlip( -2407.97, -596.58, 132.64, 0, 0, 0, 255, 255 ) setBlipSize ( blip1, 5 ) else outputChatBox("Você não está na área de Paraquedismo!", thePlayer, 255, 0, 0) end end addCommandHandler ( "pular", pular ) function cairmarker ( thePlayer, matchingDimension ) if isElementWithinMarker( thePlayer, Marker1) then setPlayerMoney(thePlayer, 5000) outputChatBox("Você ganhou 5000$ por cair no alvo!", thePlayer, 255, 0, 0) else outputChatBox("Você não conseguiu cair no Alvo!", thePlayer, 255, 0, 0) end end addEventHandler ("onMarkerHit", Marker1, cairmarker)
-
How can I set for as soon as the player typing /skip, create a marker and a blip in the position of the marker, which will be the place where the player will have to go down with the parachute local Marker = createMarker ( -2235.21, -1736.60, 479.80, "cylinder", 2.5, 0, 0, 255, 170 ) function paraquedismo ( thePlayer, matchingDimension ) if isElementWithinMarker( thePlayer, Marker) then outputChatBox("Para pular de paraquedas digite /pular!", thePlayer, 255, 0, 0) end end addEventHandler ("onMarkerHit", Marker, paraquedismo) function pular ( playerSource ) setElementPosition( playerSource, -2235.21, -1736.60, 1000.80 ) end addCommandHandler ( "pular", pular )
-
How do I put a sound, every time that hover the cursor on top of the buttons, I have to use "onClientMouseEnter" more do not understand how to put a sound
-
obrigado, isto me ajudou muito, consegui criar do jeito que queria. =)
-
Thank you Max, is exactly what I wanted to create a vehicle for the ID, and thank you to all who helped
-
How can I create a vehicle using the ID of the same, I am using this script, the more they create using the name. function createVehicleCommand ( thePlayer, commandName, carName ) local carModel = getVehicleModelFromName ( carName ) local x, y, z = getElementPosition ( thePlayer ) if not carModel then outputChatBox ( "That is not a valid car name" ) else createVehicle ( carModel, x + 5, y, z ) outputChatBox ( "A vehicle with model ID of " .. carModel .. " was created!" ) end end addCommandHandler ( "vehicle", createVehicleCommand )
-
bom, estou querendo criar uma ammu-nation nesse estilo, do tipo que ao clicar em um botão ele aparece outro botões no mesmo GUI, eu entendo como criar, GuiWindows e Buttons e que tenho que usar onClientGUIClick, mais ainda sim não tenho ideia de como criar desse geito. se me ajudarem com um exemplo, ou se souberem algum outro GUI que deste jeito já me ajudaria muito. exemplo na print, clicka em HandGuns e aparece os botões para comprar deagle, pistol e etc, no mesmo GUI ai criar
-
after you create the GUIWindows and the Buttons, I have no idea To open other buttons, for example create a button for a Sniper, then clicking it appears with other buttons Sniper and Country Sniper
-
Can someone tell me how I can create a GUI type, that, when I click on a button, it opens other buttons, all in the same GUI, I understand how to create GUI buttons and do not understand how to do something as well. example in print, common weapons>>HandGuns>>Deagle,Pilstol.
-
How can I set this script to not move panel GUI using cursor? GUIEditor = { button = {}, window = {} } function skinshop() GUIEditor.window[1] = guiCreateWindow(368, 105, 641, 549, "Skin", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.85) cesar = guiCreateButton(20, 35, 160, 46, "292", false, GUIEditor.window[1]) ogloc = guiCreateButton(20, 90, 160, 46, "293", false, GUIEditor.window[1]) boxhead = guiCreateButton(20, 145, 160, 46, "137", false, GUIEditor.window[1]) hooded = guiCreateButton(20, 200, 160, 46, "230", false, GUIEditor.window[1]) inbred = guiCreateButton(20, 255, 160, 46, "162", false, GUIEditor.window[1]) sair = guiCreateButton(20, 485, 160, 46, "Sair", false, GUIEditor.window[1]) function showimagem() if isCursorShowing() and (source == cesar or source == ogloc or source == boxhead or source == hooded or source == inbred ) then end end addEventHandler("onClientMouseEnter", getRootElement(), showimagem) function showCesar() a = guiCreateStaticImage(660, 150, 200, 450, "skin/1.png", false) valora = guiCreateLabel(750, 600, 100, 100, "$100.000", false) end addEventHandler("onClientMouseEnter", cesar, showCesar, false) function showogloc() b = guiCreateStaticImage(660, 150, 200, 450, "skin/2.png", false) valorb = guiCreateLabel(750, 600, 63, 17, "$100.000", false) end addEventHandler("onClientMouseEnter", ogloc, showogloc, false) function showboxhead() c = guiCreateStaticImage(660, 150, 200, 450, "skin/3.png", false) valorc = guiCreateLabel(750, 600, 63, 17, "$100.000", false) end addEventHandler("onClientMouseEnter", boxhead, showboxhead, false) function showhooded() d = guiCreateStaticImage(660, 150, 200, 450, "skin/4.png", false) valord = guiCreateLabel(750, 600, 63, 17, "$100.000", false) end addEventHandler("onClientMouseEnter", hooded, showhooded, false) function showinbred() e = guiCreateStaticImage(660, 150, 200, 450, "skin/5.png", false) valorc = guiCreateLabel(750, 600, 63, 17, "$100.000", false) end addEventHandler("onClientMouseEnter", inbred, showinbred, false) function showcesar1() if isElement( a ) and isElement( valora ) then destroyElement( a ) destroyElement( valora ) end end addEventHandler("onClientMouseLeave", cesar, showcesar1) function showogloc1() if isElement( b ) and isElement( valorb ) then destroyElement(b) destroyElement(valorb) end end addEventHandler("onClientMouseLeave", ogloc, showogloc1) function showboxhead1() if isElement( c ) and isElement( valorc ) then destroyElement(c) destroyElement(valorc) end end addEventHandler("onClientMouseLeave", boxhead, showboxhead1) function showhooded1() if isElement( d ) and isElement( valord ) then destroyElement(d) destroyElement(valord) end end addEventHandler("onClientMouseLeave", hooded, showhooded1) function showinbred1() if isElement( e ) and isElement( valore ) then destroyElement(e) destroyElement(valore) end end addEventHandler("onClientMouseLeave", inbred, showinbred1) end addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == cesar ) then triggerServerEvent("cesar",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == ogloc ) then triggerServerEvent("ogloc",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == boxhead ) then triggerServerEvent("boxhead",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == hooded ) then triggerServerEvent("hooded",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == inbred ) then triggerServerEvent("inbred",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == sair ) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) armsPlayer = nil end end ) addEventHandler( 'onClientResourceStart', resourceRoot, function( ) createskin( 217.44, -98.51, 1004.28, 15, 0 ) end ) function createskin( skinY, skinX, skinZ, skinInter, skinDim ) local skinMarker = createMarker( skinY, skinX, skinZ, 'cylinder', 1.3, 255, 0, 0, 180 ) setElementInterior( skinMarker, (skinInter or 0), skinY, skinX, skinZ ) setElementDimension( skinMarker, skinDim ) addEventHandler( 'onClientMarkerHit', skinMarker, function( hitPlayer, matchingDimension ) if( hitPlayer == localPlayer )and( matchingDimension )then if ( not isElement ( GUIEditor.window[1] ) ) then skinshop ( ) end guiSetVisible (GUIEditor.window[1], true) showCursor (true) end end ) end
-
Is now working, without errors, thank you for help.
-
Did not solve the problem is still showing the errors. GUIEditor = { button = {}, window = {} } function skinshop() GUIEditor.window[1] = guiCreateWindow(368, 105, 641, 549, "Skin", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.85) cesar = guiCreateButton(20, 35, 160, 46, "292", false, GUIEditor.window[1]) ogloc = guiCreateButton(20, 90, 160, 46, "293", false, GUIEditor.window[1]) boxhead = guiCreateButton(20, 145, 160, 46, "137", false, GUIEditor.window[1]) hooded = guiCreateButton(20, 200, 160, 46, "230", false, GUIEditor.window[1]) inbred = guiCreateButton(20, 255, 160, 46, "162", false, GUIEditor.window[1]) sair = guiCreateButton(20, 485, 160, 46, "Sair", false, GUIEditor.window[1]) function showimagem() if isCursorShowing() and (source == cesar or source == ogloc or source == boxhead or source == hooded or source == inbred ) then end end addEventHandler("onClientMouseEnter", getRootElement(), showimagem) function showCesar() a = guiCreateStaticImage(660, 150, 200, 450, "skin/1.png", false) valora = guiCreateLabel(750, 600, 100, 100, "$100.000", false) end addEventHandler("onClientMouseEnter", cesar, showCesar, false) function showogloc() b = guiCreateStaticImage(660, 150, 200, 450, "skin/2.png", false) valorb = guiCreateLabel(750, 600, 63, 17, "$100.000", false) end addEventHandler("onClientMouseEnter", ogloc, showogloc, false) function showboxhead() c = guiCreateStaticImage(660, 150, 200, 450, "skin/3.png", false) valorc = guiCreateLabel(750, 600, 63, 17, "$100.000", false) end addEventHandler("onClientMouseEnter", boxhead, showboxhead, false) function showhooded() d = guiCreateStaticImage(660, 150, 200, 450, "skin/4.png", false) valord = guiCreateLabel(750, 600, 63, 17, "$100.000", false) end addEventHandler("onClientMouseEnter", hooded, showhooded, false) function showinbred() e = guiCreateStaticImage(660, 150, 200, 450, "skin/5.png", false) valorc = guiCreateLabel(750, 600, 63, 17, "$100.000", false) end addEventHandler("onClientMouseEnter", inbred, showinbred, false) function showcesar1() if isElement( a ) and isElement( valora ) then destroyElement(a) destroyElement(valora) end end addEventHandler("onClientMouseLeave", cesar, showcesar1) function showogloc1() destroyElement(b) destroyElement(valorb) end addEventHandler("onClientMouseLeave", ogloc, showogloc1) function showboxhead1() destroyElement(c) destroyElement(valorc) end addEventHandler("onClientMouseLeave", boxhead, showboxhead1) function showhooded1() destroyElement(d) destroyElement(valord) end addEventHandler("onClientMouseLeave", hooded, showhooded1) function showinbred1() destroyElement(e) destroyElement(valore) end addEventHandler("onClientMouseLeave", inbred, showinbred1) end addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == cesar ) then triggerServerEvent("cesar",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == ogloc ) then triggerServerEvent("ogloc",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == boxhead ) then triggerServerEvent("boxhead",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == hooded ) then triggerServerEvent("hooded",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == inbred ) then triggerServerEvent("inbred",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == sair ) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) armsPlayer = nil end end ) addEventHandler( 'onClientResourceStart', resourceRoot, function( ) createskin( 217.44, -98.51, 1004.28, 15, 0 ) end ) function createskin( skinY, skinX, skinZ, skinInter, skinDim ) local skinMarker = createMarker( skinY, skinX, skinZ, 'cylinder', 1.3, 255, 0, 0, 180 ) setElementInterior( skinMarker, (skinInter or 0), skinY, skinX, skinZ ) setElementDimension( skinMarker, skinDim ) addEventHandler( 'onClientMarkerHit', skinMarker, function( hitPlayer, matchingDimension ) if( hitPlayer == localPlayer )and( matchingDimension )then if ( not isElement ( GUIEditor.window[1] ) ) then skinshop ( ) end guiSetVisible (GUIEditor.window[1], true) showCursor (true) end end ) end
