Jump to content

HUNGRY:3

Members
  • Posts

    395
  • Joined

  • Last visited

Everything posted by HUNGRY:3

  1. you posted in the wrong place you should have posted at scripting place and i did "mood" star player
  2. i don't understand what are you saying.... use google translate please..
  3. turfTimer[source] = setTimer ( function ( ) local beachTurfCplayers = getElementColShape ( turf ) local players = getElementsWithinColShape ( turf, "player" ) setRadarAreaColor ( area, tonumber(r), tonumber(g), tonumber(b), 175 ) for _, player in ipairs ( players ) do if getElementData(player, "gang") == playerGang then if language == "Spanish" then outputChatBox("Felicidades Conquistaste El Turf +4K!", player, 0, 255, 0, false) else outputChatBox("Congratulations. You capture the turf. +4K!", player, 0, 255, 0, false) end triggerClientEvent("onTakeTurf", player) givePlayerMoney ( player, 4000 ) executeSQLQuery("UPDATE Turf_System SET GangOwner=?,r=?,g=?,b=? WHERE Turfs=?", playerGang, tonumber(r), tonumber(g), tonumber(b), "Turf["..tostring(id).."]" ) setPlayerWantedLevel(player, 3) -- setElementData ( turf, "getTurfGang", playerGang ) end end setRadarAreaFlashing ( area, false ) end ,120000, 1) -- 120000 addEventHandler ( "onColShapeHit", root, radar ) you should have posted the full code from the start
  4. function regs(button,state) if (button == "left" and state == "up") then if (source == registerbtn) then RegButtons () addEventHandler("onClientRender", root, dxRegPanel) removeEventHandler("onClientRender", root, loginMenu) guiSetVisible(playbtn,false) guiSetVisible(rem,false) guiSetVisible(loginuseredit,false) guiSetVisible(loginpassedit,false) showCursor(true) end end end addEventHandler("onClientGUIClick", getRootElement(), regs)
  5. addEventHandler('onColShapeHit', pCuboid1, function(p) NeedMsg(p,6) if (getPlayerTeam(p)) then NeedMsg(p,1) local pTeam = getPlayerTeam( p ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea1 ) local data = getElementData(pCuboid1, "friendly") if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) and ( data == "yes" ) then NeedMsg(p,2) else setRadarAreaFlashing( pArea1, true ) capturing = setTimer( function( ) setElementData(pCuboid1, "friendly", "yes") setElementData(pCuboid1, "ownedBy", getTeamName(pTeam)) givePlayerMoney( p, 4000 ) NeedMsg(p,4) setRadarAreaColor( pArea1, iR, iG, iB ) setRadarAreaFlashing( pArea1, false ) setPlayerWantedLevel(p, 3) end, 600000, 1 end end end end )
  6. nope, doesn't work EDIT: WORKED THANK YOU!
  7. it doesn't work it doesn't warp me to the old position when i click on a button
  8. not working ERROR: [RPG]\RPG\server.lua:95: bad argument #1 to 'unpack' (table expected, got number)
  9. not working nothing in debug
  10. hello i'm trying to save player position but it doesn't work code: server function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local x,y,z = getElementPosition( source ) setAccountData ( playeraccount, "pos", x,y,z ) end end function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local old = getAccountData ( playeraccount, "pos" ) if ( old ) then setElementPosition ( source, x,y,z ) end end end addEvent("savePos",true) addEventHandler("savePos",root,onPlayerLogin) addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) client function test() if source == GUImain.button[1] then guiSetVisible(GUImain.staticimage[1],false) setElementData(lp,"onmain",false) showCursor( false ) setCameraTarget(lp,lp) triggerServerEvent("savePos",localPlayer) end end addEventHandler("onClientGUIClick",root,test)
  11. sprint.lua function spr() setGlitchEnabled ( "fastsprint", true ) end addEventHandler ( "onResourceStart", root, spr ) meta "name" description="name" type="script" version="1.0.0" />
  12. HUNGRY:3

    Solved

    i tested it, it shows the scrollbar it doesn't go down cuz of the window.
  13. HUNGRY:3

    Solved

    function CreateShopWindow() ShopWindow = guiCreateWindow(350,250,300,500,"TEST",false) guiSetAlpha ( ShopWindow, 5.00 ) local price_coyote = "Buy" local price_czech = "Buy" local price_alice = "Buy" local price_m4 = "Buy" local price_mp5a5 = "Buy" local price_m9sd = "Buy" local price_medic = "Buy" local price_painkiller = "Buy" local price_bandage = "Buy" local price_morphine = "Buy" local price_tent = "Buy" local price_night = "Buy" local price_infa = "Buy" local price_soda = "Buy" local price_pasta = "Buy" local price_burger = "Buy" local price_pizza = "Buy" local price_water = "Buy" local price_ghillie = "Buy" local price_civilian = "Buy" local price_m4mag = "Buy" local C1 = guiCreateLabel(10,25,250,55,"Coyote Backpack",false,ShopWindow) guiLabelSetColor ( C1, 0, 250, 0 ) local C2 = guiCreateLabel(10,50,250,55,"Czech Backpack",false,ShopWindow) guiLabelSetColor ( C2, 0, 250, 0 ) local C3 = guiCreateLabel(10,75,250,55,"Alice Backpack",false,ShopWindow) guiLabelSetColor ( C3, 0, 250, 0 ) local C4 = guiCreateLabel(10,100,250,55,"M4",false,ShopWindow) guiLabelSetColor ( C4, 0, 250, 0 ) local C5 = guiCreateLabel(10,125,250,55,"M9 SD",false,ShopWindow) guiLabelSetColor ( C5, 0, 250, 0 ) local C6 = guiCreateLabel(10,150,250,55,"Medic Kit",false,ShopWindow) guiLabelSetColor ( C6, 0, 250, 0 ) local C7 = guiCreateLabel(10,175,250,55,"Painkiller",false,ShopWindow) guiLabelSetColor ( C7, 0, 250, 0 ) local C8 = guiCreateLabel(10,200,250,55,"Bandage",false,ShopWindow) guiLabelSetColor ( C8, 0, 250, 0 ) local C9 = guiCreateLabel(10,225,250,55,"Morphine",false,ShopWindow) guiLabelSetColor ( C9, 0, 250, 0 ) local C10 = guiCreateLabel(10,250,250,55,"MP5A5",false,ShopWindow) guiLabelSetColor ( C10, 0, 250, 0 ) local C11 = guiCreateLabel(10,275,250,55,"Tent",false,ShopWindow) guiLabelSetColor ( C11, 0, 250, 0 ) local C12 = guiCreateLabel(10,300,250,55,"Night Vision Goggles",false,ShopWindow) guiLabelSetColor ( C12, 0, 250, 0 ) local C13 = guiCreateLabel(10,325,250,55,"Infrared Goggles",false,ShopWindow) guiLabelSetColor ( C13, 0, 250, 0 ) local C14 = guiCreateLabel(10,350,250,55,"Soda Bottle",false,ShopWindow) guiLabelSetColor ( C14, 0, 250, 0 ) local C15 = guiCreateLabel(10,375,250,55,"Pasta Can",false,ShopWindow) guiLabelSetColor ( C15, 0, 250, 0 ) local C16 = guiCreateLabel(10,400,250,55,"Burger",false,ShopWindow) guiLabelSetColor ( C16, 0, 250, 0 ) local C17 = guiCreateLabel(10,425,250,55,"Pizza",false,ShopWindow) guiLabelSetColor ( C17, 0, 250, 0 ) local C18 = guiCreateLabel(10,450,250,55,"Water Bottle",false,ShopWindow) guiLabelSetColor ( C18, 0, 250, 0 ) local C19 = guiCreateLabel(10,475,250,55,"Ghillie Suit",false,ShopWindow) guiLabelSetColor ( C19, 0, 250, 0 ) local C20 = guiCreateLabel(10,500,250,55,"Civilian Clothing",false,ShopWindow) guiLabelSetColor ( C20, 0, 250, 0 ) local C21 = guiCreateLabel(10,525,250,55,"M4 Mag",false,ShopWindow) guiLabelSetColor ( C20, 0, 250, 0 ) -- ========================================================================================================================================================-- local B1 = guiCreateLabel(205,25,250,55,"90",false,ShopWindow) guiLabelSetColor ( B1, 255, 153, 0 ) local B2 = guiCreateLabel(205,50,250,55,"90",false,ShopWindow) guiLabelSetColor ( B2, 255, 153, 0 ) local B3 = guiCreateLabel(205,75,250,55,"90",false,ShopWindow) guiLabelSetColor ( B3, 255, 153, 0 ) local B4 = guiCreateLabel(205,100,250,55,"90",false,ShopWindow) guiLabelSetColor ( B4, 255, 153, 0 ) local B5 = guiCreateLabel(205,125,250,55,"90",false,ShopWindow) guiLabelSetColor ( B5, 255, 153, 0 ) local B6 = guiCreateLabel(205,150,250,55,"90",false,ShopWindow) guiLabelSetColor ( B6, 255, 153, 0 ) local B7 = guiCreateLabel(205,175,250,55,"90",false,ShopWindow) guiLabelSetColor ( B7, 255, 153, 0 ) local B8 = guiCreateLabel(205,200,250,55,"90",false,ShopWindow) guiLabelSetColor ( B8, 255, 153, 0 ) local B9 = guiCreateLabel(205,225,250,55,"90",false,ShopWindow) guiLabelSetColor ( B9, 255, 153, 0 ) local B10 = guiCreateLabel(205,250,250,55,"90",false,ShopWindow) guiLabelSetColor ( B10, 255, 153, 0 ) local B11 = guiCreateLabel(205,275,250,55,"90",false,ShopWindow) guiLabelSetColor ( B11, 255, 153, 0 ) local B12 = guiCreateLabel(205,300,250,55,"90",false,ShopWindow) guiLabelSetColor ( B12, 255, 153, 0 ) local B13 = guiCreateLabel(205,325,250,55,"90",false,ShopWindow) guiLabelSetColor ( B13, 255, 153, 0 ) local B14 = guiCreateLabel(205,350,250,55,"90",false,ShopWindow) guiLabelSetColor ( B14, 255, 153, 0 ) local B15 = guiCreateLabel(205,375,250,55,"90",false,ShopWindow) guiLabelSetColor ( B15, 255, 153, 0 ) local B16 = guiCreateLabel(205,400,250,55,"90",false,ShopWindow) guiLabelSetColor ( B16, 255, 153, 0 ) local B17 = guiCreateLabel(205,425,250,55,"90",false,ShopWindow) guiLabelSetColor ( B17, 255, 153, 0 ) local B18 = guiCreateLabel(205,450,250,55,"90",false,ShopWindow) guiLabelSetColor ( B18, 255, 153, 0 ) local B19 = guiCreateLabel(205,475,250,55,"90",false,ShopWindow) guiLabelSetColor ( B19, 255, 153, 0 ) local B20 = guiCreateLabel(205,500,250,55,"90",false,ShopWindow) guiLabelSetColor ( B20, 255, 153, 0 ) btn_buy_coyote = guiCreateButton(220,25,55,16,price_coyote,false,ShopWindow) btn_buy_czech = guiCreateButton(220,50,55,16,price_czech,false,ShopWindow) btn_buy_alice = guiCreateButton(220,75,55,16,price_alice,false,ShopWindow) btn_buy_m4 = guiCreateButton(220,100,55,16,price_m4,false,ShopWindow) btn_buy_m9sd = guiCreateButton(220,125,55,16,price_m9sd,false,ShopWindow) btn_buy_medic = guiCreateButton(220,150,55,16,price_medic,false,ShopWindow) btn_buy_painkiller= guiCreateButton(220,175,55,16,price_painkiller,false,ShopWindow) btn_buy_bandage = guiCreateButton(220,200,55,16,price_bandage,false,ShopWindow) btn_buy_morphine = guiCreateButton(220,225,55,16,price_morphine,false,ShopWindow) btn_buy_mp5a5 = guiCreateButton(220,250,55,16,price_mp5a5,false,ShopWindow) btn_buy_tent = guiCreateButton(220,275,55,16,price_tent,false,ShopWindow) btn_buy_night = guiCreateButton(220,300,55,16,price_night,false,ShopWindow) btn_buy_infa = guiCreateButton(220,325,55,16,price_infa,false,ShopWindow) btn_buy_soda = guiCreateButton(220,350,55,16,price_soda,false,ShopWindow) btn_buy_pasta = guiCreateButton(220,375,55,16,price_pasta,false,ShopWindow) btn_buy_burger = guiCreateButton(220,400,55,16,price_burger,false,ShopWindow) btn_buy_pizza = guiCreateButton(220,425,55,16,price_pizza,false,ShopWindow) btn_buy_water = guiCreateButton(220,450,55,16,price_water,false,ShopWindow) btn_buy_ghillie = guiCreateButton(220,475,55,16,price_ghillie,false,ShopWindow) btn_buy_civilian = guiCreateButton(220,500,55,16,price_civilian,false,ShopWindow) scr = guiCreateScrollBar(282, 30, 8, 460, false, false, ShopWindow) addEventHandler("onClientGUIClick", btn_buy_coyote, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_czech, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_alice, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_m4 , BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_m9sd, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_medic, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_painkiller, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_bandage, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_morphine, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_mp5a5, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_tent, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_night, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_infa, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_soda, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_pasta, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_burger, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_pizza, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_water, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_license, BuyLicense) addEventHandler("onClientGUIClick", btn_buy_ghillie, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_civilian, BuyWeapon) guiWindowSetSizable(ShopWindow,false) guiSetVisible(ShopWindow,false) end addEventHandler("onClientResourceStart", getRootElement(), CreateShopWindow) function BuyWeapon(button, state) if (button == "left") then if(source == btn_buy_coyote) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_coyote") elseif(source == btn_buy_czech) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_czech") elseif(source == btn_buy_alice) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_alice") elseif(source == btn_buy_m4) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_m4") elseif(source == btn_buy_mp5a5) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_mp5a5") elseif(source == btn_buy_m9sd) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_m9sd") elseif(source == btn_buy_medic) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_medic") elseif(source == btn_buy_painkiller) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_painkiller") elseif(source == btn_buy_bandage) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_bandage") elseif(source == btn_buy_morphine) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_morphine") elseif(source == btn_buy_tent) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_tent") elseif(source == btn_buy_night) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_night") elseif(source == btn_buy_infa) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_infa") elseif(source == btn_buy_soda) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_soda") elseif(source == btn_buy_pasta) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_pasta") elseif(source == btn_buy_burger) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_burger") elseif(source == btn_buy_pizza) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_pizza") elseif(source == btn_buy_water) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_water") elseif(source == btn_buy_ghillie) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_ghillie") elseif(source == btn_buy_civilian) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_civilian") end end end function ShowGUI ( ) guiSetVisible ( ShopWindow, not guiGetVisible ( ShopWindow ) ) showCursor ( not isCursorShowing( ) ) end bindKey ( "F3","down", ShowGUI ) easy
  14. what's the problem? and why you can't fix it when your scripting skills is 92% ._.
  15. setTimer(removeEventHandler, 2500, 1, "onClientPreRender", root, tekst1)
  16. HUNGRY:3

    not work

    Change line six to: aclGroupAddObject (vip, "user."..user)
  17. When you'll release it? ? did you stopped working on it?
  18. local ped = createPed(0, -1324, -88, 25) triggerServerEvent("giveMinigun",ped)
  19. use triggerClientEvent In server side btw giveWeapon can't be used in client side.
×
×
  • Create New...