Jump to content

Turbesz

Members
  • Posts

    245
  • Joined

  • Last visited

Everything posted by Turbesz

  1. doesn't show players, but gridlist is fine code: bb = guiCreateButton(658, 33, 172, 22, "Privát beszélgetés", false) guiSetVisible(bb,true) local GUIEditor = { button = {}, window = {}, gridlist = {}, } GUIEditor.window[1] = guiCreateWindow(405, 62, 682, 451, "privát beszélgetés by turbesz", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(646, 20, 26, 26, "X", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") grdPlayers = guiCreateGridList(0.0991,0.2449,0.8108,0.6968, true, GUIEditor.window[1]) colPlayers = guiGridListAddColumn(grdPlayers, "Játékosok", 0.85) local players = getElementsByType("player") for k,v in ipairs(players) do addPlayerToList(v) end guiSetVisible(GUIEditor.window[1],false) addEventHandler("onClientGUIClick",root, function () if source == bb then guiSetVisible(GUIEditor.window[1],true) showCursor ( true ) end end ) function Bezaras() guiSetVisible(GUIEditor.window[1], false) showCursor ( false ) end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], Bezaras)
  2. codes: --client bb = guiCreateButton(999, 0, 99, 35, "Privát üzenetek", false) guiSetVisible(bb,true) --- DONT TRY TO COPY LITTLE BITCH g_LocalPlayer = getLocalPlayer() g_Root = getRootElement() g_ThisResource = getThisResource() g_ResourceRoot = getResourceRootElement(getThisResource()) chat = {} -- table to store chat windows in newmsg = {show=false, tick=getTickCount(), showtime=5000, img=nil, lbl=nil } -- new msg table anims = {} function buildPlayerList() local x,y = guiGetScreenSize() local width,height = 175,350 x = x-width y = (y-height)/2 newmsg.img = guiCreateStaticImage(681.0000,134.0000, 42.0000,34.0000, "image/chat-icon.png", false) -- mail message icon newmsg.lbl = guiCreateLabel(553.0000,175.0000, 244.0000, 19.0000, "", false) guiLabelSetColor(newmsg.lbl,0, 170, 255) guiLabelSetHorizontalAlign(newmsg.lbl, "right", true) guiSetAlpha(newmsg.img, 0) --guiSetAlpha(newmsg.lbl, 0) wndPlayers = guiCreateWindow(-1,256,222,343, "Privát üzenetek", false) fond = guiCreateStaticImage(0.0405,0.0525,0.9189,0.9213,"image/mtalogo.png",true,wndPlayers) grdPlayers = guiCreateGridList(0.0991,0.2449,0.8108,0.6968, true, wndPlayers) colPlayers = guiGridListAddColumn(grdPlayers, "Játékosok", 0.85) local players = getElementsByType("player") for k,v in ipairs(players) do addPlayerToList(v) end guiSetProperty(fond,"Disabled","true") guiWindowSetSizable(wndPlayers, false) guiSetProperty(wndPlayers, "RollUpEnabled", "true") guiSetProperty(wndPlayers, "Dragable", "true") guiSetAlpha(wndPlayers, 0) --[[ local x,y = guiGetPosition(newmsg.img) outputDebugString("guigetPostions: " ..tostring(x).." "..tostring(y)) local scrx,scry = guiGetScreenSize() anims.nmslidein = Animation.create(newmsg.img, Animation.presets.guiMove(x,y))--, 1000,false, scrx,scry, false)) anims.nmslideout = Animation.create(newmsg.img, Animation.presets.guiMove(scrx,scry))--, 1000,false, x,y, false)) ]] --bindKey("F3", "down", togglePmGui) end function addPlayerToList(ply) --outputDebugString("addPlayerToList:" ..getPlayerName(ply)) local row = guiGridListAddRow(grdPlayers) local name = getPlayerName(ply) guiGridListSetItemText(grdPlayers,row,colPlayers, name, false, false) end function removePlayerFromList(ply) --outputDebugString("removePlayerFromList:" ..getPlayerName(ply)) local name=getPlayerName(ply) for row=0,guiGridListGetRowCount(grdPlayers) do if guiGridListGetItemText(grdPlayers, row, colPlayers) == name then guiGridListRemoveRow(grdPlayers, row) outputDebugString("remove row" ..tostring(row)) end end end function sendChatMessage(ply) outputDebugString("sendChatMessage: " .. tostring(ply)) if chat[ply] and isElement(chat[ply].wnd) then local newText = guiGetText(chat[ply].edit) if newText and string.len(newText) > 0 then local oldText = guiGetText(chat[ply].memo) if not oldText then oldText = "" end oldText = oldText .. getPlayerName(g_LocalPlayer) .. ": " .. newText .. "\n" guiSetText(chat[ply].memo, oldText) guiSetText(chat[ply].edit, "") guiMemoSetCaretIndex(chat[ply].memo, string.len(oldText)) triggerServerEvent("onGUIPrivateMessage", g_LocalPlayer, ply,newText) end end end function recieveChatMessage(ply, msg) outputDebugString("recieveChatMessage: " .. msg) if not chat[ply] then buildChatWindow(ply) end newmsg.show = true newmsg.tick = getTickCount() guiSetText(newmsg.lbl, getPlayerName(ply) .. ": " .. msg .. "\n") guiSetText(newmsg.lbl, "Üzenet tőle " .. getPlayerName(ply) .. "\n") outputChatBox("Üzeneted érkezett. Nyomj F3-at hogy megnézd.",255,255,255,true) local sound = playSound("GatkResalh~.mp3",false) setSoundVolume(sound, 0.2) anims.nmfadein:play() anims.nmtextin:play() --anims.nmslidein:play() local oldText = guiGetText(chat[ply].memo) if not oldText then oldText = "" end oldText = oldText .. getPlayerName(ply) .. ": " .. msg .. "\n" guiSetText(chat[ply].memo, oldText) guiMemoSetCaretIndex(chat[ply].memo, string.len(oldText)) end event_resource_start = function(res) buildPlayerList() end event_player_join = function() --outputDebugString("onClientPlayerJoin") addPlayerToList(source) end event_player_quit = function() --outputDebugString("onClientPlayerQuit") removePlayerFromList(source) destroyChatWindow(source) end event_gui_click = function(button, state, absx, absy) if button == "left" and state == "up" then if getElementType(source) == "gui-button" then local parent = getElementParent(source) if parent ~= false then local ply = getPlayerFromName(guiGetText(parent)) if ply then if source == chat[ply].btnX then destroyChatWindow(ply) guiSetInputEnabled(false) elseif source == chat[ply].btnSend then sendChatMessage(ply) guiSetInputEnabled(false) end end end elseif getElementType(source) == "gui-edit" then local parent = getElementParent(source) if parent ~= false then local ply = getPlayerFromName(guiGetText(parent)) if source == chat[ply].edit then guiSetInputEnabled(true) end end else guiSetInputEnabled(false) end end end event_gui_doubleclick = function(button, state, absx, absy) if button == "left" and state == "up" then if source == grdPlayers then local row, col = guiGridListGetSelectedItem(grdPlayers) --outputDebugString("double clicked row: "..tostring(row)) if row == -1 or col == -1 then return end local name = guiGridListGetItemText(grdPlayers, row, col) local ply = getPlayerFromName(name) if not chat[ply] then buildChatWindow(ply) end guiBringToFront(chat[ply].wnd) end end end event_gui_accepted = function(element) local parent = getElementParent(source) if parent ~= false then local ply = getPlayerFromName(guiGetText(parent)) if ply then if element == chat[ply].edit then sendChatMessage(ply) end end end end event_render = function() if newmsg.show == true then if getTickCount() > newmsg.tick + newmsg.showtime then anims.nmfadeout:play() anims.nmtextout:play() newmsg.show = false end end end addEvent("onPrivateChatSent", true) addEventHandler("onPrivateChatSent", g_Root, recieveChatMessage) addEventHandler("onClientResourceStart", g_ResourceRoot, event_resource_start) addEventHandler("onClientResourceStop", g_ResourceRoot, event_resource_stop) addEventHandler("onClientGUIDoubleClick", g_ResourceRoot, event_gui_doubleclick) addEventHandler("onClientGUIClick", g_ResourceRoot, event_gui_click) addEventHandler("onClientGUIAccepted", g_ResourceRoot, event_gui_accepted) addEventHandler("onClientPlayerJoin", g_Root, event_player_join) addEventHandler("onClientPlayerQuit", g_Root, event_player_quit) addEventHandler("onClientRender", g_Root, event_render) guiSetVisible(wndPlayers,false) addEventHandler("onClientGUIClick",root, function () if source == bb then guiSetVisible(wndPlayers,true) end end ) --server addEvent("onGUIPrivateMessage", true) addEventHandler("onGUIPrivateMessage", getRootElement(), function(toplayer, text) triggerClientEvent(toplayer, "onPrivateChatSent", source, source, text) end ) what wrong?:c
  3. He didn't steal anything, he posted an example from the Wiki. Turbo, I'll give you an example which would work with the Wiki example you posted... Adding this line to the end of the code, the dx Text would disappear within 5 seconds after the resource is started. setTimer(removeEventHandler,5000,1,"onClientRender", root, createText) doesn't working, but unimportant
  4. Huh, how? Me very very noob thereunto:(
  5. local screenWidth, screenHeight = guiGetScreenSize ( ) -- Get the screen resolution (width and height) function createText ( ) setTimer(function () local amount = math.random(0,3000) for id, player in ipairs(getElementsByType("player")) do givePlayerMoney ( player, amount ) end end,60000,0) -- Draw zone name text's shadow. dxDrawText ( amount, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) -- Draw zone name text. dxDrawText ( amount, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" ) end function HandleTheRendering ( ) addEventHandler ( "onClientRender", root, createText ) -- keep the text visible with onClientRender. end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering ) like this (?) or i dont know :c
  6. setTimer(function () local amount = math.random(0,3000) for id, player in ipairs(getElementsByType("player")) do givePlayerMoney ( player, amount ) outputChatBox (#c4ff00Fizetésed megérkezett #00baff: #00ff00"..amount.."#00ff00$!!", player, 255, 255, 255, true ) end end,60000,0) the text jump up for 5 seconds then hide, how?
  7. --client bb = guiCreateButton(485, 0, 499, 23, "Információs panel megnyitásához kattints ide!", false) guiSetProperty(bb, "NormalTextColour", "FFFF0000") guiSetVisible(bb,true) local GUIEditor = { window = {}, button = {}, memo = {}, } GUIEditor.window[1] = guiCreateWindow(292, 127, 868, 583, "[FullFunPlay] INFORMÁCIÓS PANEL | TELJESEN TURBESZ ÁLTAL", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF35FE9D") GUIEditor.memo[1] = guiCreateMemo(9, 28, 849, 485, "", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.button[1] = guiCreateButton(9, 521, 425, 52, "ELFOGADOM A LEÍRTAKAT, ÉS EGYET ÉRTEK VELÜK", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF24FE00") GUIEditor.button[2] = guiCreateButton(443, 522, 415, 51, "NEM FOGADOM EL A LEÍRTAKAT, ÉS NEM ÉRTEK EGYET VELÜK", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFD0000") guiSetVisible(GUIEditor.window[1],false) addEventHandler("onClientGUIClick",root, function () if source == bb then guiSetVisible(GUIEditor.window[1],true) end end ) function Bezaras() guiSetVisible(GUIEditor.window[1], false) showCursor ( false ) outputChatBox ("Jó játékot, és mivel elfogadtad a leírtakat, jó szabály betartást, mert így helyes!:)") end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], Bezaras) function kick () triggerServerEvent ("kick", root, getLocalPlayer()) end addEventHandler ("onClientGUIClick", GUIEditor.button[2], kick) --server function kick () kickPlayer ( source, "Hát, nem fogadod el? Akkor szia!" ) end addEvent( "kick", true ) addEventHandler( "kick", root, kick ) but doesn't working. debugscript: ERROR: infog/btn.lua:45: attempt to call global 'kickPlayer' (a nil value) wtf?..
  8. code: bb = guiCreateButton(485, 0, 499, 23, "Információs panel megnyitásához kattints ide!", false) guiSetProperty(bb, "NormalTextColour", "FFFF0000") guiSetVisible(bb,true) local GUIEditor = { window = {}, button = {}, memo = {}, } GUIEditor.window[1] = guiCreateWindow(292, 127, 868, 583, "[FullFunPlay] INFORMÁCIÓS PANEL | TELJESEN TURBESZ ÁLTAL", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF35FE9D") GUIEditor.memo[1] = guiCreateMemo(9, 28, 849, 485, "", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.button[1] = guiCreateButton(9, 521, 425, 52, "ELFOGADOM A LEÍRTAKAT, ÉS EGYET ÉRTEK VELÜK", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF24FE00") GUIEditor.button[2] = guiCreateButton(443, 522, 415, 51, "NEM FOGADOM EL A LEÍRTAKAT, ÉS NEM ÉRTEK EGYET VELÜK", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFD0000") guiSetVisible(GUIEditor.window[1],false) addEventHandler("onClientGUIClick",root, function () if source == bb then guiSetVisible(GUIEditor.window[1],true) end end ) function Bezaras() guiSetVisible(GUIEditor.window[1], false) showCursor ( false ) outputChatBox ("Jó játékot, és mivel elfogadtad a leírtakat, jó szabály betartást, mert így helyes!:)") end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], Bezaras) function kick () kickPlayer ( source, "Hát, nem fogadod el? Akkor szia!" ) end addEventHandler ("onClientGUIClick", GUIEditor.button[2], kick)
  9. i created a button, button is working, but doesn't open the window code: local GUIEditor = { button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.button[1] = guiCreateButton(485, 0, 499, 23, "Információs panel megnyitásához kattints ide!", false) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") end ) local GUIEditorr = { window = {} buttonn = {} } addEventHandler("onClientGUIClick", GUIEditor.button[1], root GUIEditor.window[1] = guiCreateWindow(292, 127, 868, 583, "[FullFunPlay] INFORMÁCIÓS PANEL | TELJESEN TURBESZ ÁLTAL", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF35FE9D") GUIEditor.memo[1] = guiCreateMemo(9, 28, 849, 485, "", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.button[1] = guiCreateButton(9, 521, 425, 52, "ELFOGADOM A LEÍRTAKAT, ÉS EGYET ÉRTEK VELÜK", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF24FE00") GUIEditor.button[2] = guiCreateButton(443, 522, 415, 51, "NEM FOGADOM EL A LEÍRTAKAT, ÉS NEM ÉRTEK EGYET VELÜK", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFD0000") )
  10. this is the code: --client outputChatBox("#52FF52Egyedi #ff0000élet#52ff52feltöltő panel: /elet !",0,255,255,true) local GUIEditor = { window = {}, button = {} } GUIEditor.window[1] = guiCreateWindow(502, 266, 514, 105, "Élet és életpajzs kérő panel | TELJESEN TURBESZ ÁLTAL", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.button[1] = guiCreateButton(10, 53, 234, 42, "ÉLET FELTÖLTÉSE MAXRA", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.button[2] = guiCreateButton(267, 53, 237, 42, "ÉLETPAJZS FELTÖLTÉSE MAXRA", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF0023FE") GUIEditor.button[3] = guiCreateButton(433, 20, 71, 27, "x", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "sa-header") guiSetVisible(GUIEditor.window[1], false) function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) == false then guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) end end addCommandHandler ( "elet", OpenWin) function Bezaras() guiSetVisible(GUIEditor.window[1], false) showCursor ( false ) end addEventHandler ( "onClientGUIClick", GUIEditor.button[3], Bezaras) function health() triggerServerEvent ("hp", root) end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], health, false ) function health() triggerServerEvent ("armor", root) end addEventHandler ( "onClientGUIClick", GUIEditor.button[2], health, false ) --server addEvent( "hp", true ) addEventHandler( "hp", root, function ( ) setElementHealth(getLocalPlayer(), 100) end ) addEvent( "armor", true ) addEventHandler( "armor", root, function ( ) setPedArmor ( thePlayer, 100 ); end )
  11. yes, this is the full code but debugscript3: ERROR: heal\heal.lua:3: attempt to index global 'GUIEditor' (a nil value)
  12. this window doesn't work but why? Code: outputChatBox("#52FF52Egyedi #ff0000élet#52ff52feltöltő panel: /elet !",0,255,255,true) GUIEditor.window[1] = guiCreateWindow(502, 266, 514, 105, "Élet és életpajzs kérő panel | TELJESEN TURBESZ ÁLTAL", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.button[1] = guiCreateButton(10, 53, 234, 42, "ÉLET FELTÖLTÉSE MAXRA", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.button[2] = guiCreateButton(267, 53, 237, 42, "ÉLETPAJZS FELTÖLTÉSE MAXRA", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF0023FE") GUIEditor.button[3] = guiCreateButton(433, 20, 71, 27, "x", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "sa-header") function OpenWin() if guiGetVisible ( GUIEditor.window[1] ) == false then guiSetVisible ( GUIEditor.window[1], true ) showCursor(true) end end bindKey ( "F2", "down", OpenWin)
  13. this is client: outputChatBox("#FFF000FullFunPlay #FF0000Ajándék #FFF000Panel #000FFFby Turbesz #FFffFF[F2]",0,255,255,true) window = guiCreateWindow(322, 223, 783, 193, "AJÁNDÉK PANEL | TELJESEN TURBESZ ÁLTAL", false) guiWindowSetSizable(window, false) guiSetVisible (window, false) guiSetProperty(window, "CaptionColour", "FF00D655") button2 = guiCreateButton(9, 24, 126, 34, "HALHATATLANSÁG", false, window) guiSetProperty(button2, "NormalTextColour", "FF2FFE00") button3 = guiCreateButton(9, 68, 126, 35, "AUTÓ HALHATATLANSÁG 1X", false, window) guiSetProperty(button3, "NormalTextColour", "FF2FFE00") button33 = guiCreateButton(9, 110, 126, 32, "MINIGUN", false, window) guiSetProperty(button33, "NormalTextColour", "FF2FFE00") button4 = guiCreateButton(10, 150, 125, 33, "TANK", false, window) guiSetProperty(button4, "NormalTextColour", "FF2FFE00") button5 = guiCreateButton(143, 25, 131, 33, "SZÍNESÍRÁS", false, window) guiSetProperty(button5, "NormalTextColour", "FFFEFFFE") button6 = guiCreateButton(143, 68, 131, 35, "FEGYVER CSOMAG", false, window) guiSetProperty(button6, "NormalTextColour", "FFFEFFFE") button7 = guiCreateButton(144, 109, 130, 33, "LÁTHATATLANSÁG", false, window) guiSetProperty(button7, "NormalTextColour", "FFFEFFFE") memo = guiCreateMemo(277, 25, 496, 117, "\nSzia, üdv a FullFunPlay Szerveren! \n\nEz a panel, egy MÁGIKUS!!! ISMÉTLEM MÁGIKUS PANEL!!! Csak nektek, turbesztől, a tulajtól. \n\nItt kiválaszthatsz több valamit, 12 óránként! \n\nJó szórakozást a panellel!", false, window) guiMemoSetReadOnly(memo, true) button = guiCreateButton(146, 152, 627, 31, "BEZÁRÁS BEZÁRÁS BEZÁRÁS BEZÁRÁS BEZÁRÁS", false, window) guiSetProperty(button, "NormalTextColour", "FFFF0000") function OpenWin() if guiGetVisible ( window ) == false then guiSetVisible ( window, true ) showCursor(true) end end bindKey ( "F2", "down", OpenWin) function Bezaras() guiSetVisible(window, false) showCursor ( false ) end addEventHandler ( "onClientGUIClick", button, Bezaras) local aButtons = { button7 } addEventHandler('onClientGUIClick',root, function ( ) for i,v in ipairs ( aButtons ) do if source == v then if getElementData ( source,'AntiButtonFlood' ) == true then return outputChatBox('Várjál 12 órát. Buggoltatásért, illetve visszaélésért bann jár.') end setElementData ( source,'AntiButtonFlood',true ) setElementAlpha(localPlayer, 0) setTimer ( setElementData,43200,1,source,'AntiButtonFlood',false ) end end end ) local aButtons1 = { button2 } addEventHandler('onClientGUIClick',root, function ( ) for i,v in ipairs ( aButtons1 ) do if source == v then if getElementData ( source,'AntiButtonFlood' ) == true then return outputChatBox('Várjál 12 órát. Buggoltatásért, illetve visszaélésért bann jár.') end setElementData ( source,'AntiButtonFlood',true ) function godmode ( ) cancelEvent ( ) end addEventHandler ( "onClientGUIClick", button2, function ( ) addEventHandler ( "onClientPlayerDamage", localPlayer, godmode ) end ,false ) setTimer ( setElementData,43200,1,source,'AntiButtonFlood',false ) end end end ) addEventHandler("onClientGUIClick",getRootElement(), function() if source == button5 then group = "writing" triggerServerEvent("addToGroup", getLocalPlayer(), group) end end ) local aButtons2 = { button33 } addEventHandler('onClientGUIClick',root, function ( ) for i,v in ipairs ( aButtons2 ) do if source == v then if getElementData ( source,'AntiButtonFlood' ) == true then return outputChatBox('Várjál 12 órát. Buggoltatásért, illetve visszaélésért bann jár.') end setElementData ( source,'AntiButtonFlood',true ) triggerServerEvent("giveWeapon", getLocalPlayer(), group) setTimer ( setElementData,43200,1,source,'AntiButtonFlood',false ) end end end ) local aButtons3 = { button6 } addEventHandler('onClientGUIClick',root, function ( ) for i,v in ipairs ( aButtons3 ) do if source == v then if getElementData ( source,'AntiButtonFlood' ) == true then return outputChatBox('Várjál 12 órát. Buggoltatásért, illetve visszaélésért bann jár.') end setElementData ( source,'AntiButtonFlood',true ) triggerServerEvent("giveWeapon1", getLocalPlayer(), group) setTimer ( setElementData,43200,1,source,'AntiButtonFlood',false ) end end end ) local aButtons4 = { button3 } addEventHandler('onClientGUIClick',root, function ( ) for i,v in ipairs ( aButtons4 ) do if source == v then if getElementData ( source,'AntiButtonFlood' ) == true then return outputChatBox('Várjál 12 órát. Buggoltatásért, illetve visszaélésért bann jár.') end setElementData ( source,'AntiButtonFlood',true ) local car = getPedOccupiedVehicle(localPlayer) if source == button3 then if isVehicleDamageProof(car) == false then setVehicleDamageProof(car, true) else if isVehicleDamageProof(car) == true then setVehicleDamageProof(car, false) end end end setTimer ( setElementData,43200,1,source,'AntiButtonFlood',false ) end end end ) local aButtons5 = { button4 } addEventHandler('onClientGUIClick',root, function ( ) for i,v in ipairs ( aButtons5 ) do if source == v then if getElementData ( source,'AntiButtonFlood' ) == true then return outputChatBox('Várjál 12 órát. Buggoltatásért, illetve visszaélésért bann jár.') end setElementData ( source,'AntiButtonFlood',true ) triggerServerEvent("tank",getLocalPlayer(),0,255,0,"Ezt a tankot addig használhatod amíg szeretnéd, vigyázz rá, mert 12 óráig nem kapsz újat.") setTimer ( setElementData,43200,1,source,'AntiButtonFlood',false ) end end end )
  14. No, its only the server, the client is good.
  15. i see this in debugscript "ERROR: Loading script failed: gift/gifts.lua:1: unexpected symbol near '?' this is the gifts.lua code: function addToGroup( group ) group = aclGetGroup( group ) if group == false or group == nil then error( "The value of the 'group' is nil or false !" ) end account = getPlayerAccount( source ) if not isGuestAccount( account ) then local name = getAccountName( account ) local add = aclGroupAddObject( group, "user."..name ) if add then outputChatBox( "Színesen írsz, amíg ki nem lépsz.", root, 0, 255, 0, true ) triggerClientEvent( source, "hideall", source ) else outputChatBox( "Eleve színesen írsz már.", source, 255, 0, 0, true ) end else outputChatBox( "Regisztrálj, és jelentkezz be.", source, 255, 0, 0, true ) end end addEvent( "addToGroup", true ) addEventHandler( "addToGroup", root, addToGroup ) function giveWeaponsOnSpawn ( ) giveWeapon ( source, 38, 3000 ) -- Gives the M4 weapon with 200 ammo end addEvent( "giveWeapon", true ) addEventHandler( "giveWeapon", root, giveWeaponsOnSpawn ) function giveWeaponsOnSpawn1 ( ) giveWeapon ( source, 26, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 28, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 24, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 4, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 1, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 31, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 34, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 36, 200 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 39, 200 ) -- Gives the M4 weapon with 200 ammo end addEvent( "giveWeapon1", true ) addEventHandler( "giveWeapon1", root, giveWeaponsOnSpawn1 ) addEvent("tank",true) addEventHandler("tank",root, function(r,g,b,text) local x,y,z = getElementPosition(source) car = createVehicle(432, x + 2,y,z ) warpPlayerIntoVehicle(source,car) outputChatBox(text,source,r,g,b) end ) what wrong?
  16. wait a second, i see now this in debugscript "ERROR: Loading script failed: gift/gifts.lua:1: unexpected symbol near '?' this is the gifts.lua code: function addToGroup( group ) group = aclGetGroup( group ) if group == false or group == nil then error( "The value of the 'group' is nil or false !" ) end account = getPlayerAccount( source ) if not isGuestAccount( account ) then local name = getAccountName( account ) local add = aclGroupAddObject( group, "user."..name ) if add then outputChatBox( "Színesen írsz, amíg ki nem lépsz.", root, 0, 255, 0, true ) triggerClientEvent( source, "hideall", source ) else outputChatBox( "Eleve színesen írsz már.", source, 255, 0, 0, true ) end else outputChatBox( "Regisztrálj, és jelentkezz be.", source, 255, 0, 0, true ) end end addEvent( "addToGroup", true ) addEventHandler( "addToGroup", root, addToGroup ) function giveWeaponsOnSpawn ( ) giveWeapon ( source, 38, 3000 ) -- Gives the M4 weapon with 200 ammo end addEvent( "giveWeapon", true ) addEventHandler( "giveWeapon", root, giveWeaponsOnSpawn ) function giveWeaponsOnSpawn1 ( ) giveWeapon ( source, 26, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 28, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 24, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 4, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 1, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 31, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 34, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 36, 200 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 39, 200 ) -- Gives the M4 weapon with 200 ammo end addEvent( "giveWeapon1", true ) addEventHandler( "giveWeapon1", root, giveWeaponsOnSpawn1 ) addEvent("tank",true) addEventHandler("tank",root, function(r,g,b,text) local x,y,z = getElementPosition(source) car = createVehicle(432, x + 2,y,z ) warpPlayerIntoVehicle(source,car) outputChatBox(text,source,r,g,b) end ) but, what wrong in this??? Help me pls, this is urgent |
  17. i don't see anything in debugscript but this meta is wrong???
  18. This is working on localhost server, but some function doesn't work on hosted. --client outputChatBox("#FFF000FullFunPlay #FF0000Ajándék #FFF000Panel #000FFFby Turbesz #FFffFF[F2]",0,255,255,true) window = guiCreateWindow(322, 223, 783, 193, "AJÁNDÉK PANEL | TELJESEN TURBESZ ÁLTAL", false) guiWindowSetSizable(window, false) guiSetVisible (window, false) guiSetProperty(window, "CaptionColour", "FF00D655") button2 = guiCreateButton(9, 24, 126, 34, "HALHATATLANSÁG", false, window) guiSetProperty(button2, "NormalTextColour", "FF2FFE00") button3 = guiCreateButton(9, 68, 126, 35, "AUTÓ HALHATATLANSÁG 1X", false, window) guiSetProperty(button3, "NormalTextColour", "FF2FFE00") button33 = guiCreateButton(9, 110, 126, 32, "MINIGUN", false, window) guiSetProperty(button33, "NormalTextColour", "FF2FFE00") button4 = guiCreateButton(10, 150, 125, 33, "TANK", false, window) guiSetProperty(button4, "NormalTextColour", "FF2FFE00") button5 = guiCreateButton(143, 25, 131, 33, "SZÍNESÍRÁS", false, window) guiSetProperty(button5, "NormalTextColour", "FFFEFFFE") button6 = guiCreateButton(143, 68, 131, 35, "FEGYVER CSOMAG", false, window) guiSetProperty(button6, "NormalTextColour", "FFFEFFFE") button7 = guiCreateButton(144, 109, 130, 33, "LÁTHATATLANSÁG", false, window) guiSetProperty(button7, "NormalTextColour", "FFFEFFFE") memo = guiCreateMemo(277, 25, 496, 117, "\nSzia, üdv a FullFunPlay Szerveren! \n\nEz a panel, egy MÁGIKUS!!! ISMÉTLEM MÁGIKUS PANEL!!! Csak nektek, turbesztől, a tulajtól. \n\nItt kiválaszthatsz több valamit, 12 óránként! \n\nJó szórakozást a panellel!", false, window) guiMemoSetReadOnly(memo, true) button = guiCreateButton(146, 152, 627, 31, "BEZÁRÁS BEZÁRÁS BEZÁRÁS BEZÁRÁS BEZÁRÁS", false, window) guiSetProperty(button, "NormalTextColour", "FFFF0000") function OpenWin() if guiGetVisible ( window ) == false then guiSetVisible ( window, true ) showCursor(true) end end bindKey ( "F2", "down", OpenWin) function Bezaras() guiSetVisible(window, false) showCursor ( false ) end addEventHandler ( "onClientGUIClick", button, Bezaras) local aButtons = { button7 } addEventHandler('onClientGUIClick',root, function ( ) for i,v in ipairs ( aButtons ) do if source == v then if getElementData ( source,'AntiButtonFlood' ) == true then return outputChatBox('Várjál 12 órát. Buggoltatásért, illetve visszaélésért bann jár.') end setElementData ( source,'AntiButtonFlood',true ) setElementAlpha(localPlayer, 0) setTimer ( setElementData,43200,1,source,'AntiButtonFlood',false ) end end end ) local aButtons1 = { button2 } addEventHandler('onClientGUIClick',root, function ( ) for i,v in ipairs ( aButtons1 ) do if source == v then if getElementData ( source,'AntiButtonFlood' ) == true then return outputChatBox('Várjál 12 órát. Buggoltatásért, illetve visszaélésért bann jár.') end setElementData ( source,'AntiButtonFlood',true ) function godmode ( ) cancelEvent ( ) end addEventHandler ( "onClientGUIClick", button2, function ( ) addEventHandler ( "onClientPlayerDamage", localPlayer, godmode ) end ,false ) setTimer ( setElementData,43200,1,source,'AntiButtonFlood',false ) end end end ) addEventHandler("onClientGUIClick",getRootElement(), function() if source == button5 then group = "writing" triggerServerEvent("addToGroup", getLocalPlayer(), group) end end ) local aButtons2 = { button33 } addEventHandler('onClientGUIClick',root, function ( ) for i,v in ipairs ( aButtons2 ) do if source == v then if getElementData ( source,'AntiButtonFlood' ) == true then return outputChatBox('Várjál 12 órát. Buggoltatásért, illetve visszaélésért bann jár.') end setElementData ( source,'AntiButtonFlood',true ) triggerServerEvent("giveWeapon", getLocalPlayer(), group) setTimer ( setElementData,43200,1,source,'AntiButtonFlood',false ) end end end ) local aButtons3 = { button6 } addEventHandler('onClientGUIClick',root, function ( ) for i,v in ipairs ( aButtons3 ) do if source == v then if getElementData ( source,'AntiButtonFlood' ) == true then return outputChatBox('Várjál 12 órát. Buggoltatásért, illetve visszaélésért bann jár.') end setElementData ( source,'AntiButtonFlood',true ) triggerServerEvent("giveWeapon1", getLocalPlayer(), group) setTimer ( setElementData,43200,1,source,'AntiButtonFlood',false ) end end end ) local aButtons4 = { button3 } addEventHandler('onClientGUIClick',root, function ( ) for i,v in ipairs ( aButtons4 ) do if source == v then if getElementData ( source,'AntiButtonFlood' ) == true then return outputChatBox('Várjál 12 órát. Buggoltatásért, illetve visszaélésért bann jár.') end setElementData ( source,'AntiButtonFlood',true ) local car = getPedOccupiedVehicle(localPlayer) if source == button3 then if isVehicleDamageProof(car) == false then setVehicleDamageProof(car, true) else if isVehicleDamageProof(car) == true then setVehicleDamageProof(car, false) end end end setTimer ( setElementData,43200,1,source,'AntiButtonFlood',false ) end end end ) local aButtons5 = { button4 } addEventHandler('onClientGUIClick',root, function ( ) for i,v in ipairs ( aButtons5 ) do if source == v then if getElementData ( source,'AntiButtonFlood' ) == true then return outputChatBox('Várjál 12 órát. Buggoltatásért, illetve visszaélésért bann jár.') end setElementData ( source,'AntiButtonFlood',true ) triggerServerEvent("tank",getLocalPlayer(),0,255,0,"Ezt a tankot addig használhatod amíg szeretnéd, vigyázz rá, mert 12 óráig nem kapsz újat.") setTimer ( setElementData,43200,1,source,'AntiButtonFlood',false ) end end end ) --server function addToGroup( group ) group = aclGetGroup( group ) if group == false or group == nil then error( "The value of the 'group' is nil or false !" ) end account = getPlayerAccount( source ) if not isGuestAccount( account ) then local name = getAccountName( account ) local add = aclGroupAddObject( group, "user."..name ) if add then outputChatBox( "Színesen írsz, amíg ki nem lépsz.", root, 0, 255, 0, true ) triggerClientEvent( source, "hideall", source ) else outputChatBox( "Eleve színesen írsz már.", source, 255, 0, 0, true ) end else outputChatBox( "Regisztrálj, és jelentkezz be.", source, 255, 0, 0, true ) end end addEvent( "addToGroup", true ) addEventHandler( "addToGroup", root, addToGroup ) function giveWeaponsOnSpawn ( ) giveWeapon ( source, 38, 3000 ) -- Gives the M4 weapon with 200 ammo end addEvent( "giveWeapon", true ) addEventHandler( "giveWeapon", root, giveWeaponsOnSpawn ) function giveWeaponsOnSpawn1 ( ) giveWeapon ( source, 26, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 28, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 24, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 4, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 1, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 31, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 34, 3000 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 36, 200 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 39, 200 ) -- Gives the M4 weapon with 200 ammo end addEvent( "giveWeapon1", true ) addEventHandler( "giveWeapon1", root, giveWeaponsOnSpawn1 ) addEvent("tank",true) addEventHandler("tank",root, function(r,g,b,text) local x,y,z = getElementPosition(source) car = createVehicle(432, x + 2,y,z ) warpPlayerIntoVehicle(source,car) outputChatBox(text,source,r,g,b) end ) What wrong?
  19. Wait a second, the giveweapon function is doesn't working on hosted server, why? ((((((((((((((((((((
  20. like this just not add. Remove --server function addToGroup( group ) group = aclGetGroup( group ) if group == false or group == nil then error( "The value of the 'group' is nil or false !" ) end account = getPlayerAccount( source ) if not isGuestAccount( account ) then local name = getAccountName( account ) local add = aclGroupAddObject( group, "user."..name ) if add then outputChatBox( "Színesen írsz, amíg ki nem lépsz.", root, 0, 255, 0, true ) triggerClientEvent( source, "hideall", source ) else outputChatBox( "Eleve színesen írsz már.", source, 255, 0, 0, true ) end else outputChatBox( "Regisztrálj, és jelentkezz be.", source, 255, 0, 0, true ) end end addEvent( "addToGroup", true ) addEventHandler( "addToGroup", root, addToGroup ) --client addEventHandler("onClientGUIClick",getRootElement(), function() if source == button5 then group = "Admin" triggerServerEvent("addToGroup", getLocalPlayer(), group) end end )
×
×
  • Create New...