Jump to content

raynner

Members
  • Posts

    223
  • Joined

  • Last visited

Everything posted by raynner

  1. I am creating a hunger for script and there are only two steps however I have had many failures in my attempts frustrating the system of eating is correct however lack add marks to enter the interior and a way to remove money from the player would be grateful if you help me without Marks - this really do not know what to do .. Entradas = { {2398,-1898,13}, {2420,-1509,23}, {2106,-1806,14}, {1200,-918,43}, {929,-1352,13}, {812,-1616,13}, {2334,76,26}, {1368,249,19}, {204,-202,2}, {-2155,-2460,30}, ------ LV {2084,2225,11}, {2103,2229,11}, {2352,2533,10}, {2394,2042,10}, {2473,2035,11}, {1873,2072,11}, {1159,2073,11}, {2170,2796,10}, ------ SF {1816,619,35}, {-1720,1360,7}, {1912,829,35}, {-2356,1009,50}, {-2336,166,35}, {-2671,259,3} } Interior = { {373,-133,1001,5}, -- Pizza {366,-11,1001,9}, {364,-74,1001,10} -- Burg Shot } ---------------------------------------------- function Entrada() for i,v in ipairs (Entradas) do local marker1 = createMarker ( v[1], v[2], v[3], 2.2, "arrow", 2, 255, 255, 0, 200 ) -- setElementInterior ( marker1, 0 ) setElementDimension ( marker1, 0 ) end end addEventHandler ( "onResourceStart", Entradas, getRootElement()) Money -this need to use getPlayerMoney and setPlayerMoney but do not know how -50 $ everything works correctly less money function(hitEle,dim) if (getLocalPlayer() == hitEle) and (getElementData (source,"HAMBURGER!") == true) then if (getHungerState (hitEle) < 83) then progress = max setElementHealth (hitEle,getElementHealth (hitEle) +50) setPlayerMoney(hitEle,getPlayerMoney (hitEle) -50) setHungerState (hitEle,100) outputChatBox ("#CCFF00[#FFA600 ! #CCFF00] #0080FFHum Otima Comida, Bom!",255,255,255,true) outputChatBox ("#CCFF00[#FFA600 ! #CCFF00] #0080FFVocê Não Esta Mais Com Fome \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />",255,255,255,true) else outputChatBox ("#CCFF00[#FFA600 ! #CCFF00] #0080FFVocê Não Precisa Comer Agora!",255,255,255,true) end end end)
  2. Sure. guiGetScreenSize dxSetRenderTarget dxDrawImage This should be enough. Thank you
  3. Sadly as the HUD and radar are GTA hardcoded elements you can't change their position, just their visibility, you should use a new HUD and from there just change their positions. But I advertise you, if you don't know :~ about working with auto-adjusting positions then just leave it as it is or else you'll just make it worse. Remember that you should try to make the HUD fit in all resolutions, if you don't, people will see it in a different and maybe annoying position. Ok.. Thank you you could direct me to the functios that are used to make a hud radar ex: dxDraw, gui ??
  4. I am sorry to say, most of your script doesn't make sense, watch what other people do and you will know how to script Oks, thank you
  5. Hello Good Samaritan need a little help because I do not know much of this piece of good script I just wanted a function to min adjust the position of HUD radar my server wanted for him further down and to the left anyone know if this and positivável and yes how?
  6. An example and this simple script that I made him do the following it creates a team like that and started on the server and you specify the id of the vehicles you want only this team can drive it (I left the free ride for everyone) to get in the car if the player no team specified and it can not address just use the passenger vehicle I think this will help you understand and What do I speak up! teamFletiwis = createTeam ( "LOS RED", 255, 0, 0 ) Vehicles = { [445]=true,[506]=true } Teams = { [teamFletiwis] =true } function enterVehicle ( thePlayer, seat, jacked ) if getElementType ( thePlayer ) == "player" then if ( Vehicles[getElementModel ( source )] ) and ( not Teams[getPlayerTeam( thePlayer )] ) and ( seat == 0 ) then removePedFromVehicle( thePlayer ) outputChatBox("#00FF00Apenas Os Membros Da Equipe #FF0000LOS RED #00FF00Podem Dirigir este Veiculo!", thePlayer, 255, 255, 255, true) end end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle )
  7. Hello friend try to observe parts of team because like most of us scriptes we panels related to corporations for team and your script and very large yield revisalo lazy totally more found functions with (getTeamName) this server to check the name of the team and this (getPlayerTeam) to see if the player who is doing the action is in the team so I recommend you watch these parts of your script as (getTeamName, getPlayerTeam, setPlayerTeam) Well I have helped as I noticed, for what appears to have SWAT Teams and Police
  8. hello friends again come to enlist the help of you good I created a simple script to auto destroir servants vehicles trough a panel however came across the lack of a emportante party and to cancel this event when the player returns to the vehicle porediriam you help me or correct ? function destroyVehicle(vehicle) local check=false for i,player in ipairs(getElementsByType("player")) do if getPlayerOccupiedVehicle(player)==vehicle then check=true end end if check==false then destroyElement(vehicle[source]) end end function exitVehicle(vehicle) if isElement(vehicle[source]) then setTimer(destroyElement(vehicle[source]),30000,1,vehicle) end end addEventHandler("onPlayerVehicleExit",getRootElement(),exitVehicle)
  9. I need one more little help from you guys, good following my problem now and this made this simple script to when the player passing the mark he get a vehicle however if it already is with 1 will not be able to catch it is worth remembering that the car has to stay the dimension 110 really appreciate if someone help me '-' SpawnveicleRcLr01 = createMarker(-2147, -738, 31, "cylinder", 1.5, 255, 0, 0, 153) setElementDimension (SpawnveicleRcLr01, 110) function SpawnRcLR01(thePlayer) if (isPedInVehicle(thePlayer)) then outputChatBox("#ffff00[ #ff0000LOS RED #ffff00] #ff0000Você Já Esta Dirigindo um Veiculo Tente Novamente Sem Veiculo em Posse.", thePlayer, 255, 255, 255, true) else local x, y, z = getElementPosition(thePlayer) setElementDimension (VTR, 110) VTR = createVehicle(503, x + 5, y, z) end warpPedIntoVehicle( thePlayer, VTR ) outputChatBox("#ffff00[ #ff0000LOS RED #ffff00] #00ff00Você Obteve o Carro Do Evento com Sucesso, #ff0000Não Utilize Handling#ffff00.", thePlayer, 255, 255, 255, true) end addEventHandler( "onMarkerHit", SpawnveicleRcLr01, SpawnRcLR01 )
  10. the mark reappeared over the panel not open or the cursor is activated Remember that this .lua and client and not server
  11. thank you but unfortunately neither of them work for it after the mark simply does not appear, any tips?
  12. hello good I was doing a simple panel for use in Some events, he is quite ready however wish he abrise by mark could someone please fix the min to function? thank you. SpawnveicleRcLr01 = createMarker(-2147, -738, 31, "cylinder", 1.5, 255, 0, 0, 153) setElementDimension(SpawnveicleRcLr01, 110) RACELRWINDS = guiCreateWindow(498, 289, 267, 158, "PAINEL RACE LOS RED", false) guiWindowSetSizable(RACELRWINDS, false) guiSetProperty(RACELRWINDS, "CaptionColour", "FF1700FC") guiSetVisible(RACELRWINDS, false) MyFont = guiCreateFont("Arquivos/s3d.ttf", 9) Img = guiCreateStaticImage(0, 20, 266, 134, "Arquivos/LogoRED.png", false, RACELRWINDS) ProImg = guiCreateLabel(0, 20, 266, 134, "", false, RACELRWINDS) CAR1 = guiCreateButton(10, 30, 110, 32, "Carro 1", false, RACELRWINDS) guiSetFont(CAR1, MyFont) guiSetProperty(CAR1, "NormalTextColour", "FF2AFE00") CAR2 = guiCreateButton(148, 30, 107, 32, "Carro 2", false, RACELRWINDS) guiSetFont(CAR2, MyFont) guiSetProperty(CAR2, "NormalTextColour", "FF2AFE00") DESTROY = guiCreateButton(10, 88, 110, 32, "destroir carro", false, RACELRWINDS) guiSetFont(DESTROY, MyFont) guiSetProperty(DESTROY, "NormalTextColour", "FFFCF420") BIND = guiCreateButton(148, 88, 108, 32, "Bind F1 B", false, RACELRWINDS) guiSetFont(BIND, MyFont) guiSetProperty(BIND, "NormalTextColour", "FFFCF420") EXIT = guiCreateButton(47, 127, 175, 21, "Fechar", false, RACELRWINDS) guiSetFont(EXIT, MyFont) guiSetProperty(EXIT, "NormalTextColour", "FFFD0000") GUIEditor.label[1] = guiCreateLabel(0, 20, 266, 134, "", false, RACELRWINDS) function visiblyLrRc () if guiGetVisible(RACELRWINDS) then guiSetVisible(RACELRWINDS, false) showCursor(false) else guiSetVisible(RACELRWINDS, true) showCursor(true) end end addEventHandler( "onMarkerHit", SpawnveicleRcLr01, visiblyLrRc )
  13. function ColocarJugadores1 () guiGridListClear(GridJugadores1)-- Borrar la grid for index,player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow( GridJugadores1 ) guiGridListSetItemText ( GridJugadores1, row, 1, (string.gsub ( getPlayerName(player), '#%x%x%x%x%x%x', '' ) or getPlayerName(player)), false, false) guiGridListSetItemData ( GridJugadores1, row, 1, getPlayerName(player)) end end misses this function I wanted took some examples of wiki and managed to create thanks for the help
  14. I wish fose seen only the name of the player and not just letters color code
  15. People I could already do this function is working 100% without obg bugs for attention
  16. I like to have a grid list with a list of all players in the online server including localPlayer more without color codes the nickname of players as shown below I wait anxiously
  17. raynner

    OFF [topic]

    our work thanks! : D as I close the topic ??
  18. raynner

    OFF [topic]

    JR10 how do I define them if (not isElement(NombreJug)) then ???
  19. raynner

    OFF [topic]

    It is taking place the following error! in cmd WARNING: PTags\server.lua:2: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil] WARNING: PTags\server.lua:2: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] Client function function Tag1Name () local jugadorseleccionado = guiGridListGetItemText(GridJugadores3, guiGridListGetSelectedItem(GridJugadores3), 1) local NombreJug = getPlayerFromName(jugadorseleccionado) local admin = getLocalPlayer() triggerServerEvent("addtag1", root, NombreJug, admin) end addEventHandler ("onClientGUIClick", Tag1, Tag1Name ,false) Server function function add1 (commandName, accountName) local accountName = getAccountName(getPlayerAccount(NombreJug)) if accountName then aclGroupAddObject (aclGetGroup("Admin"), "user."..accountName) outputChatBox ("Painel TAG: Conta '"..accountName.."' Foi Adcionada com sucesso ao Grupo.", admin) else outputChatBox ("Painel TAG: Conta Não Especificada.", admin) outputChatBox ("Painel TAG: Selecione um Player na Lista.", admin) end end addEvent( "addtag1", true ) addEventHandler( "addtag1", root, add1 )
×
×
  • Create New...