Jump to content

Search the Community

Showing results for tags 'panel'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Member Title


Gang


Location


Occupation


Interests

  1. Advanced mute system by ozy * THIS SCRIPT HAS FEATURES FOR - Mute a player for minutes or hours without using milliseconds - All data is saving to database - Press "O" to reach mute panel for better usage (only opens for players who has 'command.mute' right) - You want to mute a guy but oh shoot! he is gone before you muted him. Dont worry if you have his serial you can mute him by his serial via 'Mute Serial' on mute panel. - You can see the muted players and their remaining time, account name, serial, muted date, reason and admin name - You can mute a player on mute panel * COMMANDS - To mute a player: /amute player 1m (for 1 min or use 1h instead for 1 hours) reason - To unmute a player: /aunmute player - To see your remaining mute time if you are muted: /muteinfo * INSTALLATION - This script using dgs so you also need to download dgs and drop it into your resources folder. Download dgs here: https://wiki.multitheftauto.com/wiki/Resource:DGS - Extract files (dgs & advanced_mute_system) into your resources folder and start advanced_mute_system, system is working with dgs so don't forget to start dgs. Enjoy! - Don't forget to give admin rights to script. (Go to admin panel > resources > manage acl > on groups: double click on Admin and click Add Object enter 'resource.advanced_mute_system' press Ok and that's it) * BUGS - I test it as much as i can and look for bugs but I couldn't test it with players so there might be some bugs. - If there is any bugs please contact me via discord: papazlloyd or send an email to my forum account --------------------------------------------------- * FOR DEVELOPERS - First of all, I want you to know i made this script because there are no any mute system (properly working) on internet so there you are enjoy. - I know codes are a little bit messy and hard to understand but in future updates I'll try to make it more understandable for you. ----------------------------------------------------- Download script here: https://community.multitheftauto.com/index.php?p=resources&s=details&id=18896
  2. DINGO_FF

    help?

    i made a login panel and every think works but how can i make an intro like photo with music not a video when first register
  3. Banda me ayudan mis amigos no pueden crear una cuenta con el panel login algunos me dicen que le dé permisos pero Noce como
  4. tengo una duda he creado este panel para cambiar de team es decir que yo le cambie el team a un jugador pero cuando le doy "CONTRATAR" me cambia el team a mi que hago? Client function empre() local screenW, screenH = guiGetScreenSize() contrataciones = guiCreateWindow((screenW - 628) / 2, (screenH - 430) / 2, 628, 430, "NOMBRE DE LA EMPRESA", false) guiSetProperty(contrataciones, "CaptionColour", "FF0036FE") jugador = guiCreateGridList(44, 43, 233, 338, false, contrataciones) guiGridListAddColumn(jugador, "Jugadores", 0.9) for _, player in ipairs(getElementsByType("player")) do guiGridListAddRow(jugador, getPlayerName(player)) end contrar = guiCreateButton(368, 107, 176, 43, "CONTRATAR", false, contrataciones) guiSetProperty(contrar, "NormalTextColour", "FF2FFD00") x = guiCreateButton(574, 33, 44, 42, "X", false, contrataciones) guiSetProperty(x, "NormalTextColour", "FFFC0000") despe = guiCreateButton(368, 251, 176, 43, "DESPEDIR", false, contrataciones) guiSetProperty(despe, "NormalTextColour", "FFFC0000") showCursor (true) end addEvent( "onEmpresa", true ) addEventHandler( "onEmpresa", localPlayer, empre ) addEventHandler('onClientGUIClick',root, function() if source == contrar then triggerServerEvent('setEmpresa',localPlayer) guiSetVisible(contrataciones,false) showCursor(false) end end) addEventHandler('onClientGUIClick',root, function() if source == despe then triggerServerEvent('setEmpresaNo',localPlayer) guiSetVisible(contrataciones,false) showCursor(false) end end) addEventHandler('onClientGUIClick',root, function() if source == x then guiSetVisible(contrataciones,false) showCursor(false) end end) Server empresa = createTeam("TEAM", 0, 255, 0) --team addEvent('setEmpresa',true) --contratar, addEventHandler('setEmpresa',root, function() local teamPlayer = getPlayerTeam ( source ) if teamPlayer then setPlayerTeam ( source, nil ) setPlayerTeam ( source, empresa ) else setPlayerTeam ( source, empresa ) end end) addEvent('setEmpresaNo',true) --despedir addEventHandler('setEmpresaNo',root, function() local playerTeam = getPlayerTeam( source ) if ( getTeamName( playerTeam ) == "TEAM" ) then --team setPlayerTeam ( source, nil ) end end) addCommandHandler ("empresa", --Comando, no confundir con teleport function ( playerSource ) account = getPlayerAccount(playerSource) accname = getAccountName(account) if( accname == "Juan_Camilo" ) then -- lo que esta dentro de las comillas es el nombre de la cuenta que tiene permitido usar el comando. triggerClientEvent ( playerSource, "onEmpresa", playerSource) end end )
  5. I made this: -- All other functions and GUI creation. -- [...] -- Created button called "fbumper". local function setFBumper() local theVeh7 = getPedOccupiedVehicle(localPlayer) if theVeh7 then setVehicleComponentVisible(theVeh7, "bump_front_dummy", false) end end addEventHandler("onClientGUIClick", fbumper, setFBumper, false) -- Everything else... It works. Then I wanted to have the button switch between true to false when clicked. Something like: local function setFBumper() local theVeh7 = getPedOccupiedVehicle(localPlayer) if theVeh7 then setVehicleComponentVisible(theVeh7, "bump_front_dummy", false) elseif getVehicleComponentVisible(theVeh7) == "false" then setVehicleComponentVisible(theVeh7, "bump_front_dummy", true) end end addEventHandler("onClientGUIClick", fbumper, setFBumper, false) guiSetVisible (vehmod, false) It doesn't work correctly. It sets it invisible, but it doesn't return the state to visible. I also thought about using the setVehicleComponentVisible (not setVehicleComponentVisible) to make it a little bit more compact. I'm using a setEngineState script to help myself, but I don't know how to use it with these arguments. DB 3 throws nothing. What am I doing wrong?
  6. Hello, everybody! I'm following this tutorial to make a GUI with a car spawning function. Copy/pasting everything works up until the gridlist. The click doesn't. Could there be a mistake? I recreated the script on my own following step by step: - Client-side - And here is the problematic part: The GUI elements are the same. The only thing that changes are the names. Naturally, it should work by simply replacing the names. However, I believe there might be a mistake on the original script. With everything as it is, I can show and hide the GUI, and click on any vehicle. If I purposely trigger an output, nothing happens. So, waddaya think?
  7. Today, I was testing my policeman job (that I will surely post) on my server, because I wanted to know, if other players (not from one XML file) can access to be policemans. Suddenly, I saw, that on other nickname, I can open F1 panel. So what can I do? Thanks everybody for advance. Here is my part of acl.xml for proof, that only me and my friend are in Admin group: <acl> <group name="Everyone"> <acl name="Default"></acl> <object name="user.*"></object> <object name="resource.*"></object> </group> <group name="Moderator"> <acl name="Moderator"></acl> <object name="resource.mapcycler"></object> <object name="resource.mapmanager"></object> <object name="resource.resourcemanager"></object> <object name="resource.votemanager"></object> </group> <group name="SuperModerator"> <acl name="Moderator"></acl> <acl name="SuperModerator"></acl> </group> <group name="Admin"> <acl name="Moderator"></acl> <acl name="SuperModerator"></acl> <acl name="Admin"></acl> <acl name="RPC"></acl> <object name="resource.admin"></object> <object name="resource.webadmin"></object> <object name="resource.acpanel"></object> <object name="resource.modloader"></object> <object name="resource.loginpanel"></object> <object name="resource.bank"></object> <object name="resource.stats"></object> <object name="resource.vsys"></object> <object name="resource.cp"></object> <object name="resource.Serwer"></object> <object name="user.VaporZ"></object> <!--My nick--> <object name="user.maxeo11"></object> <!--My friend's nick--> <object name="resource.job3"></object> <object name="resource.cs"></object> </group> blah blah blah blah blah blah </acl>
  8. Hello these days i made a pretty beginner handling panel but unfortunately i got stuck as i can't load my handling.who can help please thx [Im noob :(] Script: local hand1 = "#1 Drift" local hand2 = "#2 Drift" local hand3 = "#3 Drift" local hand4 = "#4 Drift" local hand5 = "#5 Drift" local hand6 = "#6 Drift" local hand7 = "#7 Drift" local hand8 = "#8 Drift" local hand9 = "#9 Drift" local screenH, screenW = guiGetScreenSize() local x, y = (screenH/1366), (screenW/768) local Font = dxCreateFont("gfx/Roboto-Condensed.ttf", 13) ---<< Criando a fonte .. cor = {} function PainelDc() --1sor cor[1] = tocolor(0, 0, 0, 180) if isCursorOnElement(x*460, y*320, x*100, y*30) then cor[1] = tocolor(255, 109, 0, 240) end cor[2] = tocolor(0, 0, 0, 180) if isCursorOnElement(x*460, y*370, x*100, y*30) then cor[2] = tocolor(255, 109, 0, 240) end cor[3] = tocolor(0, 0, 0, 180) if isCursorOnElement(x*460, y*420, x*100, y*30) then cor[3] = tocolor(255, 109, 0, 240) end --2sor cor[4] = tocolor(0, 0, 0, 180) if isCursorOnElement(x*580, y*320, x*100, y*30) then cor[4] = tocolor(255, 109, 0, 240) end cor[5] = tocolor(0, 0, 0, 180) if isCursorOnElement(x*580, y*370, x*100, y*30) then cor[5] = tocolor(255, 109, 0, 240) end cor[6] = tocolor(0, 0, 0, 180) if isCursorOnElement(x*580, y*420, x*100, y*30) then cor[6] = tocolor(255, 109, 0, 240) end --3sor cor[7] = tocolor(0, 0, 0, 180) if isCursorOnElement(x*700, y*320, x*100, y*30) then cor[7] = tocolor(255, 109, 0, 240) end cor[8] = tocolor(0, 0, 0, 180) if isCursorOnElement(x*700, y*370, x*100, y*30) then cor[8] = tocolor(255, 109, 0, 240) end cor[9] = tocolor(0, 0, 0, 180) if isCursorOnElement(x*700, y*420, x*100, y*30) then cor[9] = tocolor(255, 109, 0, 240) end dxDrawRectangle(x*450, y*312, x*400, y*150, tocolor(0, 0, 0, 180), false) dxDrawRectangle(x*450, y*290, x*400, y*22, tocolor(255, 109, 0, 240), false) dxDrawText("M.D.SZ - Handling Panel", x*520, y*291, x*800, y*312, tocolor(255, 255, 255, 255), x*0.9, Font, "center", "center", false, false, false, false, false) dxDrawRectangle(x*460, y*320, x*100, y*30, cor[1], false)--gomb 1 dxDrawRectangle(x*460, y*370, x*100, y*30, cor[2], false)--gomb 2 dxDrawRectangle(x*460, y*420, x*100, y*30, cor[3], false)--gomb 3 dxDrawRectangle(x*580, y*320, x*100, y*30, cor[4], false)--gomb 2sor 4 dxDrawRectangle(x*580, y*370, x*100, y*30, cor[5], false)--gomb 2sor 5 dxDrawRectangle(x*580, y*420, x*100, y*30, cor[6], false)--gomb 2sor 6 dxDrawRectangle(x*700, y*320, x*100, y*30, cor[7], false)--gomb 3sor 7 dxDrawRectangle(x*700, y*370, x*100, y*30, cor[8], false)--gomb 3sor 8 dxDrawRectangle(x*700, y*420, x*100, y*30, cor[9], false)--gomb 3sor 9 dxDrawText("#1 Drift", x*200, y*358, x*820, y*312, tocolor(255, 255, 255, 255), x*1.00, Font, "center", "center", false, false, false, true, false)-- kiiras gombra 1 dxDrawText("#2 Drift", x*200, y*460, x*820, y*312, tocolor(255, 255, 255, 255), x*1.00, Font, "center", "center", false, false, false, true, false)-- kiiras gombra 2 dxDrawText("#3 Drift", x*200, y*560, x*820, y*312, tocolor(255, 255, 255, 255), x*1.00, Font, "center", "center", false, false, false, true, false)-- kiiras gombra 3 dxDrawText("#4 Drift", x*445, y*358, x*820, y*312, tocolor(255, 255, 255, 255), x*1.00, Font, "center", "center", false, false, false, true, false)-- kiiras gombra 2sor 1 dxDrawText("#5 Drift", x*445, y*460, x*820, y*312, tocolor(255, 255, 255, 255), x*1.00, Font, "center", "center", false, false, false, true, false)-- kiiras gombra 2sor 1 dxDrawText("#6 Drift", x*445, y*560, x*820, y*312, tocolor(255, 255, 255, 255), x*1.00, Font, "center", "center", false, false, false, true, false)-- kiiras gombra 2sor 1 dxDrawText("#7 Drift", x*690, y*358, x*820, y*312, tocolor(255, 255, 255, 255), x*1.00, Font, "center", "center", false, false, false, true, false)-- kiiras gombra 2sor 1 dxDrawText("#8 Drift", x*690, y*460, x*820, y*312, tocolor(255, 255, 255, 255), x*1.00, Font, "center", "center", false, false, false, true, false)-- kiiras gombra 2sor 1 dxDrawText("#9 Drift", x*690, y*560, x*820, y*312, tocolor(255, 255, 255, 255), x*1.00, Font, "center", "center", false, false, false, true, false)-- kiiras gombra 2sor 1 end Painelstt = false --<<<< Status do painel(PainelDc) function OpenPainel() --<<<<< Todo if significa == se for .. if Painelstt == false then --<<<< Verifica se o painel está fechado e logo após o abre e poe seu status como true(aberto) addEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = true showCursor(true) else --<<<< else(significa o contrario) se não for .. removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) end end addCommandHandler("hpan", OpenPainel) local handlings1 = "1300 2979.7 2 0 0.1 -0.8 70 0.6 0.66 0.66 5 150 25 10 4 p 5 0.66 false 75 0.85 0.15 0 0.15 -0.16 0.5 0 0.37 0 35000 A02800 730000C 1 1 0" --1 function onClientButtonClick(Button, State) if Painelstt == true and Button == "left" and State == "down" then if isCursorOnElement(x*460, y*320, x*100, y*30) then setVehicleHandling (element "429", string "property", "..handlings1..") outputChatBox("[#ff8f00Handling - Info#ffffff] #82f9fc"..hand1.." #ffffffHandling betöltve!", 255, 255, 255, true) removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) elseif isCursorOnElement(x*797, y*290, x*23, y*22) then removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) else end end end addEventHandler("onClientClick", getRootElement(), onClientButtonClick) --2 function onClientButtonClick(Button, State) if Painelstt == true and Button == "left" and State == "down" then if isCursorOnElement(x*460, y*370, x*100, y*30) then setClipboard(""..hand2.."") outputChatBox("[#ff8f00Handling - Info#ffffff] #82f9fc"..hand2.." #ffffffHandling betöltve!", 255, 255, 255, true) removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) elseif isCursorOnElement(x*797, y*290, x*23, y*22) then removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) else end end end addEventHandler("onClientClick", getRootElement(), onClientButtonClick) --3 function onClientButtonClick(Button, State) if Painelstt == true and Button == "left" and State == "down" then if isCursorOnElement(x*460, y*430, x*100, y*30) then setClipboard(""..hand2.."") outputChatBox("[#ff8f00Handling - Info#ffffff] #82f9fc"..hand3.." #ffffffHandling betöltve!", 255, 255, 255, true) removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) elseif isCursorOnElement(x*797, y*290, x*23, y*22) then removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) else end end end addEventHandler("onClientClick", getRootElement(), onClientButtonClick) --4 function onClientButtonClick(Button, State) if Painelstt == true and Button == "left" and State == "down" then if isCursorOnElement(x*580, y*320, x*100, y*30) then setClipboard(""..hand2.."") outputChatBox("[#ff8f00Handling - Info#ffffff] #82f9fc"..hand4.." #ffffffHandling betöltve!", 255, 255, 255, true) removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) elseif isCursorOnElement(x*797, y*290, x*23, y*22) then removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) else end end end addEventHandler("onClientClick", getRootElement(), onClientButtonClick) --5 function onClientButtonClick(Button, State) if Painelstt == true and Button == "left" and State == "down" then if isCursorOnElement(x*580, y*370, x*100, y*30) then setClipboard(""..hand2.."") outputChatBox("[#ff8f00Handling - Info#ffffff] #82f9fc"..hand5.." #ffffffHandling betöltve!", 255, 255, 255, true) removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) elseif isCursorOnElement(x*797, y*290, x*23, y*22) then removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) else end end end addEventHandler("onClientClick", getRootElement(), onClientButtonClick) --6 function onClientButtonClick(Button, State) if Painelstt == true and Button == "left" and State == "down" then if isCursorOnElement(x*580, y*420, x*100, y*30) then setClipboard(""..hand2.."") outputChatBox("[#ff8f00Handling - Info#ffffff] #82f9fc"..hand6.." #ffffffHandling betöltve!", 255, 255, 255, true) removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) elseif isCursorOnElement(x*797, y*290, x*23, y*22) then removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) else end end end addEventHandler("onClientClick", getRootElement(), onClientButtonClick) --7 function onClientButtonClick(Button, State) if Painelstt == true and Button == "left" and State == "down" then if isCursorOnElement(x*700, y*320, x*100, y*30) then setClipboard(""..hand2.."") outputChatBox("[#ff8f00Handling - Info#ffffff] #82f9fc"..hand7.." #ffffffHandling betöltve!", 255, 255, 255, true) removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) elseif isCursorOnElement(x*797, y*290, x*23, y*22) then removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) else end end end addEventHandler("onClientClick", getRootElement(), onClientButtonClick) --8 function onClientButtonClick(Button, State) if Painelstt == true and Button == "left" and State == "down" then if isCursorOnElement(x*700, y*370, x*100, y*30) then setClipboard(""..hand2.."") outputChatBox("[#ff8f00Handling - Info#ffffff] #82f9fc"..hand8.." #ffffffHandling betöltve!", 255, 255, 255, true) removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) elseif isCursorOnElement(x*797, y*290, x*23, y*22) then removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) else end end end addEventHandler("onClientClick", getRootElement(), onClientButtonClick) --9 function onClientButtonClick(Button, State) if Painelstt == true and Button == "left" and State == "down" then if isCursorOnElement(x*700, y*420, x*100, y*30) then setClipboard(""..hand2.."") outputChatBox("[#ff8f00Handling - Info#ffffff] #82f9fc"..hand9.." #ffffffHandling betöltve!", 255, 255, 255, true) removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) elseif isCursorOnElement(x*797, y*290, x*23, y*22) then removeEventHandler("onClientRender", getRootElement(), PainelDc) Painelstt = false showCursor(false) else end end end addEventHandler("onClientClick", getRootElement(), onClientButtonClick) function isCursorOnElement( posX, posY, width, height ) --<< Funçao que verifica a posiçao do Cursor (mouse) if isCursorShowing( ) then local mouseX, mouseY = getCursorPosition( ) local clientW, clientH = guiGetScreenSize( ) local mouseX, mouseY = mouseX * clientW, mouseY * clientH if ( mouseX > posX and mouseX < ( posX + width ) and mouseY > posY and mouseY < ( posY + height ) ) then return true end end return false end
  9. function SetCorpFT(player) if player and not isGuestAccount(getPlayerAccount(player)) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPECMD")) then setElementData (player,resname..":soucmd", true) setElementData (player,resname..":gerenciar", true) setElementData (player,resname..":promover", true) setElementData (player,resname..":expulsar", true) setElementData (player,resname..":recrutar", true) setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE6")) then setElementData (player,resname..":gerenciar", true) setElementData (player,resname..":promover", true) setElementData (player,resname..":expulsar", true) setElementData (player,resname..":recrutar", true) setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE5")) then setElementData (player,resname..":gerenciar", true) setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE4")) then setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE3")) then setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE2")) then setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPE1")) then setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":soumembro", true) return 1 end end end setTimer( function() for i, pl in pairs(getElementsByType("player")) do if pl ~= (false or nil) then SetCorpFT(pl) end end end, 10000, 0) function checkskinsBOPE ( ) if ( getElementType ( source ) == "player" ) then if ( getElementModel ( source ) == 255 ) then if getElementData(source,"vdbbopevtr1") == false and not (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPECMD")) then showBox(source,"info",""..corp..": Acesso negado") return end end if ( getElementModel ( source ) == 256 ) then if getElementData(source,"vdbbopevtr2") == false and not (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPECMD")) then showBox(source,"info",""..corp..": Acesso negado") return end end if ( getElementModel ( source ) == 257 ) then if getElementData(source,"vdbbopevtr3") == false and not (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("BOPECMD")) then showBox(source,"info",""..corp..": Acesso negado") return end end end end addEventHandler("onElementModelChange",getRootElement(),checkskinsBOPE) function CorpSkinBOPE(id) if tonumber(id) then setElementModel ( source, id ) showBox(source,"info","Você pegou skin "..corp..":") end end addEvent(resname..":setarskin", true) addEventHandler(resname..":setarskin", root, CorpSkinBOPE) function CorpKitBOPE() setElementHealth(source, 200) setPedArmor(source, 100) giveWeapon(source, 3, 200, true) giveWeapon(source, 23, 200, true) giveWeapon(source, 26, 200, true) giveWeapon(source, 28, 200, true) giveWeapon(source, 31, 200, true) giveWeapon(source, 34, 200, true) giveWeapon(source, 14, 200, true) showBox(source,"info","Você pegou Kit da "..corp..":") end addEvent(resname..":corpkitbope", true) addEventHandler(resname..":corpkitbope", root, CorpKitBOPE) function CorpTeleBaseBOPE () local CorpVTR = getPedOccupiedVehicle(source) if (CorpVTR) then setElementPosition(CorpVTR,1521.5, -1661.3000488281, 13.5) else setElementPosition(source,1521.5, -1661.3000488281, 13.5 ) end showBox(source,"info","Você teleportou-se para base da "..corp..":") end addEvent(resname..":corpteleportebasebope", true) addEventHandler(resname..":corpteleportebasebope", root, CorpTeleBaseBOPE) local CorpVTRBOPE = {} function CorpVTRvdbBOPE(viatura) local veiculo = getPedOccupiedVehicle ( source ) if veiculo and getVehicleController(veiculo) == source and isElement( CorpVTRBOPE[source] ) and veiculo == CorpVTRBOPE[source] then if tonumber(viatura) == 1 then setElementModel (veiculo,tonumber(547)) elseif tonumber(viatura) == 2 then setElementModel (veiculo,tonumber(490)) setVehicleColor(veiculo,255,255,255,255,255,255) elseif tonumber(viatura) == 3 then setElementModel (veiculo,tonumber(427)) elseif tonumber(viatura) == 4 then setElementModel (veiculo,tonumber(497)) end else if CorpVTRBOPE[source] and isElement( CorpVTRBOPE[source] ) then destroyElement( CorpVTRBOPE[source] ) CorpVTRBOPE[source] = nil end local x,y,z = getElementPosition(source) if tonumber(viatura) == 1 then CorpVTRBOPE[source] = createVehicle(547, x,y,z) warpPedIntoVehicle (source,CorpVTRBOPE[source]) showBox(source,"info","Você pegou VTR da "..corp..":") return 1 end if tonumber(viatura) == 2 then CorpVTRBOPE[source] = createVehicle(490, x,y,z) warpPedIntoVehicle (source,CorpVTRBOPE[source]) setVehicleColor(CorpVTRBOPE[source],255,255,255,255,255,255) showBox(source,"info","Você pegou VTR da "..corp..":") return 1 end if tonumber(viatura) == 3 then CorpVTRBOPE[source] = createVehicle(427, x,y,z) setVehicleDamageProof() warpPedIntoVehicle (source,CorpVTRBOPE[source]) showBox(source,"info","Você pegou Moto da "..corp..":") return 1 end if tonumber(viatura) == 4 then CorpVTRBOPE[source] = createVehicle(497, x,y,z) warpPedIntoVehicle (source,CorpVTRBOPE[source]) showBox(source,"info","Você pegou Moto da "..corp..":") return 1 end end end addEvent(resname..":corpviatura", true) addEventHandler(resname..":corpviatura", root, CorpVTRvdbBOPE) function CorpDestruirVTRBOPE() if CorpVTRBOPE[source] and isElement( CorpVTRBOPE[source] ) then destroyElement( CorpVTRBOPE[source] ) CorpVTRBOPE[source] = nil showBox(source,"info","Viatura destruida") end end addEvent(resname..":corpdestruirviatura", true) addEventHandler(resname..":corpdestruirviatura", root, CorpDestruirVTRBOPE) addEventHandler ("onPlayerQuit", root, CorpDestruirVTRBOPE) p_lights = {} p_timer = {} p_lvar = {} function CorpLuzesBOPE() local veh = getPedOccupiedVehicle(source) local id = getElementModel(veh) if (id == 547) or (id == 490) or (id == 427) or (id == 497) or (id == 427) or (id == 523) or (id == 490) or (id == 416) then if(p_lights[veh] == 0) or(p_lights[veh] == nil) then p_lights[veh] = 1 showBox(source,"info","Luzes de Alerta ligadas") setVehicleOverrideLights ( veh, 2 ) p_timer[veh] = setTimer( function() if(p_lvar[veh] == 0) or (p_lvar[veh] == nil) then p_lvar[veh] = 1 -- 0 = vorne links 1 = vorne rechts 2 = hinten links 3 = hinten rechts setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 0, 0, 255) else setVehicleLightState ( veh, 3, 0) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 0, 0) p_lvar[veh] = 0 end end, 500, 0) else p_lights[veh] = 0 showBox(source,"info","Luzes de Alerta desligadas") killTimer(p_timer[veh]) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 3, 0) setVehicleHeadLightColor(veh, 255, 255, 255) setVehicleOverrideLights ( veh, 1 ) end else showBox(source,"info","Este Veiculo Não é uma Viatura") end end addEvent(resname..":corpluzesbope", true) addEventHandler(resname..":corpluzesbope", root, CorpLuzesBOPE() addEventHandler ( "onVehicleExplode", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler ( "onVehicleRespawn", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler("onElementDestroy", getRootElement(), function () if getElementType(source) == "vehicle" then if(p_lights[source] == 1) then killTimer(p_timer[source]) end end end) function CorpAbandonarBOPE(cargo) local acl = aclGetGroup(cargo) if (acl) then local conta = getAccountName(getPlayerAccount(source)) local checkacl = isObjectInACLGroup ( "user." ..conta, acl) if (checkacl) then aclGroupRemoveObject(acl, "user."..conta) showBox(source,"info",""..corp..": Você abandonou a Corporação") setElementData (source, "vdbsoumembroBOPE",false) outputServerLog("ABANDONOU "..corp..": "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." > "..cargo.."") end end end addEvent(resname..":abandonarcorpbope", true) addEventHandler(resname..":abandonarcorpbope", getRootElement(), CorpAbandonarBOPE) function IsCorpGroupBOPE ( thePlayer ) local account = getPlayerAccount ( thePlayer ) local InBOPE = false for _, group in ipairs ( {"BOPECMD","BOPE6","BOPE5","BOPE4","BOPE3","BOPE2","BOPE1"} ) do if isObjectInACLGroup ( "user.".. getAccountName ( account ), aclGetGroup ( group ) ) then InBOPE = true break end end return InBOPE end function CorpGetMembrosActBOPE(player) local info = {} for _,players in pairs(getElementsByType("player")) do if getElementDimension( players) == 0 and getElementInterior(players) == 0 and not isGuestAccount ( getPlayerAccount ( players ) ) then if ( IsCorpGroupBOPE ( players ) ) then table.insert(info,{getPlayerName(players),players}) end end end triggerClientEvent(player,resname..":ListaCorp",player,info) end addEvent(resname..":corpmembrosativobope",true) addEventHandler(resname..":corpmembrosativobope",root,CorpGetMembrosActBOPE) function CorpGetMembrosBOPE(player) local info = {} for _,players in pairs(getElementsByType("player")) do if ( IsCorpGroupBOPE ( players ) ) then table.insert(info,{getPlayerName(players),players}) end end triggerClientEvent(player,resname..":ListaCorp",player,info) end addEvent(resname..":corptodosmembrosbope",true) addEventHandler(resname..":corptodosmembrosbope",root,CorpGetMembrosBOPE) function CorpGetAllPlayersBOPE(player) local info = {} for _,players in pairs(getElementsByType("player")) do if not isGuestAccount ( getPlayerAccount ( players ) ) and not ( IsCorpGroupBOPE ( players ) ) then table.insert(info,{getPlayerName(players),players}) end end triggerClientEvent(player,resname..":ListaCorp",player,info) end addEvent(resname..":corpgetplayersbope",true) addEventHandler(resname..":corpgetplayersbope",root,CorpGetAllPlayersBOPE) function CorpIrBOPE(teleporter) irtp = teleporter playerair = getPlayerFromName(irtp) if playerair then local veiculotp = getPedOccupiedVehicle(source) if (veiculotp) then showBox(source,"error","Saia do Veiculo") return end if getElementData(playerair,"emCombate") == true then showBox(source,"info","Erro o jogador esta em Combate "..irtp.."") return end local x,y,z = getElementPosition(playerair) setElementPosition(source, x, y, z + 2) showBox(source,"info","Você se teleportou até o jogador "..irtp.."") outputServerLog("TELEPORTE BOPE: Foi "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." > "..irtp.."") end end addEvent(resname..":TeleIrCorpbope", true) addEventHandler(resname..":TeleIrCorpbope", root, CorpIrBOPE) function CorpPuxarBOPE(teleporter) irtp = teleporter playerair = getPlayerFromName(irtp) if playerair then local veiculotp = getPedOccupiedVehicle(playerair) if (veiculotp) then showBox(source,"error","O Jogador esta em um veiculo") return end if getElementData(playerair,"emCombate") == true then showBox(source,"info","Erro o jogador esta em Combate "..irtp.."") return end local x,y,z = getElementPosition(source) setElementPosition(playerair, x, y, z + 2) showBox(source,"info","Você puxou o jogador "..irtp.." ") showBox(playerair,"info",""..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." puxou você") outputServerLog("TELEPORTE BOPE: Puxou "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." > "..irtp.."") end end addEvent(resname..":TelePuxarCorpbope", true) addEventHandler(resname..":TelePuxarCorpbope", root, CorpPuxarBOPE) function CorpRemoverMembroBOPE(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPECMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPE6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) local cargoremove = aclGetGroup(cargo) if (cargoremove) then local contaaremover = getAccountName(contaarecrutar) local checkcargo = isObjectInACLGroup ( "user." ..contaaremover, cargoremove) if (checkcargo) then aclGroupRemoveObject(cargoremove, "user."..contaaremover) setElementData (arecrutar, "vdbsoumembroBOPE",false) showBox(arecrutar,"error",""..corp..": Você foi removido da Corporação") outputServerLog("EXPULSO "..corp..":: "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":corpremovermembrobope", true) addEventHandler(resname..":corpremovermembrobope", getRootElement(), CorpRemoverMembroBOPE) function CorpRecrutarBOPE(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPECMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPE6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) --for _, checkcorp in ipairs ({}) do for _, checkcorp in ipairs ({"Suporte"}) do if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(arecrutar)), aclGetGroup( checkcorp )) then showBox(source,"error","o Jogador "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." pertence a outra Corp/Gang ["..checkcorp.."]") cancelEvent() return 1 end end local cargoset = aclGetGroup(cargo) if (cargoset) then local ncuenta = getAccountName(contaarecrutar) local checkrecrut = isObjectInACLGroup ( "user." ..ncuenta, cargoset) if (not checkrecrut) then aclGroupAddObject(cargoset, "user."..ncuenta) setElementData (arecrutar, "vdbsoumembroBOPE",false) showBox(arecrutar,"info",""..corp..": Você foi Recrutado (Aguarde 10 segundos até seu painel atualizar)") showBox(source,"info",""..corp..": Você Recrutou o "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." para "..corp.."") outputServerLog("RECRUTAMENTO "..corp..": "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":corprecrutarbope", true) addEventHandler(resname..":corprecrutarbope", getRootElement(), CorpRecrutarBOPE) function CorpPromoverBOPE(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPECMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPE6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) for _, checkcorp in ipairs ({"Suporte"}) do --for _, checkcorp in ipairs ({}) do if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(arecrutar)), aclGetGroup( checkcorp )) then showBox(source,"error","o Jogador "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." pertence a outra Corp/Gang ["..checkcorp.."]") cancelEvent() return 1 end end local cargoset = aclGetGroup(cargo) if (cargoset) then local ncuenta = getAccountName(contaarecrutar) local checkrecrut = isObjectInACLGroup ( "user." ..ncuenta, cargoset) if (not checkrecrut) then aclGroupAddObject(cargoset, "user."..ncuenta) setElementData (arecrutar, "vdbsoumembroBOPE",false) showBox(arecrutar,"info",""..corp..": Você foi Promovido (Aguarde 10 segundos até seu painel atualizar)") showBox(source,"info",""..corp..": Você Promoveu o "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." para "..corp.."") outputServerLog("PROMOVEU "..corp..": "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":corppromoverbope", true) addEventHandler(resname..":corppromoverbope", getRootElement(), CorpPromoverBOPE) function CorpOneACLBOPE(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPECMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "BOPE6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) local cargoremove = aclGetGroup(cargo) if (cargoremove) then local contaaremover = getAccountName(contaarecrutar) local checkcargo = isObjectInACLGroup ( "user." ..contaaremover, cargoremove) if (checkcargo) then aclGroupRemoveObject(cargoremove, "user."..contaaremover) setElementData (arecrutar, "vdbsoumembroBOPE",false) outputServerLog(""..corp..": CARGO ONE: "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":CorpCagoOnebope", true) addEventHandler(resname..":CorpCagoOnebope", getRootElement(), CorpOneACLBOPE) function QuitRemoverCorpBOPE () if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("BOPE1")) then aclGroupRemoveObject (aclGetGroup("BOPE1"), "user."..getAccountName(getPlayerAccount(source))) end end addEventHandler ( "onPlayerQuit", getRootElement(),QuitRemoverCorpBOPE) function CorpAcessoBOPE() showBoxBOPE(source,"error","Acesso não permitido") end addEvent("acessonegadobope", true) addEventHandler("acessonegadobope", root,CorpAcessoBOPE) function showBoxBOPE(player, value, str) if isElement(player) then triggerClientEvent(player, "CreateBox", getRootElement(), value, str) end end function corpmsgbope(source,type,msg) if source and type and msg then showBoxBOPE(source,type,msg) end end addEvent(resname..":corpmsgbope", true) addEventHandler(resname..":corpmsgbope", root, corpmsgbope) Other Panel Tactical Forty function SetCorp(player) if player and not isGuestAccount(getPlayerAccount(player)) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FTCMD")) then setElementData (player,resname..":soucmd", true) setElementData (player,resname..":gerenciar", true) setElementData (player,resname..":promover", true) setElementData (player,resname..":expulsar", true) setElementData (player,resname..":recrutar", true) setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FT6")) then setElementData (player,resname..":gerenciar", true) setElementData (player,resname..":promover", true) setElementData (player,resname..":expulsar", true) setElementData (player,resname..":recrutar", true) setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FT5")) then setElementData (player,resname..":gerenciar", true) setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FT4")) then setElementData (player,resname..":skin1", true) setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":vtr3", true) setElementData (player,resname..":vtr4", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FT3")) then setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":vtr2", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FT2")) then setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":vtr1", true) setElementData (player,resname..":soumembro", true) setElementData (player, "isPolice", true) return 1 end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FT1")) then setElementData (player,resname..":skin2", true) setElementData (player,resname..":skin3", true) setElementData (player,resname..":soumembro", true) return 1 end end end setTimer( function() for i, pl in pairs(getElementsByType("player")) do if pl ~= (false or nil) then SetCorp(pl) end end end, 10000, 0) function checkskinsFT ( ) if ( getElementType ( source ) == "player" ) then if ( getElementModel ( source ) == 96 ) then if getElementData(source,"vdbftvtr1") == false and not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FTCMD")) then showBox(source,"info",""..corp..": Acesso negado") return end end if ( getElementModel ( source ) == 286 ) then if getElementData(source,"vdbftvtr2") == false and not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FTCMD")) then showBox(source,"info",""..corp..": Acesso negado") return end end if ( getElementModel ( source ) == 97 ) then if getElementData(source,"vdbftvtr3") == false and not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("FTCMD")) then showBox(source,"info",""..corp..": Acesso negado") return end end end end addEventHandler("onElementModelChange",getRootElement(),checkskinsFT) function CorpSkin(id) if tonumber(id) then setElementModel ( source, id ) showBox(source,"info","Você pegou skin "..corp..":") end end addEvent(resname..":setarskin", true) addEventHandler(resname..":setarskin", root, CorpSkin) function CorpKit() setElementHealth(source, 200) setPedArmor(source, 100) giveWeapon(source, 3, 200, true) giveWeapon(source, 23, 200, true) giveWeapon(source, 26, 200, true) giveWeapon(source, 28, 200, true) giveWeapon(source, 31, 200, true) giveWeapon(source, 34, 200, true) giveWeapon(source, 14, 200, true) showBox(source,"info","Você pegou Kit da "..corp..":") end addEvent(resname..":corpkit", true) addEventHandler(resname..":corpkit", root, CorpKit) function CorpTeleBase () local CorpVTR = getPedOccupiedVehicle(source) if (CorpVTR) then setElementPosition(CorpVTR,2184.8012695313, -1794.8519287109, 13.366186141968) else setElementPosition(source,2184.8012695313, -1794.8519287109, 13.366186141968 ) end showBox(source,"info","Você teleportou-se para base da "..corp..":") end addEvent(resname..":corpteleportebase", true) addEventHandler(resname..":corpteleportebase", root, CorpTeleBase) local CorpVTR = {} function CorpVTRvdb(viatura) local veiculo = getPedOccupiedVehicle ( source ) if veiculo and getVehicleController(veiculo) == source and isElement( CorpVTR[source] ) and veiculo == CorpVTR[source] then if tonumber(viatura) == 1 then setElementModel (veiculo,tonumber(598)) elseif tonumber(viatura) == 2 then setElementModel (veiculo,tonumber(496)) setVehicleColor(veiculo,255,255,255,255,255,255) elseif tonumber(viatura) == 3 then setElementModel (veiculo,tonumber(523)) elseif tonumber(viatura) == 4 then setElementModel (veiculo,tonumber(497)) end else if CorpVTR[source] and isElement( CorpVTR[source] ) then destroyElement( CorpVTR[source] ) CorpVTR[source] = nil end local x,y,z = getElementPosition(source) if tonumber(viatura) == 1 then CorpVTR[source] = createVehicle(598, x,y,z) warpPedIntoVehicle (source,CorpVTR[source]) showBox(source,"info","Você pegou VTR da "..corp..":") return 1 end if tonumber(viatura) == 2 then CorpVTR[source] = createVehicle(496, x,y,z) warpPedIntoVehicle (source,CorpVTR[source]) setVehicleColor(CorpVTR[source],255,255,255,255,255,255) showBox(source,"info","Você pegou VTR da "..corp..":") return 1 end if tonumber(viatura) == 3 then CorpVTR[source] = createVehicle(523, x,y,z) setVehicleDamageProof() warpPedIntoVehicle (source,CorpVTR[source]) showBox(source,"info","Você pegou Moto da "..corp..":") return 1 end if tonumber(viatura) == 4 then CorpVTR[source] = createVehicle(497, x,y,z) warpPedIntoVehicle (source,CorpVTR[source]) showBox(source,"info","Você pegou Moto da "..corp..":") return 1 end end end addEvent(resname..":corpviatura", true) addEventHandler(resname..":corpviatura", root, CorpVTRvdb) function CorpDestruirVTR() if CorpVTR[source] and isElement( CorpVTR[source] ) then destroyElement( CorpVTR[source] ) CorpVTR[source] = nil showBox(source,"info","Viatura destruida") end end addEvent(resname..":corpdestruirviatura", true) addEventHandler(resname..":corpdestruirviatura", root, CorpDestruirVTR) addEventHandler ("onPlayerQuit", root, CorpDestruirVTR) p_lights = {} p_timer = {} p_lvar = {} function CorpLuzes() local veh = getPedOccupiedVehicle(source) local id = getElementModel(veh) if (id == 598) or (id == 496) or (id == 523) or (id == 497) or (id == 427) or (id == 523) or (id == 490) or (id == 416) then if(p_lights[veh] == 0) or(p_lights[veh] == nil) then p_lights[veh] = 1 showBox(source,"info","Luzes de Alerta ligadas") setVehicleOverrideLights ( veh, 2 ) p_timer[veh] = setTimer( function() if(p_lvar[veh] == 0) or (p_lvar[veh] == nil) then p_lvar[veh] = 1 -- 0 = vorne links 1 = vorne rechts 2 = hinten links 3 = hinten rechts setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 0, 0, 255) else setVehicleLightState ( veh, 3, 0) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 0, 0) p_lvar[veh] = 0 end end, 500, 0) else p_lights[veh] = 0 showBox(source,"info","Luzes de Alerta desligadas") killTimer(p_timer[veh]) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 3, 0) setVehicleHeadLightColor(veh, 255, 255, 255) setVehicleOverrideLights ( veh, 1 ) end else showBox(source,"info","Este Veiculo Não é uma Viatura") end end addEvent(resname..":corpluzes", true) addEventHandler(resname..":corpluzes", root, CorpLuzes) addEventHandler ( "onVehicleExplode", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler ( "onVehicleRespawn", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler("onElementDestroy", getRootElement(), function () if getElementType(source) == "vehicle" then if(p_lights[source] == 1) then killTimer(p_timer[source]) end end end) function CorpAbandonar(cargo) local acl = aclGetGroup(cargo) if (acl) then local conta = getAccountName(getPlayerAccount(source)) local checkacl = isObjectInACLGroup ( "user." ..conta, acl) if (checkacl) then aclGroupRemoveObject(acl, "user."..conta) showBox(source,"info",""..corp..": Você abandonou a Corporação") setElementData (source, "vdbsoumembroFT",false) outputServerLog("ABANDONOU "..corp..": "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." > "..cargo.."") end end end addEvent(resname..":abandonarcorp", true) addEventHandler(resname..":abandonarcorp", getRootElement(), CorpAbandonar) function IsCorpGroup ( thePlayer ) local account = getPlayerAccount ( thePlayer ) local InFT = false for _, group in ipairs ( {"FTCMD","FT6","FT5","FT4","FT3","FT2","FT1"} ) do if isObjectInACLGroup ( "user.".. getAccountName ( account ), aclGetGroup ( group ) ) then InFT = true break end end return InFT end function CorpGetMembrosAct(player) local info = {} for _,players in pairs(getElementsByType("player")) do if getElementDimension( players) == 0 and getElementInterior(players) == 0 and not isGuestAccount ( getPlayerAccount ( players ) ) then if ( IsCorpGroup ( players ) ) then table.insert(info,{getPlayerName(players),players}) end end end triggerClientEvent(player,resname..":ListaCorp",player,info) end addEvent(resname..":corpmembrosativo",true) addEventHandler(resname..":corpmembrosativo",root,CorpGetMembrosAct) function CorpGetMembros(player) local info = {} for _,players in pairs(getElementsByType("player")) do if ( IsCorpGroup ( players ) ) then table.insert(info,{getPlayerName(players),players}) end end triggerClientEvent(player,resname..":ListaCorp",player,info) end addEvent(resname..":corptodosmembros",true) addEventHandler(resname..":corptodosmembros",root,CorpGetMembros) function CorpGetAllPlayers(player) local info = {} for _,players in pairs(getElementsByType("player")) do if not isGuestAccount ( getPlayerAccount ( players ) ) and not ( IsCorpGroup ( players ) ) then table.insert(info,{getPlayerName(players),players}) end end triggerClientEvent(player,resname..":ListaCorp",player,info) end addEvent(resname..":corpgetplayers",true) addEventHandler(resname..":corpgetplayers",root,CorpGetAllPlayers) function CorpIr(teleporter) irtp = teleporter playerair = getPlayerFromName(irtp) if playerair then local veiculotp = getPedOccupiedVehicle(source) if (veiculotp) then showBox(source,"error","Saia do Veiculo") return end if getElementData(playerair,"emCombate") == true then showBox(source,"info","Erro o jogador esta em Combate "..irtp.."") return end local x,y,z = getElementPosition(playerair) setElementPosition(source, x, y, z + 2) showBox(source,"info","Você se teleportou até o jogador "..irtp.."") outputServerLog("TELEPORTE FT: Foi "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." > "..irtp.."") end end addEvent(resname..":TeleIrCorp", true) addEventHandler(resname..":TeleIrCorp", root, CorpIr) function CorpPuxar(teleporter) irtp = teleporter playerair = getPlayerFromName(irtp) if playerair then local veiculotp = getPedOccupiedVehicle(playerair) if (veiculotp) then showBox(source,"error","O Jogador esta em um veiculo") return end if getElementData(playerair,"emCombate") == true then showBox(source,"info","Erro o jogador esta em Combate "..irtp.."") return end local x,y,z = getElementPosition(source) setElementPosition(playerair, x, y, z + 2) showBox(source,"info","Você puxou o jogador "..irtp.." ") showBox(playerair,"info",""..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." puxou você") outputServerLog("TELEPORTE FT: Puxou "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." > "..irtp.."") end end addEvent(resname..":TelePuxarCorp", true) addEventHandler(resname..":TelePuxarCorp", root, CorpPuxar) function CorpRemoverMembro(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "FTCMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "FT6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) local cargoremove = aclGetGroup(cargo) if (cargoremove) then local contaaremover = getAccountName(contaarecrutar) local checkcargo = isObjectInACLGroup ( "user." ..contaaremover, cargoremove) if (checkcargo) then aclGroupRemoveObject(cargoremove, "user."..contaaremover) setElementData (arecrutar, "vdbsoumembroFT",false) showBox(arecrutar,"error",""..corp..": Você foi removido da Corporação") outputServerLog("EXPULSO "..corp..":: "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":corpremovermembro", true) addEventHandler(resname..":corpremovermembro", getRootElement(), CorpRemoverMembro) function CorpRecrutar(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "FTCMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "FT6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) --for _, checkcorp in ipairs ({"Console","Admin","SuperModerator","Moderator","Suporte","PMCMD","PM6","PM5","PM4","PM3","PM2","PM1"}) do for _, checkcorp in ipairs ({"Suporte"}) do if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(arecrutar)), aclGetGroup( checkcorp )) then showBox(source,"error","o Jogador "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." pertence a outra Corp/Gang ["..checkcorp.."]") cancelEvent() return 1 end end local cargoset = aclGetGroup(cargo) if (cargoset) then local ncuenta = getAccountName(contaarecrutar) local checkrecrut = isObjectInACLGroup ( "user." ..ncuenta, cargoset) if (not checkrecrut) then aclGroupAddObject(cargoset, "user."..ncuenta) setElementData (arecrutar, "vdbsoumembroFT",false) showBox(arecrutar,"info",""..corp..": Você foi Recrutado (Aguarde 10 segundos até seu painel atualizar)") showBox(source,"info",""..corp..": Você Recrutou o "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." para "..corp.."") outputServerLog("RECRUTAMENTO "..corp..": "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":corprecrutar", true) addEventHandler(resname..":corprecrutar", getRootElement(), CorpRecrutar) function CorpPromover(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "FTCMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "FT6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) for _, checkcorp in ipairs ({"Suporte"}) do --for _, checkcorp in ipairs ({"Console","Admin","SuperModerator","Moderator","Suporte","PMCMD","PM6","PM5","PM4","PM3","PM2","PM1"}) do if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(arecrutar)), aclGetGroup( checkcorp )) then showBox(source,"error","o Jogador "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." pertence a outra Corp/Gang ["..checkcorp.."]") cancelEvent() return 1 end end local cargoset = aclGetGroup(cargo) if (cargoset) then local ncuenta = getAccountName(contaarecrutar) local checkrecrut = isObjectInACLGroup ( "user." ..ncuenta, cargoset) if (not checkrecrut) then aclGroupAddObject(cargoset, "user."..ncuenta) setElementData (arecrutar, "vdbsoumembroFT",false) showBox(arecrutar,"info",""..corp..": Você foi Promovido (Aguarde 10 segundos até seu painel atualizar)") showBox(source,"info",""..corp..": Você Promoveu o "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." para "..corp.."") outputServerLog("PROMOVEU "..corp..": "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":corppromover", true) addEventHandler(resname..":corppromover", getRootElement(), CorpPromover) function CorpOneACL(player, cargo) local accountName = getAccountName(getPlayerAccount(client)) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "FTCMD" ) ) or isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "FT6" ) ) then arecrutar = getPlayerFromName(player) local contaarecrutar = getPlayerAccount(arecrutar) local cargoremove = aclGetGroup(cargo) if (cargoremove) then local contaaremover = getAccountName(contaarecrutar) local checkcargo = isObjectInACLGroup ( "user." ..contaaremover, cargoremove) if (checkcargo) then aclGroupRemoveObject(cargoremove, "user."..contaaremover) setElementData (arecrutar, "vdbsoumembroFT",false) outputServerLog(""..corp..": CARGO ONE: "..getPlayerName(arecrutar):gsub("#%x%x%x%x%x%x","").." > "..cargo.." > "..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." ") end end end end addEvent(resname..":CorpCagoOne", true) addEventHandler(resname..":CorpCagoOne", getRootElement(), CorpOneACL) function QuitRemoverCorp () if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("FT1")) then aclGroupRemoveObject (aclGetGroup("FT1"), "user."..getAccountName(getPlayerAccount(source))) end end addEventHandler ( "onPlayerQuit", getRootElement(),QuitRemoverCorp) function CorpAcesso() showBox(source,"error","Acesso não permitido") end addEvent("acessonegado", true) addEventHandler("acessonegado", root,CorpAcesso) function showBox(player, value, str) if isElement(player) then triggerClientEvent(player, "CreateBox", getRootElement(), value, str) end end function corpmsg(source,type,msg) if source and type and msg then showBox(source,type,msg) end end addEvent(resname..":corpmsg", true) addEventHandler(resname..":corpmsg", root, corpmsg)
  10. والصلاة والسلام علي سيدنا محمد خاتم المرسلين وعلي اَلي وصحبه وسلم أجمعين @HassoN كيفكم إخواني أتمني لكم الخير من كل قلبي وما بمل بشكر أخواني وأعزائي الكرام وخاصة أخي والباقي في القلب - : اليوم طلبان وليس أمر ألا وهم :طلب اللوحة الأدمانية وهو عايز كود يخلي الأسل ما يتفتح إلا لرتب معينة بس :طلب مود الساعات وهو مود الساعات أبي أسوي له داتا باس بمعني السيرفر طفي او سويت ريستارت للمود ساعات الاعبين ما تروح بس كذا ذا الي أحتاجه وأسف لو أكون مأثر علي بعض المطورين هذي الأيام ظروفي ما تسمح لي أني أكون مستوعب والله وحده يعلم وشكرا لكل أحبائي ومسانديني ويكون الإنسان في عون ربه
  11. So i have a shop script wich pretty much allows to buy items/weapons from this shop, the shop sells with "K.B.K Points" which is the player money but with another name to fit the server. The problem i have is when player buys one of the item they get all of them. I want to make them get the item they buy ONLY and get the right amount, for example if you buy a MK 48 Mod 0 Mag, you should get 100x of this item in your inventory because the mag itself is 100, otherwise wich ive tested it only gave 1x. But the problem is when i add more lines which i have shown below, it gives the player all the items listed below, i was trying to use if, and else if, but because i lack experience in lua coding i was not able to debug this even with debugscript! I would appreciate if someone could work out or help me out on how to make the shop only give the player the item the player buys and the right amount! The "+1" in the lists are the amount the player should get! If you need more of the code to understand and help me out then i will add it on request local items = { --items,cena(K.B.K Points) {"M1911",50}, {"PDW",150}, {"Winchester 1866",150}, {"AK-107",300}, {"M4A1 Holo",300}, {"MK 48 Mod 0",450}, {"CZ550",300}, {"DMR",400}, {"M1911 Mag",50}, {"PDW Mag",100}, {"1866 Slug",125}, {"AK-107 Mag",100}, {"M4A1 Holo Mag",50}, {"MK 48 Mod 0 Mag",200}, {"CZ550 Mag",50}, {"DMR Mag",25}, {"Medic Kit",50}, {"Painkiller",10}, {"Morphine",10}, {"Bandage",5}, {"Water Bottle",15}, {"Burger",15}, {"Tire",75}, {"Engine",125}, {"Tank Parts",50}, {"Camouflage Clothing",100}, {"Army Clothing",150}, {"Ghost Clothing",200}, {"K.B.K Backpack",150}, {"Ghillie Suit",200}, {"Civilian Clothing",30}, {"GPS",15}, {"Map",15}, {"Toolbox",25}, } SHOP = { button = {}, window = {}, gridlist = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() SHOP.window[1] = guiCreateWindow(0.17, 0.23, 0.65, 0.55, "Kill Or Be Killed Shop", true) guiWindowSetMovable(SHOP.window[1], false) guiWindowSetSizable(SHOP.window[1], false) guiSetProperty(SHOP.window[1], "CaptionColour", "FF075205") SHOP.gridlist[1] = guiCreateGridList(0.01, 0.06, 0.97, 0.63, true, SHOP.window[1]) column = guiGridListAddColumn(SHOP.gridlist[1], "Item", 0.5) column2 =guiGridListAddColumn(SHOP.gridlist[1], "K.B.K Points", 0.5) for _, v in ipairs(items) do local row = guiGridListAddRow ( SHOP.gridlist[1] ) guiGridListSetItemText ( SHOP.gridlist[1], row, column, v[1], false, false ) guiGridListSetItemText ( SHOP.gridlist[1], row, column2, v[2].."", false, false ) end guiSetProperty(SHOP.gridlist[1], "SortSettingEnabled", "False") SHOP.label[1] = guiCreateLabel(0.02, 0.69, 0.97, 0.08, "Select item which you want to buy! \nThe shop value is K.B.K Points", true, SHOP.window[1]) guiLabelSetColor( SHOP.label[1],255,255,255) guiSetFont(SHOP.label[1], "default-bold-small") guiLabelSetHorizontalAlign(SHOP.label[1], "center", true) guiLabelSetVerticalAlign(SHOP.label[1], "center") SHOP.button[1] = guiCreateButton(0.35, 0.79, 0.30, 0.12, "BUY", true, SHOP.window[1]) guiSetFont(SHOP.button[1], "default-bold-small") guiSetVisible ( SHOP.window[1], false ) addEventHandler ( "onClientGUIClick", SHOP.gridlist[1], click ) addEventHandler ( "onClientGUIClick", SHOP.button[1], buttonClick ) end ) bindKey ( "f4", "down", function ( ) if getElementData(localPlayer, "logedin") then -- if getElementData (getLocalPlayer(),"playerlevel") >= 3 then local state = ( not guiGetVisible (SHOP.window[1]) ) guiSetVisible ( SHOP.window[1], state ) showCursor ( state ) -- else -- outputChatBox (" 3!") -- end end end ) function buttonClick(button) if getElementData(localPlayer, "logedin") then if button == "left" then local nRow, nColumn = guiGridListGetSelectedItem( SHOP.gridlist[1] ) if nRow ~= -1 and nColumn ~= - 1 then local selectedItem = guiGridListGetItemText ( SHOP.gridlist[1], guiGridListGetSelectedItem ( SHOP.gridlist[1] ), 1 ) local price = guiGridListGetItemText ( SHOP.gridlist[1], guiGridListGetSelectedItem ( SHOP.gridlist[1] ), 2 ) local money = getPlayerMoney(thePlayer) if (money) >= tonumber(price) then guiLabelSetColor( SHOP.label[1],255,255,255) -- guiSetText( SHOP.label[1],"pietiek nauda") setPlayerMoney(money -tonumber(price)) setElementData(getLocalPlayer(),"PDW",getElementData(getLocalPlayer(),"PDW")+1) setElementData(getLocalPlayer(),"Winchester 1866",getElementData(getLocalPlayer(),"Winchester 1866")+1) setElementData(getLocalPlayer(),"M1911",getElementData(getLocalPlayer(),"M1911")+1) setElementData(getLocalPlayer(),"AK-107",getElementData(getLocalPlayer(),"AK-107")+1) setElementData(getLocalPlayer(),"M4A1 Holo",getElementData(getLocalPlayer(),"M4A1 Holo")+1) setElementData(getLocalPlayer(),"DMR",getElementData(getLocalPlayer(),"DMR")+1) setElementData(getLocalPlayer(),"CZ550",getElementData(getLocalPlayer(),"CZ550")+1) setElementData(getLocalPlayer(),"MK 48 Mod 0",getElementData(getLocalPlayer(),"MK 48 Mod 0")+1) setElementData(getLocalPlayer(),"M4A1 Holo Mag",getElementData(getLocalPlayer(),"M4A1 Holo Mag")+20) setElementData(getLocalPlayer(),"DMR Mag",getElementData(getLocalPlayer(),"DMR Mag")+5) setElementData(getLocalPlayer(),"CZ550 Mag",getElementData(getLocalPlayer(),"CZ550 Mag")+10) setElementData(getLocalPlayer(),"M1911 Mag",getElementData(getLocalPlayer(),"M1911 Mag")+100) setElementData(getLocalPlayer(),"PDW Mag",getElementData(getLocalPlayer(),"PDW Mag")+10) setElementData(getLocalPlayer(),"1866 Slug",getElementData(getLocalPlayer(),"1866 Slug")+7) setElementData(getLocalPlayer(),"MK 48 Mod 0 Mag",getElementData(getLocalPlayer(),"MK 48 Mod 0 Mag")+100) setElementData(getLocalPlayer(),"Medic Kit",getElementData(getLocalPlayer(),"Medic Kit")+1) setElementData(getLocalPlayer(),"Painkiller",getElementData(getLocalPlayer(),"Painkiller")+1) setElementData(getLocalPlayer(),"Morphine",getElementData(getLocalPlayer(),"Morphine")+1) setElementData(getLocalPlayer(),"Bandage",getElementData(getLocalPlayer(),"Bandage")+1) setElementData(getLocalPlayer(),"Water Bottle",getElementData(getLocalPlayer(),"Water Bottle")+1) setElementData(getLocalPlayer(),"Burger",getElementData(getLocalPlayer(),"Burger")+1) setElementData(getLocalPlayer(),"Tire",getElementData(getLocalPlayer(),"Tire")+1) setElementData(getLocalPlayer(),"Engine",getElementData(getLocalPlayer(),"Engine")+1) setElementData(getLocalPlayer(),"Tank Parts",getElementData(getLocalPlayer(),"Tank Parts")+1) setElementData(getLocalPlayer(),"Camouflage Clothing",getElementData(getLocalPlayer(),"Camouflage Clothing")+1) setElementData(getLocalPlayer(),"Army Clothing",getElementData(getLocalPlayer(),"Army Clothing")+1) setElementData(getLocalPlayer(),"Ghost Clothing",getElementData(getLocalPlayer(),"Ghost Clothing")+1) setElementData(getLocalPlayer(),"K.B.K Backpack",getElementData(getLocalPlayer(),"K.B.K Backpack")+1) setElementData(getLocalPlayer(),"Ghillie Suit",getElementData(getLocalPlayer(),"Ghillie Suit")+1) setElementData(getLocalPlayer(),"Civilian Clothing",getElementData(getLocalPlayer(),"Civilian Clothing")+1) setElementData(getLocalPlayer(),"GPS",getElementData(getLocalPlayer(),"GPS")+1) setElementData(getLocalPlayer(),"Map",getElementData(getLocalPlayer(),"Map")+1) setElementData(getLocalPlayer(),"Toolbox",getElementData(getLocalPlayer(),"Toolbox")+1) end guiLabelSetColor( SHOP.label[1],10,255,10) guiSetText( SHOP.label[1],"You succesfully bought "..selectedItem.." and you still have "..(money -tonumber(price)).." K.B.K Points") else guiLabelSetColor( SHOP.label[1],255,10,10) guiSetText( SHOP.label[1],"You are missing "..(price -tonumber(money)).." K.B.K Points") end else guiSetText( SHOP.label[1],"Select something first") guiLabelSetColor( SHOP.label[1],255,255,255) end end end function click () local selectedItem = guiGridListGetItemText ( SHOP.gridlist[1], guiGridListGetSelectedItem ( SHOP.gridlist[1] ), 1 ) local price = guiGridListGetItemText ( SHOP.gridlist[1], guiGridListGetSelectedItem ( SHOP.gridlist[1] ), 2 ) guiSetText( SHOP.label[1],"To buy "..selectedItem.." for "..price.." K.B.K Points press button below") guiLabelSetColor( SHOP.label[1],255,255,255) end
  12. GalaxyExx

    clan panel

    hey , i want make a clan list that are showed in panel ( each clan has informations like xp , leader , kills , members , online , members .. ) can anyone help me ?
  13. Quisiera como pudiera hacer que mi panel cuando muera alguien se abra automaticamente ya que solo abre cuando entras al sv x,y = guiGetScreenSize() JobsWin = guiCreateWindow(x/3 - 170,y/3 - 20,200,320,"Selecciona Tu Equipo",false) teamsList = guiCreateGridList(0,22,186,255,false,JobsWin) column = guiGridListAddColumn( teamsList, "Teams", 0.85 ) for id, team in ipairs(getElementsByType("team")) do local row = guiGridListAddRow ( teamsList ) guiGridListSetItemText ( teamsList, row, 1, getTeamName ( team ), false, false ) guiGridListSetItemColor ( teamsList, row, 1, getTeamColor ( team ) ) end guiWindowSetMovable ( teamsList, false ) guiWindowSetMovable ( JobsWin, false ) guiWindowSetSizable ( teamsList, false ) guiWindowSetSizable ( JobsWin, false ) send = guiCreateButton(0,285,90,25,"Seleccionar",false,JobsWin) CloseButton = guiCreateButton(105,285,90,25,"Cerrar",false,JobsWin) guiSetVisible(JobsWin, true) showCursor(true) setTimer ( showingTeams, 1000, 1) function close() if source == CloseButton then guiSetVisible(JobsWin, false) showCursor(false) end end addEventHandler ( "onClientGUIClick", root, function ( button ) if button == "left" then if source == send then local row, col = guiGridListGetSelectedItem ( teamsList ) local teamName = guiGridListGetItemText ( teamsList, row, col ) triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(), teamName ) end end end) addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), close)
  14. where is located tuning panel/tuning menu in resources??? pleasee help i have owl gamemode
  15. Hi guys we all know how to make gates and open them with commands or colshape hit etc.. I just replaced same trick with panel I added 2 buttons open the gate & close the gate !this will be help full for team base ,houses or any restricts area ! Hope you like it watch the video from here https://youtu.be/_VjlhdCV-74
  16. Guys, I have a problem with my login panel. I set to play a song but the wind is still in the background. Help me
  17. Hello guys! I have a Ped on serverside, and a Panel on clientside. How can I open my panel on serverside just for the localplayer?
  18. Personally, I'm posting in this category, in case this post can not be here I remove. Well, I'm putting together a "Vip Panel" for my server. The problem I'm having is that when I set up the position with the DX for example: Skin 1 - Skin 2 Vehicle 1 - Vehicle 2 Life / Armor - Weapons Destroy vehicle Skins 1 and 2 work perfectly when you click Vehicles 1 and 2 are also working properly But when I click either on Life / Armor or on Guns he gives me the cars I set for the buttons on vehicles Can someone help me? Below are the codes server.lua function showPanel(thePlayer) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("hawk")) then triggerClientEvent(thePlayer, "STOP", getRootElement()) else end end function onResStart() for index, player in ipairs(getElementsByType("player")) do bindKey(player, "o", "down", showPanel) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onResStart) function onPlayerJoin() bindKey(source, "o", "down", showPanel) end addEventHandler("onPlayerJoin", getRootElement(), onPlayerJoin) function cleanAll(player) for index, player in ipairs(getElementsByType("player")) do unbindKey(player, "o", "down", showPanel) end end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), cleanAll) function skin1 () setPedSkin ( source, 1 ) end addEvent("skinns1",true) addEventHandler ( "skinns1", getRootElement(), skin1 ) function skin2 () setPedSkin ( source, 303 ) end addEvent("skinns2",true) addEventHandler ( "skinns2", getRootElement(), skin2 ) veh = {} function criarxx() if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] ) veh[source] = nil end local x,y,z = getElementPosition(source) veh[source] = createVehicle(562, x,y,z + 2) warpPedIntoVehicle (source,veh[source]) end addEvent("carro1",true) addEventHandler("carro1",root,criarxx) veh = {} function criarxx() if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] ) veh[source] = nil end local x,y,z = getElementPosition(source) veh[source] = createVehicle(413, x,y,z + 2) warpPedIntoVehicle (source,veh[source]) end addEvent("carro2",true) addEventHandler("carro2",root,criarxx) function vida() setElementHealth(source, 100) setPedArmor(source, 100) end addEvent("vida", true) addEventHandler("vida", root, vidas) function arms () giveWeapon ( source, 31, 9999 ) giveWeapon ( source, 34, 9999 ) giveWeapon ( source, 28, 9999 ) giveWeapon ( source, 27, 9999 ) giveWeapon ( source, 24, 9999 ) giveWeapon ( source, 23, 9999 ) end addEvent("arms",true) addEventHandler ( "arms", getRootElement(), arms ) function destruircarro () destroyElement ( veh[source] ) end addEvent ("destroy", true) addEventHandler ("destroy", getRootElement(), destruircarro) client.lua painel = false function abrir () dxDrawRectangle(24, 230, 450, 280, tocolor(0, 0, 0, 190), false) dxDrawRectangle(34, 245, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(254, 245, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(34, 305, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(254, 305, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(34, 365, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(254, 365, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(34, 425, 430, 50, tocolor(181, 15, 19, 169), false) dxDrawRectangle(24, 172, 450, 48, tocolor(0, 0, 0, 190), false) dxDrawText("PAINEL EXCLUSIVO [Hawk]", 24, 172, 474, 220, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("SKIN 1", 34, 245, 244, 295, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("SKIN 2", 254, 245, 464, 295, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("VEÍCULO 1", 34, 305, 244, 355, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("VEÍCULO 2", 254, 305, 464, 355, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("VIDA/COLETE", 34, 365, 244, 415, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("ARMAS", 254, 365, 464, 415, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("DESTRUIR VEÍCULO", 34, 425, 464, 475, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("Créditos: KingBC | Role Play Brasil", 24, 485, 474, 505, tocolor(255, 255, 255, 255), 1.00, "clear", "center", "center", false, false, false, false, false) end function abrirbind() if painel == false then showCursor (true) addEventHandler ("onClientRender", root,abrir) painel = true else if painel == true then showCursor(false) removeEventHandler("onClientRender",root,abrir) painel = false end end end addEvent("STOP", true) addEventHandler("STOP", getRootElement(), abrirbind) function isCursorOnElement(x,y,w,h) local mx,my = getCursorPosition () local fullx,fully = guiGetScreenSize() cursorx,cursory = mx*fullx,my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end function skin1 (_,state) if painel == true then if state == "down" then if isCursorOnElement(34, 245, 244, 295 ) then triggerServerEvent ("skinns1", localPlayer) end end end end addEventHandler ("onClientClick", root, skin1) function skin2 (_,state) if painel == true then if state == "down" then if isCursorOnElement(254, 245, 464, 295 ) then triggerServerEvent ("skinns2", localPlayer) end end end end addEventHandler ("onClientClick", root, skin2) function veiculo1 (_,state) if painel == true then if state == "down" then if isCursorOnElement(34, 305, 244, 355 ) then triggerServerEvent ("carro1", localPlayer) end end end end addEventHandler ("onClientClick", root, veiculo1) function veiculo2 (_,state) if painel == true then if state == "down" then if isCursorOnElement(254, 305, 464, 355 ) then triggerServerEvent ("carro2", localPlayer) end end end end addEventHandler ("onClientClick", root, veiculo2) function vidas(_,state) if painel == true then if state == "down" then if isCursorOnElement (34, 365, 244, 415) then triggerServerEvent ("vida", getLocalPlayer()) end end end end addEventHandler ("onClientClick", root, vidas) function arms (_,state) if painel == true then if state == "down" then if isCursorOnElement(254, 365, 464, 415 ) then triggerServerEvent ("arms", localPlayer) end end end end addEventHandler ("onClientClick", root, arms) function destroy (_,state) if painel == true then if ( isCursorOnElement (34, 425, 464, 475) ) then --- destruir triggerServerEvent ("destroy", localPlayer) end end end addEventHandler ("onClientClick", root, destroy)
  19. Hi Please i need function if checkbox checked txd will be remplaced if unchek Return Normal
  20. I want create a help panel, with html, but i don't know how to make this.. Anyone can help?
  21. Buenas tardes, me podrían ayudar a cómo hacer para solucionar el siguiente problema, cuando realizo un panel y creo un Edit Box, al intentar ingresar texto en el Edit Box existe problemas con las teclas que tienen bind, por ejemplo con la t(para el say) o p(para el panel de admin). Este es el código de un ejemplo simple (Client): function asd() Panel = guiCreateWindow(216, 166, 942, 231, "", false) guiWindowSetSizable(Panel, false) Ingreso = guiCreateEdit(51, 41, 858, 68, "", false, Panel) showCursor (true) end addCommandHandler ("cp", asd) Aquí las SS del problema con la "t": http://prntscr.com/gw9g0z http://prntscr.com/gw9gp2 lo mismo pasa al presionar la "p" mientras se escribe en el Editbox: http://prntscr.com/gw9h3t ¿Cómo puedo hacer que sin importar la tecla que presione el bin de esa no se active del mismo modo que este ejemplo? http://prntscr.com/gw9hlm
  22. i have a loginpanel, and i added this lines: time = getTickCount() x = 1000 y = 200 z = 20 function anim() x = x+0.31 y = y+0.32 setCameraMatrix(x,y,z, 0, 0, 0) if (getTickCount() - time >= 5000) then removeEventHandler("onClientPreRender", getRootElement(), anim) end end addEventHandler("onClientPreRender", getRootElement(), anim) but when i log in, how to set camera to the player? because when i login, the loginpanel disappear, and the camera stay there sorry for my bad english :c
  23. Mi problema es que obviamente no se scriptear bien jaja, pero tengo la idea de como hacerlo, es a partir del panel, (AL PULSAR > "ABOTON1" en el panel(Ventana2) empezar un recorrido, y hacer que se cree 1 marker, y asi apenas llega, que espere 3 segundos, se destruya el marker, y se cree 1 nuevo en otra parada y asi. Al llegar que le de dinero, no veo que sea algo dificil de hacer, pero intente de todo, por eso recurro a la comunidad... Espero que no sea mucha molestia, gracias por leer! ----------------------------------------------------- -- Esto seria la parte del panel para que empieze a trabajar osea "Aboton1" ----------------------------------------------------- addEventHandler("onClientGUIClick", guiRoot, function() local getGui = guiGetVisible(Ventana2) if source == Aboton13 then if getGui then guiSetVisible(Ventana2, false) showCursor(false) end elseif source == Aboton1 then --Para empezar el trabajo if getGui then guiSetVisible(Ventana2, false) showCursor(false) setElementVisibleTo ( Linea54terminal, root, false ) end end end ) Linea54terminal = createMarker(2482.2924804688, 1917.4254150391, 9.768750190735,"cylinder",2,0,218,255) setElementVisibleTo ( Linea54terminal, root, false ) veh = {} function Linea54A (source) --Empieza el trabajo haciendo click en Aboton1<< if isElementWithinMarker(source, Linea54terminal) --Cuando toca con el Marker de la terminal la cosa es q empieze e lrecorrido then if veh[source] and isElement( veh[source] ) --Con determinado vehiculo del team then destroyElement ( Linea54terminal ) --Se destruye el marker de terminal Linea54Parada1 = createMarker(2482.2924804688, 1917.4254150391, 9.768750190735,"cylinder",2,0,218,255) end end end addEventHandler( "onMarkerHit", Linea54terminal, incio ) -------------------------------
  24. السلام عليكم شباب انا عندي vps Debian GNU/Linux 8 مطلوب برمجة لوحة Open Game Panel ومقابل vps Windows او Linux البرمجة راح تتم عن طريق TeamViewer للتواصل مع اصاحب الاستضافة عن طريق Skaype https://join.skype.com/l6WJnoXTBrsi
  25. client: function asdasd111() removeEventHandler("onClientRender",root,a123) guiSetVisible(buttonLogin,false) guiSetVisible(buttonRegister,false) guiSetVisible(buttonGuest,false) guiSetVisible(editPassword,false) guiSetVisible(editUsername,false) guiSetVisible(G1,false) guiSetVisible(G2,false) showCursor(false) end addEvent ( "onClientPlayerLogin", true ) addEventHandler ( "onClientPlayerLogin", root, asdasd111 ) server: function triggerLogin ( player, username, password ) triggerClientEvent ( player, "onClientPlayerLogin", player, username, password ) end what wrong?
×
×
  • Create New...