-
Posts
439 -
Joined
-
Last visited
-
Days Won
4
Everything posted by Turbe$Z
-
thanks, working fine:D but i tried this in client side, and doesn't working setselected, why? function warponoff ( ) if guiCheckBoxGetSelected ( getControl ( wndMain,'Warp' ) ) then guiCheckBoxSetSelected(getControl ( wndMain,'Warp',true)) setElementData ( localPlayer,'IsWarpLocked',false ) else setElementData ( localPlayer,'IsWarpLocked',true ) end end
-
---server function warpMe(targetPlayer) local interior = getElementInterior(targetPlayer) setElementInterior(source, interior) setCameraInterior(source, interior) if getElementData(targetPlayer, "IsWarpLocked") then outputChatBox("Ez a játékos nem engedte meg, hogy rá warpoljanak!", source, r, g, b, false) return end if isPedDead(source) then spawnMe() end local vehicle = getPedOccupiedVehicle(targetPlayer) if not vehicle then -- target player is not in a vehicle - just warp next to him local x, y, z = getElementPosition(targetPlayer) clientCall(source, 'setPlayerPosition', x + 2, y, z) else -- target player is in a vehicle - warp into it if there's space left if getPedOccupiedVehicle(source) then --removePlayerFromVehicle(source) outputChatBox('Get out of your vehicle first.', source) return end local numseats = getVehicleMaxPassengers(vehicle) for i=0,numseats do if not getVehicleOccupant(vehicle, i) then if isPedDead(source) then local x, y, z = getElementPosition(vehicle) spawnMe(x + 4, y, z + 1) end warpPedIntoVehicle(source, vehicle, i) return end end outputChatBox("No free seats left in " .. getPlayerName(targetPlayer) .. "'s vehicle.", source, 255, 0, 0) end end function(player) setElementData(player, "IsWarpLocked", true) else removeElementData(player, "IsWarpLocked") end addEvent( "warponoff", true ) addEventHandler( "warponoff", root, giveWeaponsOnSpawn ) ---client function warponoff ( ) triggerServerEvent("warponoff", getLocalPlayer(), group) end {'chk', id='Warp', onclick=warponoff, width=60},
-
if yes, how?
-
i tried create a window in freeroam, but doesn't working --------------------------- -- Teszt --------------------------- local GUIEditor = { button = {}, window = {}, label = {} } wnd.GUIEditor.window[1] = guiCreateWindow(541, 375, 360, 222, "Teszt", false) guiWindowSetSizable(wnd.GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(10, 182, 340, 30, "teszt", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(9, 26, 341, 156, "- Teszt", false, GUIEditor.window[1]) guiSetVisible( wnd.GUIEditor.window[1], false ) {'btn', id='gift', window=wnd.GUIEditor.window[1], width=250} Error: gui.lua:283: attempt to index local 'wnd' (a userdata value) what wrong?
-
i tried this, but doesn't working :c addEventHandler ( "onPlayerChat", root, function ( msg, type ) if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) and type == 0 then cancelEvent ( ) local function outputMessage(author,message) outputChatBox("#ff0000[T] #FFffff"..author..": #FF0000"..message,getRootElement(),0,0,0,true) end local function changetag(author,message) outputChatBox("#ff0000[Tulaj] #FFffff"..author..": #FFd700"..message,getRootElement(),0,0,0,true) end addCommandHandler("rang",changetag) elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Everyone" ) ) and type == 0 then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) local function outputMessage(author,message) local message = string.gsub(message, "#%x%x%x%x%x%x", " ") outputChatBox(author.."#ffFFff: #ffffff"..message,getRootElement(),r,g,b,true) end --outputChatBox ( " " .. getPlayerName ( source ) .. " #00Baff:#ffffff " .. msg, getRootElement(), r, g, b, true ) end end function(msg,type) -- Only affect normal messages if type == 0 then -- Cancel output cancelEvent() -- Clean up the message from any bad words local new = "" local iter = 0 for word in msg:gmatch("%S+") do iter = iter + 1 for i,swr in ipairs(swearWords) do local src = word:lower():gsub("%s","") local src = src:gsub("#%x%x%x%x%x%x","") local src = src:gsub("%c","") local src = src:gsub("%p","") local pat = swr:lower():gsub("%s","") if src:find(pat) then local replaceString = "" for x=1,word:gsub("#%x%x%x%x%x%x",""):len() do replaceString = replaceString.."*" end word = word:gsub(word,replaceString) end end --if iter == 1 and word:len() > 2 then --word = word:gsub("%a",string.upper,1) --end --new = new..word.." " end if new ~= "" then msg = new end -- Get appropriate team colors and output the clean message local pTeam = getPlayerTeam(source) if pTeam then local r,g,b = getTeamColor(pTeam) local hr,hg,hb = decToHex(r),decToHex(g),decToHex(b) local color = "#"..hr..hg..hb outputMessage(color..getPlayerName(source),msg) else outputMessage(getPlayerName(source),msg) end end end )
-
addEventHandler ( "onPlayerChat", root, function ( msg, type ) if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) and type == 0 then cancelEvent ( ) function outputMessage(author,message) outputChatBox("#ff0000[T] #FFffff"..author..": #FF0000"..message,getRootElement(),0,0,0,true) end function changetag(author,message) outputChatBox("#ff0000[Tulaj] #FFffff"..author..": #FFd700"..message,getRootElement(),0,0,0,true) end addCommandHandler("rang",changetag) why not working this? what wrong?
-
like this? or what is the functionname? function m4() triggerServerEvent ("m4",getLocalPlayer(),m4) end addEventHandler("onClientGUIClick", GUIEditor.button[2], m4) addEventHandler("onClientGUIClick", GUIEditor.button[2], m4, false)
-
when i type a word, the text working on my screen, when other player write a word, the word doesn't working just on localplayer screen
-
This just client side this is server: function teszt(p) if hasObjectPermissionTo(p,"function.kickPlayer") then triggerClientEvent(p,"showguii",p) else outputChatBox("Ehhez neked nincs jogod") end end addCommandHandler("eventp",teszt) addEvent("server",true) addEventHandler("server",root, function (text1,text2,text3) outputChatBox("#FF0000~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",root,0,255,0, true) outputChatBox("#DD3333[FELHÍVÁS] ~> #00baff"..text1.."",root,0,255,0, true) outputChatBox("#FF0000~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",root,0,255,0, true) end )
-
local screenW, screenH = guiGetScreenSize() local GUIEditor = { button = {}, window = {}, edit = {} } GUIEditor.window[1] = guiCreateWindow(0.35, 0.40, 0.32, 0.12, "Event hírdető panel", true) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(0.04, 0.68, 0.78, 0.23, "Beírt szöveg kiírása", true, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(0.03, 0.21, 0.93, 0.38, "", true, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(0.84, 0.68, 0.14, 0.23, "Bezár", true, GUIEditor.window[1]) guiSetVisible(GUIEditor.window[1], false) guiSetInputMode("no_binds_when_editing") function showGUI() guiSetVisible( GUIEditor.window[1], true ) showCursor( true ) end addEvent( "showguii", true ) addEventHandler( "showguii", localPlayer, showGUI ) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[2] then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end ) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[1] then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end ) addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) text1 = guiGetText ( GUIEditor.edit[1] ) --text2 = guiGetText ( valasz1 ) --text3 = guiGetText ( valasz2 ) if text1 ~= "" then triggerServerEvent( "server",localPlayer,text1 ) setTimer ( function( ) text1 = nil end,5000, 1 ) end end,false ) addEventHandler ( 'onClientRender',root, function ( ) dxDrawText(text1, (screenW * 0.2924) + 1, (screenH * 0.3778) + 1, (screenW * 0.7014) + 1, (screenH * 0.5400) + 1, tocolor(0, 0, 0, 255), 2.50, "default-bold", "left", "top", false, true, false, false, false) dxDrawText(text1, screenW * 0.2924, screenH * 0.3778, screenW * 0.7014, screenH * 0.5400, tocolor(0, 186, 255, 255), 2.50, "default-bold", "left", "top", false, true, false, false, false) end ) the dx text why not show on all players screen? o-O
-
i added this: addEventHandler("onClientGUIClick", GUIEditor.tabpanel[1], konnygaz, false) addEventHandler("onClientGUIClick", GUIEditor.tabpanel[1], molotov, false) addEventHandler("onClientGUIClick", GUIEditor.tabpanel[1], tapados, false) addEventHandler("onClientGUIClick", GUIEditor.tabpanel[1], granat, false) addEventHandler("onClientGUIClick", GUIEditor.tabpanel[1], lsz, false) addEventHandler("onClientGUIClick", GUIEditor.tabpanel[1], silenced, false) addEventHandler("onClientGUIClick", GUIEditor.tabpanel[1], lfcsp, false) addEventHandler("onClientGUIClick", GUIEditor.tabpanel[1], shotgun, false) addEventHandler("onClientGUIClick", GUIEditor.tabpanel[1], tec, false) addEventHandler("onClientGUIClick", GUIEditor.tabpanel[1], mp5, false) addEventHandler("onClientGUIClick", GUIEditor.tabpanel[1], sniper, false) addEventHandler("onClientGUIClick", GUIEditor.tabpanel[1], rpg, false) addEventHandler("onClientGUIClick", GUIEditor.tabpanel[1], uzi, false) addEventHandler("onClientGUIClick", GUIEditor.tabpanel[1], kilencmm, false) addEventHandler("onClientGUIClick", GUIEditor.tabpanel[1], m4, false) addEventHandler("onClientGUIClick", GUIEditor.tabpanel[1], ak47, false) ----------------------------------------------------------------------------- addEventHandler("onClientGUIClick", GUIEditor.tab[1], konnygaz, false) addEventHandler("onClientGUIClick", GUIEditor.tab[1], molotov, false) addEventHandler("onClientGUIClick", GUIEditor.tab[1], tapados, false) addEventHandler("onClientGUIClick", GUIEditor.tab[1], granat, false) addEventHandler("onClientGUIClick", GUIEditor.tab[1], lsz, false) addEventHandler("onClientGUIClick", GUIEditor.tab[1], silenced, false) addEventHandler("onClientGUIClick", GUIEditor.tab[1], lfcsp, false) addEventHandler("onClientGUIClick", GUIEditor.tab[1], shotgun, false) addEventHandler("onClientGUIClick", GUIEditor.tab[1], tec, false) addEventHandler("onClientGUIClick", GUIEditor.tab[1], mp5, false) addEventHandler("onClientGUIClick", GUIEditor.tab[1], sniper, false) addEventHandler("onClientGUIClick", GUIEditor.tab[1], rpg, false) addEventHandler("onClientGUIClick", GUIEditor.tab[1], uzi, false) addEventHandler("onClientGUIClick", GUIEditor.tab[1], kilencmm, false) addEventHandler("onClientGUIClick", GUIEditor.tab[1], m4, false) addEventHandler("onClientGUIClick", GUIEditor.tab[1], ak47, false) ----------------------------------------------------------------------------- addEventHandler("onClientGUIClick", GUIEditor.tab[2], konnygaz, false) addEventHandler("onClientGUIClick", GUIEditor.tab[2], molotov, false) addEventHandler("onClientGUIClick", GUIEditor.tab[2], tapados, false) addEventHandler("onClientGUIClick", GUIEditor.tab[2], granat, false) addEventHandler("onClientGUIClick", GUIEditor.tab[2], lsz, false) addEventHandler("onClientGUIClick", GUIEditor.tab[2], silenced, false) addEventHandler("onClientGUIClick", GUIEditor.tab[2], lfcsp, false) addEventHandler("onClientGUIClick", GUIEditor.tab[2], shotgun, false) addEventHandler("onClientGUIClick", GUIEditor.tab[2], tec, false) addEventHandler("onClientGUIClick", GUIEditor.tab[2], mp5, false) addEventHandler("onClientGUIClick", GUIEditor.tab[2], sniper, false) addEventHandler("onClientGUIClick", GUIEditor.tab[2], rpg, false) addEventHandler("onClientGUIClick", GUIEditor.tab[2], uzi, false) addEventHandler("onClientGUIClick", GUIEditor.tab[2], kilencmm, false) addEventHandler("onClientGUIClick", GUIEditor.tab[2], m4, false) addEventHandler("onClientGUIClick", GUIEditor.tab[2], ak47, false) ----------------------------------------------------------------------------- addEventHandler("onClientGUIClick", GUIEditor.tab[3], konnygaz, false) addEventHandler("onClientGUIClick", GUIEditor.tab[3], molotov, false) addEventHandler("onClientGUIClick", GUIEditor.tab[3], tapados, false) addEventHandler("onClientGUIClick", GUIEditor.tab[3], granat, false) addEventHandler("onClientGUIClick", GUIEditor.tab[3], lsz, false) addEventHandler("onClientGUIClick", GUIEditor.tab[3], silenced, false) addEventHandler("onClientGUIClick", GUIEditor.tab[3], lfcsp, false) addEventHandler("onClientGUIClick", GUIEditor.tab[3], shotgun, false) addEventHandler("onClientGUIClick", GUIEditor.tab[3], tec, false) addEventHandler("onClientGUIClick", GUIEditor.tab[3], mp5, false) addEventHandler("onClientGUIClick", GUIEditor.tab[3], sniper, false) addEventHandler("onClientGUIClick", GUIEditor.tab[3], rpg, false) addEventHandler("onClientGUIClick", GUIEditor.tab[3], uzi, false) addEventHandler("onClientGUIClick", GUIEditor.tab[3], kilencmm, false) addEventHandler("onClientGUIClick", GUIEditor.tab[3], m4, false) addEventHandler("onClientGUIClick", GUIEditor.tab[3], ak47, false) ----------------------------------------------------------------------------- addEventHandler("onClientGUIClick", GUIEditor.tab[4], konnygaz, false) addEventHandler("onClientGUIClick", GUIEditor.tab[4], molotov, false) addEventHandler("onClientGUIClick", GUIEditor.tab[4], tapados, false) addEventHandler("onClientGUIClick", GUIEditor.tab[4], granat, false) addEventHandler("onClientGUIClick", GUIEditor.tab[4], lsz, false) addEventHandler("onClientGUIClick", GUIEditor.tab[4], silenced, false) addEventHandler("onClientGUIClick", GUIEditor.tab[4], lfcsp, false) addEventHandler("onClientGUIClick", GUIEditor.tab[4], shotgun, false) addEventHandler("onClientGUIClick", GUIEditor.tab[4], tec, false) addEventHandler("onClientGUIClick", GUIEditor.tab[4], mp5, false) addEventHandler("onClientGUIClick", GUIEditor.tab[4], sniper, false) addEventHandler("onClientGUIClick", GUIEditor.tab[4], rpg, false) addEventHandler("onClientGUIClick", GUIEditor.tab[4], uzi, false) addEventHandler("onClientGUIClick", GUIEditor.tab[4], kilencmm, false) addEventHandler("onClientGUIClick", GUIEditor.tab[4], m4, false) addEventHandler("onClientGUIClick", GUIEditor.tab[4], ak47, false) ----------------------------------------------------------------------------- addEventHandler("onClientGUIClick", GUIEditor.tab[5], konnygaz, false) addEventHandler("onClientGUIClick", GUIEditor.tab[5], molotov, false) addEventHandler("onClientGUIClick", GUIEditor.tab[5], tapados, false) addEventHandler("onClientGUIClick", GUIEditor.tab[5], granat, false) addEventHandler("onClientGUIClick", GUIEditor.tab[5], lsz, false) addEventHandler("onClientGUIClick", GUIEditor.tab[5], silenced, false) addEventHandler("onClientGUIClick", GUIEditor.tab[5], lfcsp, false) addEventHandler("onClientGUIClick", GUIEditor.tab[5], shotgun, false) addEventHandler("onClientGUIClick", GUIEditor.tab[5], tec, false) addEventHandler("onClientGUIClick", GUIEditor.tab[5], mp5, false) addEventHandler("onClientGUIClick", GUIEditor.tab[5], sniper, false) addEventHandler("onClientGUIClick", GUIEditor.tab[5], rpg, false) addEventHandler("onClientGUIClick", GUIEditor.tab[5], uzi, false) addEventHandler("onClientGUIClick", GUIEditor.tab[5], kilencmm, false) addEventHandler("onClientGUIClick", GUIEditor.tab[5], m4, false) addEventHandler("onClientGUIClick", GUIEditor.tab[5], ak47, false) ----------------------------------------------------------------------------- addEventHandler("onClientGUIClick", GUIEditor.tab[6], konnygaz, false) addEventHandler("onClientGUIClick", GUIEditor.tab[6], molotov, false) addEventHandler("onClientGUIClick", GUIEditor.tab[6], tapados, false) addEventHandler("onClientGUIClick", GUIEditor.tab[6], granat, false) addEventHandler("onClientGUIClick", GUIEditor.tab[6], lsz, false) addEventHandler("onClientGUIClick", GUIEditor.tab[6], silenced, false) addEventHandler("onClientGUIClick", GUIEditor.tab[6], lfcsp, false) addEventHandler("onClientGUIClick", GUIEditor.tab[6], shotgun, false) addEventHandler("onClientGUIClick", GUIEditor.tab[6], tec, false) addEventHandler("onClientGUIClick", GUIEditor.tab[6], mp5, false) addEventHandler("onClientGUIClick", GUIEditor.tab[6], sniper, false) addEventHandler("onClientGUIClick", GUIEditor.tab[6], rpg, false) addEventHandler("onClientGUIClick", GUIEditor.tab[6], uzi, false) addEventHandler("onClientGUIClick", GUIEditor.tab[6], kilencmm, false) addEventHandler("onClientGUIClick", GUIEditor.tab[6], m4, false) addEventHandler("onClientGUIClick", GUIEditor.tab[6], ak47, false) but doesn't working. why?
-
--client local GUIEditor = { tab = {}, tabpanel = {}, label = {}, button = {}, window = {} } GUIEditor.window[1] = guiCreateWindow(0.32, 0.29, 0.37, 0.29, "[DDC]© Fegyverbolt /turbesz\"", true) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.button[1] = guiCreateButton(0.02, 0.91, 0.96, 0.05, "bezárás", true, GUIEditor.window[1]) GUIEditor.tabpanel[1] = guiCreateTabPanel(0.02, 0.08, 0.96, 0.80, true, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("#1", GUIEditor.tabpanel[1]) GUIEditor.label[1] = guiCreateLabel(0.01, 0.00, 0.99, 0.29, "M4 - 5000 tölténnyel", true, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetHorizontalAlign(GUIEditor.label[1], "left", true) GUIEditor.button[2] = guiCreateButton(0.01, 0.27, 0.99, 0.12, "Kérem ezt! Ár: 3000$!", true, GUIEditor.tab[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF24FE00") GUIEditor.label[2] = guiCreateLabel(0.01, 0.38, 0.99, 0.29, "AK47 - 5000 tölténnyel", true, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[2], "sa-header") guiLabelSetHorizontalAlign(GUIEditor.label[2], "left", true) GUIEditor.button[3] = guiCreateButton(0.00, 0.67, 0.99, 0.12, "Kérem ezt! Ár: 2500$!", true, GUIEditor.tab[1]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF24FE00") GUIEditor.label[3] = guiCreateLabel(0.11, 0.85, 0.78, 0.10, "Folytatást a következő fülön találhatsz! ;)", true, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 251, 248, 2) GUIEditor.tab[2] = guiCreateTab("#2", GUIEditor.tabpanel[1]) GUIEditor.label[4] = guiCreateLabel(0.01, 0.05, 0.97, 0.30, "9MM - 4000 Tölténnyel", true, GUIEditor.tab[2]) guiSetFont(GUIEditor.label[4], "sa-header") GUIEditor.button[4] = guiCreateButton(0.01, 0.37, 0.97, 0.12, "Kérem ezt! Ár: 2000$!", true, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFBF802") GUIEditor.label[5] = guiCreateLabel(0.01, 0.48, 0.98, 0.27, "Uzi - 4000 Tölténnyel", true, GUIEditor.tab[2]) guiSetFont(GUIEditor.label[5], "sa-header") GUIEditor.button[5] = guiCreateButton(0.01, 0.78, 0.97, 0.12, "Kérem ezt! Ár: 2500$!", true, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFBF802") GUIEditor.tab[3] = guiCreateTab("#3", GUIEditor.tabpanel[1]) GUIEditor.label[6] = guiCreateLabel(0.02, 0.04, 0.96, 0.29, "RPG - 100 Tölténnyel", true, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[6], "sa-header") GUIEditor.button[6] = guiCreateButton(0.01, 0.31, 0.97, 0.13, "Kérem ezt! Ára: 300000$!", true, GUIEditor.tab[3]) guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FF01C4B8") GUIEditor.label[7] = guiCreateLabel(0.02, 0.45, 0.96, 0.29, "M.lövész - 100 Tölténnyel", true, GUIEditor.tab[3]) guiSetFont(GUIEditor.label[7], "sa-header") GUIEditor.button[7] = guiCreateButton(0.01, 0.77, 0.97, 0.13, "Kérem ezt! Ára: 50000$!", true, GUIEditor.tab[3]) guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FF01C4B8") GUIEditor.tab[4] = guiCreateTab("#4", GUIEditor.tabpanel[1]) GUIEditor.label[8] = guiCreateLabel(0.02, 0.05, 0.96, 0.10, "MP5 - 3000 Tölténnyel", true, GUIEditor.tab[4]) guiSetFont(GUIEditor.label[8], "default-bold-small") guiLabelSetHorizontalAlign(GUIEditor.label[8], "center", false) GUIEditor.button[8] = guiCreateButton(0.09, 0.17, 0.81, 0.11, "Kérem ezt! Ár: 4000$!", true, GUIEditor.tab[4]) GUIEditor.label[9] = guiCreateLabel(0.02, 0.30, 0.96, 0.10, "Tec9 - 3000 Tölténnyel", true, GUIEditor.tab[4]) guiSetFont(GUIEditor.label[9], "default-bold-small") guiLabelSetHorizontalAlign(GUIEditor.label[9], "center", false) GUIEditor.button[9] = guiCreateButton(0.09, 0.41, 0.81, 0.11, "Kérem ezt! Ár: 4500$!", true, GUIEditor.tab[4]) GUIEditor.label[10] = guiCreateLabel(0.02, 0.54, 0.96, 0.10, "Shotgun - 2500 Tölténnyel", true, GUIEditor.tab[4]) guiSetFont(GUIEditor.label[10], "default-bold-small") guiLabelSetHorizontalAlign(GUIEditor.label[10], "center", false) GUIEditor.button[10] = guiCreateButton(0.09, 0.64, 0.81, 0.11, "Kérem ezt! Ár: 5000$!", true, GUIEditor.tab[4]) GUIEditor.label[11] = guiCreateLabel(0.02, 0.77, 0.96, 0.10, "Lefűrészelt csövű puska - 2500 Tölténnyel", true, GUIEditor.tab[4]) guiSetFont(GUIEditor.label[11], "default-bold-small") guiLabelSetHorizontalAlign(GUIEditor.label[11], "center", false) GUIEditor.button[11] = guiCreateButton(0.09, 0.88, 0.81, 0.11, "Kérem ezt! Ár: 5500$!", true, GUIEditor.tab[4]) GUIEditor.tab[5] = guiCreateTab("#5", GUIEditor.tabpanel[1]) GUIEditor.label[12] = guiCreateLabel(0.01, 0.02, 0.97, 0.10, "Hangtompítós pisztoly - 3000 tölténnyel", true, GUIEditor.tab[5]) guiSetFont(GUIEditor.label[12], "default-bold-small") guiLabelSetHorizontalAlign(GUIEditor.label[12], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[12], "center") GUIEditor.button[12] = guiCreateButton(0.12, 0.13, 0.75, 0.11, "Kérem ezt! Ára: 1500$!", true, GUIEditor.tab[5]) GUIEditor.label[13] = guiCreateLabel(0.01, 0.24, 0.97, 0.10, "Lángszóró - 3000 tölténnyel", true, GUIEditor.tab[5]) guiSetFont(GUIEditor.label[13], "default-bold-small") guiLabelSetHorizontalAlign(GUIEditor.label[13], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[13], "center") GUIEditor.button[13] = guiCreateButton(0.12, 0.36, 0.75, 0.11, "Kérem ezt! Ára: 10000$!", true, GUIEditor.tab[5]) GUIEditor.label[14] = guiCreateLabel(0.01, 0.47, 0.97, 0.10, "Gránát - 50 darab", true, GUIEditor.tab[5]) guiSetFont(GUIEditor.label[14], "default-bold-small") guiLabelSetHorizontalAlign(GUIEditor.label[14], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[14], "center") GUIEditor.button[14] = guiCreateButton(0.12, 0.59, 0.75, 0.11, "Kérem ezt! Ára: 15000$!", true, GUIEditor.tab[5]) GUIEditor.label[15] = guiCreateLabel(0.01, 0.70, 0.97, 0.10, "Tapadós bomba - 50 darab", true, GUIEditor.tab[5]) guiSetFont(GUIEditor.label[15], "default-bold-small") guiLabelSetHorizontalAlign(GUIEditor.label[15], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[15], "center") GUIEditor.button[15] = guiCreateButton(0.12, 0.84, 0.75, 0.11, "Kérem ezt! Ára: 20000$!", true, GUIEditor.tab[5]) GUIEditor.tab[6] = guiCreateTab("#6", GUIEditor.tabpanel[1]) GUIEditor.label[16] = guiCreateLabel(0.00, 0.03, 0.98, 0.28, "Molotov - 50 darab", true, GUIEditor.tab[6]) guiSetFont(GUIEditor.label[16], "sa-header") GUIEditor.button[16] = guiCreateButton(0.00, 0.33, 0.99, 0.15, "Kérem ezt! Ár: 10000$!", true, GUIEditor.tab[6]) guiSetFont(GUIEditor.button[16], "clear-normal") guiSetProperty(GUIEditor.button[16], "NormalTextColour", "FF4F09FE") GUIEditor.label[17] = guiCreateLabel(0.00, 0.51, 0.98, 0.28, "Könnygáz - 50 darab", true, GUIEditor.tab[6]) guiSetFont(GUIEditor.label[17], "sa-header") GUIEditor.button[17] = guiCreateButton(0.00, 0.80, 0.99, 0.15, "Kérem ezt! Ár: 20000$!", true, GUIEditor.tab[6]) guiSetFont(GUIEditor.button[17], "clear-normal") guiSetProperty(GUIEditor.button[17], "NormalTextColour", "FF4F09FE") guiSetVisible ( GUIEditor.window[1], false ) function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) == false then guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) elseif guiGetVisible ( GUIEditor.window[1] ) == true then guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) end end bindKey ( "F2", "down", OpenWin) function bezarom() guiSetVisible ( GUIEditor.window[1], false ) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor.button[1], bezarom) function m4() triggerServerEvent ("m4",getLocalPlayer(),m4) end addEventHandler("onClientGUIClick", GUIEditor.button[2], m4) function ak47() triggerServerEvent ("ak47",getLocalPlayer(),ak47) end addEventHandler("onClientGUIClick", GUIEditor.button[3], ak47) function kilencmm() triggerServerEvent ("kilencmm",getLocalPlayer(),kilencmm) end addEventHandler("onClientGUIClick", GUIEditor.button[4], kilencmm) function uzi() triggerServerEvent ("uzi",getLocalPlayer(),uzi) end addEventHandler("onClientGUIClick", GUIEditor.button[5], uzi) function rpg() triggerServerEvent ("rpg",getLocalPlayer(),rpg) end addEventHandler("onClientGUIClick", GUIEditor.button[6], rpg) function sniper() triggerServerEvent ("sniper",getLocalPlayer(),sniper) end addEventHandler("onClientGUIClick", GUIEditor.button[7], sniper) function mp5() triggerServerEvent ("mp5",getLocalPlayer(),mp5) end addEventHandler("onClientGUIClick", GUIEditor.button[8], mp5) function tec() triggerServerEvent ("tec",getLocalPlayer(),tec) end addEventHandler("onClientGUIClick", GUIEditor.button[9], tec) function shotgun() triggerServerEvent ("shotgun",getLocalPlayer(),shotgun) end addEventHandler("onClientGUIClick", GUIEditor.button[10], shotgun) function lfcsp() triggerServerEvent ("lfcsp",getLocalPlayer(),lfcsp) end addEventHandler("onClientGUIClick", GUIEditor.button[11], lfcsp) function silenced() triggerServerEvent ("silenced",getLocalPlayer(),silenced) end addEventHandler("onClientGUIClick", GUIEditor.button[12], silenced) function lsz() triggerServerEvent ("lsz",getLocalPlayer(),lsz) end addEventHandler("onClientGUIClick", GUIEditor.button[13], lsz) function granat() triggerServerEvent ("granat",getLocalPlayer(),granat) end addEventHandler("onClientGUIClick", GUIEditor.button[14], granat) function tapados() triggerServerEvent ("tapados",getLocalPlayer(),tapados) end addEventHandler("onClientGUIClick", GUIEditor.button[15], tapados) function molotov() triggerServerEvent ("molotov",getLocalPlayer(),molotov) end addEventHandler("onClientGUIClick", GUIEditor.button[16], molotov) function konnygaz() triggerServerEvent ("konnygaz",getLocalPlayer(),konnygaz) end addEventHandler("onClientGUIClick", GUIEditor.button[17], konnygaz) --server function elso ( ) if getPlayerMoney(source) >= 3000 then giveWeapon ( source, 31, 5000 ) -- Gives the M4 weapon with 200 ammo takePlayerMoney ( source, 3000 ) else outputChatBox("Nincs erre pénzed.", source, 255, 0, 0, false) end end addEvent( "m4", true ) addEventHandler( "m4", root, elso ) function masodik ( ) if getPlayerMoney(source) >= 2500 then giveWeapon ( source, 30, 5000 ) -- Gives the M4 weapon with 200 ammo takePlayerMoney ( source, 2500 ) else outputChatBox("Nincs erre pénzed.", source, 255, 0, 0, false) end end addEvent( "ak47", true ) addEventHandler( "ak47", root, masodik ) function harmadik ( ) if getPlayerMoney(source) >= 2000 then giveWeapon ( source, 22, 4000 ) -- Gives the M4 weapon with 200 ammo takePlayerMoney ( source, 2000 ) else outputChatBox("Nincs erre pénzed.", source, 255, 0, 0, false) end end addEvent( "kilencmm", true ) addEventHandler( "kilencmm", root, harmadik ) function negyedik ( ) if getPlayerMoney(source) >= 2500 then giveWeapon ( source, 28, 4000 ) -- Gives the M4 weapon with 200 ammo takePlayerMoney ( source, 2500 ) else outputChatBox("Nincs erre pénzed.", source, 255, 0, 0, false) end end addEvent( "uzi", true ) addEventHandler( "uzi", root, negyedik ) function otodik ( ) if getPlayerMoney(source) >= 300000 then giveWeapon ( source, 36, 100 ) -- Gives the M4 weapon with 200 ammo takePlayerMoney ( source, 300000 ) else outputChatBox("Nincs erre pénzed.", source, 255, 0, 0, false) end end addEvent( "rpg", true ) addEventHandler( "rpg", root, otodik ) function hatodik ( ) if getPlayerMoney(source) >= 50000 then giveWeapon ( source, 34, 100 ) -- Gives the M4 weapon with 200 ammo takePlayerMoney ( source, 50000 ) else outputChatBox("Nincs erre pénzed.", source, 255, 0, 0, false) end end addEvent( "sniper", true ) addEventHandler( "sniper", root, hatodik ) function hetedik ( ) if getPlayerMoney(source) >= 4000 then giveWeapon ( source, 29, 3000 ) -- Gives the M4 weapon with 200 ammo takePlayerMoney ( source, 4000 ) else outputChatBox("Nincs erre pénzed.", source, 255, 0, 0, false) end end addEvent( "mp5", true ) addEventHandler( "mp5", root, hetedik ) function nyolcadik ( ) if getPlayerMoney(source) >= 4500 then giveWeapon ( source, 32, 3000 ) -- Gives the M4 weapon with 200 ammo takePlayerMoney ( source, 4500 ) else outputChatBox("Nincs erre pénzed.", source, 255, 0, 0, false) end end addEvent( "tec", true ) addEventHandler( "tec", root, nyolcadik ) function kilencedik ( ) if getPlayerMoney(source) >= 5000 then giveWeapon ( source, 25, 2500 ) -- Gives the M4 weapon with 200 ammo takePlayerMoney ( source, 5000 ) else outputChatBox("Nincs erre pénzed.", source, 255, 0, 0, false) end end addEvent( "shotgun", true ) addEventHandler( "shotgun", root, kilencedik ) function tizedik ( ) if getPlayerMoney(source) >= 5500 then giveWeapon ( source, 26, 2500 ) -- Gives the M4 weapon with 200 ammo takePlayerMoney ( source, 5500 ) else outputChatBox("Nincs erre pénzed.", source, 255, 0, 0, false) end end addEvent( "lfcsp", true ) addEventHandler( "lfcsp", root, tizedik ) function tizenegyedik ( ) if getPlayerMoney(source) >= 1500 then giveWeapon ( source, 23, 3000 ) -- Gives the M4 weapon with 200 ammo takePlayerMoney ( source, 1500 ) else outputChatBox("Nincs erre pénzed.", source, 255, 0, 0, false) end end addEvent( "silenced", true ) addEventHandler( "silenced", root, tizenegyedik ) function tizenkettedik ( ) if getPlayerMoney(source) >= 10000 then giveWeapon ( source, 37, 3000 ) -- Gives the M4 weapon with 200 ammo takePlayerMoney ( source, 10000 ) else outputChatBox("Nincs erre pénzed.", source, 255, 0, 0, false) end end addEvent( "lsz", true ) addEventHandler( "lsz", root, tizenkettedik ) function tizenharmadik ( ) if getPlayerMoney(source) >= 15000 then giveWeapon ( source, 16, 50 ) -- Gives the M4 weapon with 200 ammo takePlayerMoney ( source, 15000 ) else outputChatBox("Nincs erre pénzed.", source, 255, 0, 0, false) end end addEvent( "granat", true ) addEventHandler( "granat", root, tizenharmadik ) function tizennegyedik ( ) if getPlayerMoney(source) >= 20000 then giveWeapon ( source, 39, 50 ) -- Gives the M4 weapon with 200 ammo takePlayerMoney ( source, 20000 ) else outputChatBox("Nincs erre pénzed.", source, 255, 0, 0, false) end end addEvent( "tapados", true ) addEventHandler( "tapados", root, tizennegyedik ) function tizenotodik ( ) if getPlayerMoney(source) >= 10000 then giveWeapon ( source, 18, 50 ) -- Gives the M4 weapon with 200 ammo takePlayerMoney ( source, 10000 ) else outputChatBox("Nincs erre pénzed.", source, 255, 0, 0, false) end end addEvent( "molotov", true ) addEventHandler( "molotov", root, tizenotodik ) function tizenhatodik ( ) if getPlayerMoney(source) >= 20000 then giveWeapon ( source, 17, 50 ) -- Gives the M4 weapon with 200 ammo takePlayerMoney ( source, 20000 ) else outputChatBox("Nincs erre pénzed.", source, 255, 0, 0, false) end end addEvent( "konnygaz", true ) addEventHandler( "konnygaz", root, tizenhatodik ) when i click on a tab, my money is decrease, and give me weapons, why? how to fix it?
-
local GUIEditor = { window = {}, scrollbar = {}, label = {} } GUIEditor.window[1] = guiCreateWindow(406, 147, 673, 585, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.scrollbar[1] = guiCreateScrollBar(615, 35, 27, 513, false, false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(18, 42, 587, 496, "a\n\nb\n\nc\n\nd\n\ne\n\nf\n\ng\n\nh\n\ni\n\nj\n\nk\n\nl\n\nm\n\nn\n\no\n\np\n\nq\n\nr\n\ns\n\nt\n\nu\n\nv\n\nw\n\nx\n\ny\n\nz", false, GUIEditor.window[1]) scrollbar doesn't working, why? o_O