Jump to content

-.Paradox.-

Members
  • Posts

    1,239
  • Joined

  • Last visited

Everything posted by -.Paradox.-

  1. Lol ! the error was in freeroam not in fr_client.lua
  2. Lol i didn't understand what you want ? Tell me i'm kinda busy and hurry !
  3. i didnt understand either
  4. If freeroam panel copy this and past at meta.xml -- arc_'s Freeroam script --> -- You are allowed to modify this resource or add functionality to it. --> -- You may use the modified resource in your server and redistribute it. --> -- However, the original credits and this license must always stay intact. --> -- Also, give your modified resource a different name, like "'s --> -- extended freeroam", to avoid confusion for users. --> "Freeroam GUI" author="arc_" version="1.3.4" /> This will remove current vehicle's and weapons: Rocket Launcher HS, Rocket Launcher, Minigun. Rhino, Hydra, Hunter, Baron, Seasparrow. Have fun
  5. Admin panel or Freeroam panel ?
  6. prodigy i'll help you just tell me what weapons and cars you want to disallow
  7. Remove this {'lbl', text='Environment'}, {'br'}, {'btn', id='time', window=wndTime}, {'chk', id='freezetime', text='freeze', onclick=toggleFreezeTime}, {'btn', id='weather', window=wndWeather}, {'btn', id='speed', window=wndGameSpeed} From line 1574 too 1579
  8. Try this maybe it will work CONTROL_MARGIN_RIGHT = 5 LINE_MARGIN = 5 LINE_HEIGHT = 16 g_Root = getRootElement() g_ResRoot = getResourceRootElement(getThisResource()) g_Me = getLocalPlayer() server = createServerCallInterface() guiSetInputMode("no_binds_when_editing") --------------------------- -- Set skin window --------------------------- function skinInit() setControlNumber(wndSkin, 'skinid', getElementModel(g_Me)) end function showSkinID(leaf) if leaf.id then setControlNumber(wndSkin, 'skinid', leaf.id) end end function applySkin() local skinID = getControlNumber(wndSkin, 'skinid') if skinID then server.setMySkin(skinID) fadeCamera(true) end end wndSkin = { 'wnd', text = 'Set skin', width = 250, x = -20, y = 0.3, controls = { { 'lst', id='skinlist', width=230, height=290, columns={ {text='Skin', attr='name'} }, rows={xml='skins.xml', attrs={'id', 'name'}}, onitemclick=showSkinID, onitemdoubleclick=applySkin }, {'txt', id='skinid', text='', width=50}, {'btn', id='set', onclick=applySkin}, {'btn', id='close', closeswindow=true} }, oncreate = skinInit } function setSkinCommand(cmd, skin) skin = skin and tonumber(skin) if skin then server.setMySkin(skin) fadeCamera(true) closeWindow(wndSpawnMap) closeWindow(wndSetPos) end end addCommandHandler('setskin', setSkinCommand) addCommandHandler('ss', setSkinCommand) --------------------------- --- Set animation window --------------------------- function applyAnimation(leaf) if type(leaf) ~= 'table' then leaf = getSelectedGridListLeaf(wndAnim, 'animlist') if not leaf then return end end server.setPedAnimation(g_Me, leaf.parent.name, leaf.name, true, true) end function stopAnimation() server.setPedAnimation(g_Me, false) end wndAnim = { 'wnd', text = 'Set animation', width = 250, x = -20, y = 0.3, controls = { { 'lst', id='animlist', width=230, height=290, columns={ {text='Animation', attr='name'} }, rows={xml='animations.xml', attrs={'name'}}, expandlastlevel=false, onitemdoubleclick=applyAnimation }, {'btn', id='set', onclick=applyAnimation}, {'btn', id='stop', onclick=stopAnimation}, {'btn', id='close', closeswindow=true} } } addCommandHandler('anim', function(command, lib, name) server.setPedAnimation(g_Me, lib, name, true, true) end ) --------------------------- -- Weapon window --------------------------- function addWeapon(leaf, amount) if type(leaf) ~= 'table' then leaf = getSelectedGridListLeaf(wndWeapon, 'weaplist') amount = getControlNumber(wndWeapon, 'amount') if not amount or not leaf then return end end server.giveMeWeapon(leaf.id, amount) end wndWeapon = { 'wnd', text = 'Give weapon', width = 250, controls = { { 'lst', id='weaplist', width=230, height=280, columns={ {text='Weapon', attr='name'} }, rows={xml='weapons.xml', attrs={'id', 'name'}}, onitemdoubleclick=function(leaf) addWeapon(leaf, 500) end }, {'br'}, {'txt', id='amount', text='500', width=60}, {'btn', id='add', onclick=addWeapon}, {'btn', id='close', closeswindow=true} } } function giveWeaponCommand(cmd, weapon, amount) weapon = tonumber(weapon) or getWeaponIDFromName(weapon) if not weapon then return end amount = amount and tonumber(amount) or 500 server.giveMeWeapon(math.floor(weapon), amount) end addCommandHandler('give', giveWeaponCommand) addCommandHandler('wp', giveWeaponCommand) --------------------------- -- Fighting style --------------------------- addCommandHandler('setstyle', function(cmd, style) style = style and tonumber(style) if style then server.setPedFightingStyle(g_Me, style) end end ) --------------------------- -- Clothes window --------------------------- function clothesInit() if getElementModel(g_Me) ~= 0 then errMsg('You must have the CJ skin set in order to apply clothes.') closeWindow(wndClothes) return end if not g_Clothes then triggerServerEvent('onClothesInit', g_Me) end end addEvent('onClientClothesInit', true) addEventHandler('onClientClothesInit', g_Root, function(clothes) g_Clothes = clothes.allClothes for i,typeGroup in ipairs(g_Clothes) do for j,cloth in ipairs(typeGroup.children) do if not cloth.name then cloth.name = cloth.model .. ' - ' .. cloth.texture end cloth.wearing = clothes.playerClothes[typeGroup.type] and clothes.playerClothes[typeGroup.type].texture == cloth.texture and clothes.playerClothes[typeGroup.type].model == cloth.model or false end table.sort(typeGroup.children, function(a, b) return a.name < b.name end) end bindGridListToTable(wndClothes, 'clothes', g_Clothes, false) end ) function clothListClick(cloth) setControlText(wndClothes, 'addremove', cloth.wearing and 'remove' or 'add') end function applyClothes(cloth) if not cloth then cloth = getSelectedGridListLeaf(wndClothes, 'clothes') if not cloth then return end end if cloth.wearing then cloth.wearing = false setControlText(wndClothes, 'addremove', 'add') server.removePlayerClothes(g_Me, cloth.parent.type) else local prevClothIndex = table.find(cloth.siblings, 'wearing', true) if prevClothIndex then cloth.siblings[prevClothIndex].wearing = false end cloth.wearing = true setControlText(wndClothes, 'addremove', 'remove') server.addPedClothes(g_Me, cloth.texture, cloth.model, cloth.parent.type) end end wndClothes = { 'wnd', text = 'Clothes', x = -20, y = 0.3, width = 350, controls = { { 'lst', id='clothes', width=
  9. he need to extract the file first i tried it and it work perfectly and when remove the buttons he need to disallow setting time and weather from meta settings and when he finish he should write on MTA Server upgrade freeroam
  10. Oh you have to extract the freeroam file
  11. yes can i remove " Lvl " and "!" from setElementData(killer, "Level", "Lvl ".. tostring(levels[tonumber(H)]) .." !") because when i remove it the script being crashed
  12. Thanks a lot bro you're the best and one more thing please The command of get player experience dont work function getRep ( commandName, playerName ) if ( playerName ) then local thePlayer = getPlayerFromName ( playerName ) if ( thePlayer ) then local ExP = getElementData ( thePlayer, "ExP" ) outputChatBox ( getPlayerName ( thePlayer ) .." Reputation is ".. ExP "!", source ) else outputChatBox ( "Couldn't find '" .. playerName .. "'", source ) end end end addCommandHandler ( "getrep", getRep )
  13. Yeh and when player get killed he lost some experience
  14. that's the original one
  15. Hello i have this exp_system and i want two things on it i tryed but not working here is the lua exports.scoreboard:scoreboardAddColumn("ExP") exports.scoreboard:scoreboardAddColumn("Level") local levels = {[1] = 1, [50] = 2, [75] = 3, [240] = 4, [950] = 5, [1200] = 6, [2000] = 7, [5000] = 8, [9963] = 9, [20000] = 10, [100000] = 11} function win(ammo, killer, weapon, bodypart) if (killer and killer ~= source) then local H = getElementData(killer, "ExP") local S = getElementData(killer, "Level") local killer1 = getPlayerName(killer) local noob = getPlayerName(source) setElementData(killer, "ExP", tonumber(H)+75) if levels[tonumber(H)] then setElementData(killer, "Level", "Lvl ".. tostring(levels[tonumber(H)]) .." !") triggerClientEvent ( killer, "playSound", killer ) end end end addEventHandler( "onPlayerWasted", getRootElement(), win) function onLogin (_,account) setElementData(source, "Level", getAccountData(account, "lvl") or "Level 0 ") setElementData(source, "ExP", getAccountData(account, "exp") or "0") end addEventHandler ("onPlayerLogin", root, onLogin) function saveData(thePlayer, theAccount) if (theAccount and not isGuestAccount(theAccount)) then setAccountData (theAccount, "lvl", getElementData(thePlayer, "Level")) setAccountData (theAccount, "exp", getElementData(thePlayer, "ExP")) end end addEventHandler ("onPlayerQuit", root, function () saveData(source, getPlayerAccount(source)) end) addEventHandler ("onPlayerLogout", root, function (prev) saveData(source, prev) end) I want when player kill somebody he earn Random Experience i tryed adding this but not working math.random ( 5, 35 ) and when he get killed by somebody who had a higher exp he lose like math.random ( -5, -35 ) Thanks for helping
  16. and what about the command handler and players grid list ?
  17. Now what i have to do next ? when a the team leader press on one of the buttons then show this gui it's team gui from admin panel : function aPlayerTeam ( player ) if ( aTeamForm == nil ) then local x, y = guiGetScreenSize() aTeamForm = guiCreateWindow ( x / 2 - 150, y / 2 - 125, 300, 250, "Player Team Management", false ) aTeamLabel = guiCreateLabel ( 0.03, 0.09, 0.94, 0.07, "Select a team from the list or create a new one", true, aTeamForm ) guiLabelSetHorizontalAlign ( aTeamLabel, "center" ) guiLabelSetColor ( aTeamLabel, 255, 0, 0 ) aTeamList = guiCreateGridList ( 0.03, 0.18, 0.50, 0.71, true, aTeamForm ) guiGridListAddColumn( aTeamList, "Teams", 0.85 ) aTeamRefresh = guiCreateButton ( 0.03, 0.90, 0.50, 0.08, "Refresh", true, aTeamForm ) aTeamNew = guiCreateButton ( 0.55, 0.18, 0.42, 0.09, "New Team", true, aTeamForm, "createteam" ) aTeamDelete = guiCreateButton ( 0.55, 0.28, 0.42, 0.09, "Delete Team", true, aTeamForm, "destroyteam" ) aTeamShowColor = guiCreateCheckBox ( 0.55, 0.38, 0.42, 0.09, "Show Teamcolor", true, true, aTeamForm ) aTeamNameLabel = guiCreateLabel ( 0.55, 0.19, 0.42, 0.07, "Team Name:", true, aTeamForm ) aTeamColor = guiCreateLabel ( 0.55, 0.37, 0.42, 0.11, "Color:", true, aTeamForm ) aTeamR = guiCreateLabel ( 0.70, 0.37, 0.42, 0.11, "R:", true, aTeamForm ) aTeamG = guiCreateLabel ( 0.70, 0.48, 0.42, 0.11, "G:", true, aTeamForm ) aTeanB = guiCreateLabel ( 0.70, 0.59, 0.42, 0.11, "B:", true, aTeamForm ) aTeamName = guiCreateEdit ( 0.55, 0.26, 0.42, 0.10, "", true, aTeamForm ) aTeamRed = guiCreateEdit ( 0.80, 0.36, 0.15, 0.10, "0", true, aTeamForm ) aTeamGreen = guiCreateEdit ( 0.80, 0.47, 0.15, 0.10, "0", true, aTeamForm ) aTeamBlue = guiCreateEdit ( 0.80, 0.58, 0.15, 0.10, "0", true, aTeamForm ) aTeamCreate = guiCreateButton ( 0.55, 0.73, 0.20, 0.09, "Create", true, aTeamForm, "createteam" ) aTeamCancel = guiCreateButton ( 0.77, 0.73, 0.20, 0.09, "Cancel", true, aTeamForm ) aTeamAccept = guiCreateButton ( 0.55, 0.88, 0.20, 0.09, "Select", true, aTeamForm ) aTeamClose = guiCreateButton ( 0.77, 0.88, 0.20, 0.09, "Close", true, aTeamForm ) aTeamRemove = guiCreateButton ( 0.55, 0.78, 0.42, 0.09, "Remove From Team", true, aTeamForm ) addEventHandler ( "onClientGUIClick", aTeamForm, aClientTeamClick ) addEventHandler ( "onClientGUIDoubleClick", aTeamForm, aClientTeamDoubleClick ) --Register With Admin Form aRegister ( "PlayerTeam", aTeamForm, aPlayerTeam, aPlayerTeamClose ) end aTeamSelect = player aTeamsRefresh () guiSetVisible ( aTeamForm, true ) guiBringToFront ( aTeamForm ) aNewTeamShow ( false ) end function aPlayerTeamClose ( destroy ) if ( ( destroy ) or ( guiCheckBoxGetSelected ( aPerformanceTeam ) ) ) then if ( aTeamForm ) then removeEventHandler ( "onClientGUIClick", aTeamForm, aClientTeamClick ) removeEventHandler ( "onClientGUIDoubleClick", aTeamForm, aClientTeamDoubleClick ) destroyElement ( aTeamForm ) aTeamForm = nil end else guiSetVisible ( aTeamForm, false ) end end function aClientTeamDoubleClick ( button ) if ( button == "left" ) then if ( source == aTeamList ) then if ( guiGridListGetSelectedItem ( aTeamList ) ~= -1 ) then local team = guiGridListGetItemText ( aTeamList, guiGridListGetSelectedItem ( aTeamList ), 1 ) triggerServerEvent ( "aPlayer", getLocalPlayer(), aTeamSelect, "setteam", getTeamFromName ( team ) ) aPlayerTeamClose ( false ) end end end end function aClientTeamClick ( button ) if ( button == "left" ) then if ( source == aTeamNew ) then aNewTeamShow ( true ) elseif ( source == aTeamRefresh or source == aTeamShowColor ) then aTeamsRefresh() elseif ( source == aTeamDelete ) then if ( guiGridListGetSelectedItem ( aTeamList ) == -1 ) then aMessageBox ( "warning", "No team selected!" ) else local team = guiGridListGetItemText ( aTeamList, guiGridListGetSelectedItem ( aTeamList ), 1 ) aMessageBox ( "question", "Are you sure to delete \""..team.."\"?", "triggerServerEvent ( \"aTeam\", getLocalPlayer(), \"destroyteam\", \""..team.."\" )" ) end setTimer ( aTeamsRefresh, 2000, 1 ) elseif ( source == aTeamCreate ) then local team = guiGetText ( aTeamName ) if ( ( team == nil ) or ( team == false ) or ( team == "" ) ) then aMessageBox ( "warning", "Enter the team name!" ) elseif ( getTeamFromName ( team ) ) then aMessageBox ( "error", "A team with this name already exists" ) else triggerServerEvent ( "aTeam", getLocalPlayer(), "createteam", team, guiGetText ( aTeamRed ), guiGetText ( aTeamGreen ), guiGetText ( aTeamBlue ) ) aNewTeamShow ( false ) end setTimer ( aTeamsRefresh, 2000, 1 ) elseif ( source == aTeamName ) then elseif ( source == aTeamCancel ) then aNewTeamShow ( false ) elseif ( source == aTeamAccept ) then if ( guiGridListGetSelectedItem ( aTeamList ) == -1 ) then aMessageBox ( "warning", "No team selected!" ) else local team = guiGridListGetItemText ( aTeamList, guiGridListGetSelectedItem ( aTeamList ), 1 ) triggerServerEvent ( "aPlayer", getLocalPlayer(), aTeamSelect, "setteam", getTeamFromName ( team ) ) guiSetVisible ( aTeamForm, false ) end elseif ( source == aTeamClose ) then aPlayerTeamClose ( false ) elseif ( source == aTeamRemove ) then if getPlayerTeam( aTeamSelect ) then triggerServerEvent ( "aPlayer", getLocalPlayer(), aTeamSelect, "removefromteam", nil ) else aMessageBox( "warning", "This player is not in a team!") end end end end function aNewTeamShow ( bool ) guiSetVisible ( aTeamNew, not bool ) guiSetVisible ( aTeamDelete, not bool ) guiSetVisible ( aTeamShowColor, not bool ) guiSetVisible ( aTeamNameLabel, bool ) guiSetVisible ( aTeamName, bool ) guiSetVisible ( aTeamColor, bool ) guiSetVisible ( aTeamR, bool ) guiSetVisible ( aTeamG, bool ) guiSetVisible ( aTeanB, bool ) guiSetVisible ( aTeamRed, bool ) guiSetVisible ( aTeamGreen, bool ) guiSetVisible ( aTeamBlue, bool ) guiSetVisible ( aTeamCreate, bool ) guiSetVisible ( aTeamCancel, bool ) guiSetVisible ( aTeamRemove, not bool ) end function aTeamsRefresh () if ( aTeamList ) then guiGridListClear ( aTeamList ) local showColor = guiCheckBoxGetSelected ( aTeamShowColor ) for id, team in ipairs ( getElementsByType ( "team" ) ) do local row = guiGridListAddRow ( aTeamList ) guiGridListSetItemText ( aTeamList, row, 1, getTeamName ( team ), false, false ) if showColor then guiGridListSetItemColor ( aTeamList, row, 1, getTeamColor ( team ) ) end end end end
  18. Thanks, & the point is i want to create a team panel because i have a server many players and five teams and leaders need to have an admin panel for they can add them to team or kick them, so i'm trying to make a panel for them
  19. Can you fix it ? function playerList () local myWindow = guiCreateWindow (220, 82, 376, 402, "Team panel by Steven", true ) playerList = guiCreateGridList (9, 23, 181, 369, true ) button = guiCreateButton(195, 324, 171, 58, "Kick from team", true ) button = guiCreateButton(195, 123, 167, 57, "Invite to team", true ) local column = guiGridListAddColumn( playerList, "Players", 0.9 ) if ( column ) then for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false ) end addEventHandler ( "onClientGUIClick", playerList, click ) end end addEventHandler ( "onClientResourceStart", getRootElement(), PlayerList ) function click ( button, state, sx, sy, x, y, z, elem, gui ) if ( ( state == "down" ) and ( gui == true ) and ( source == playerList ) ) then local playerName = guiGridListGetItemText ( playerList, guiGridListGetSelectedItem ( playerList ), 1 ) end end
  20. you mean ? ( hasObjectPermissionTo ( getThisResource (), "function.setteam", true ) addEvent ( "onClientGUIClick", root) addEventHandler ( "onClientGUIClick", root) ? that's the server side
  21. -.Paradox.-

    DX Hud

    Hello, i maked this dx hud, Functions : -Player Health -Armor -Oxygen -Vehicle Health -Speedometer with km/h -FPS and Ping near minimap -Real time -Ability to hide hud F10 -And It show exp and level from this resource https://community.multitheftauto.com/in ... ls&id=1253 -Other functions Bye oh and i forgot here's the link http://www.mediafire.com/download/ylti78b2jj81by2/newhud.rar ========================================================================================================= Next update i'll make online staff's Good bye
  22. Hello i maked this gui for team leaders but need some work here is the lua : GUIEditor = { gridlist = {}, window = {}, scrollbar = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(220, 82, 376, 402, "Team Panel By Steven", false) GUIEditor.gridlist[1] = guiCreateGridList(9, 23, 181, 369, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Players", 0.9) GUIEditor.scrollbar[1] = guiCreateScrollBar(158, 14, 19, 355, false, false, GUIEditor.gridlist[1]) GUIEditor.button[1] = guiCreateButton(195, 324, 171, 58, "Kick from team", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") GUIEditor.button[4] = guiCreateButton(195, 123, 167, 57, "Invite to team", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[4], "default-bold-small") guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") end ) When type in console /teampanel it show the panel then in grid list i want it to show player names and i have two buttons add to tea and kick to team please help! like using
×
×
  • Create New...