Jump to content

abu5lf

Members
  • Posts

    2,193
  • Joined

  • Last visited

Everything posted by abu5lf

  1. ناقصك اشياء وانت مخربط + نسيت createVehicle
  2. abu5lf

    Stats gui

    triggerServerEvent("getUn",getLocalPlayer()) --Error triggerServerEvent( "getUn", thePlayer)
  3. abu5lf

    Find edit

    I'm sorry, thank you
  4. abu5lf

    Find edit

    onUpdateMoneyPlayerList = function ( ) if ( column ) then for _, player in ipairs ( getElementsByType 'player' ) do local row = guiGridListAddRow ( pList ) local name = getPlayerName ( player ) guiGridListSetItemText ( pList, row, column, name, "#%x%x%x%x%x%x", ( player ), false, false ) string.gsub( name, "#%x%x%x%x%x%x", "" ) end end end
  5. abu5lf

    Find edit

    how remove hex code in grid list ?
  6. ياحبيبي ان لم تعرف الطريقة بشكل جيد فلا داعي للتجريب منها وجميع الاخوان اعطوك كودات شغالة وانت لم تعرف او تفهم تجريبها ممن مادعاني للتجريب الكودات جميعا واشتغلت معي بطريقة صحيحة فأتمنى منك مراجعة نفسك في طلب الاستفسارات والتأكد انك كفو لها وتستحق ان نساعدك
  7. abu5lf

    Find edit

    Problem and a clear image, repeat the name when you search for it
  8. الرجال شكله مايعرف طريقة عمل ملف للمود وميتا يحسبها من اف 8 يكتب الكود !
  9. يأخي الكريم حنا جايين نساعدك والكود شغال وكود ابو زهرة شغال انت حطيته في اي جانب ؟ سيرفر ولا كلنت ورني الميتا حقك
  10. bed = createObject ( 1700, 2185.88037, 1599.43262, 68.71986, 90, 0, 0 ) addCommandHandler("Open", function() moveObject ( bed, 3000, 2185.88037, 1580.43262, 68.71986 ) end) تأكد من الاحداثيات + الاوبجكت اكتب الامر Open لفتح البوابة او التحريك
  11. abu5lf

    Find edit

    pList = guiCreateGridList ( 17, 59, 166, 327, false, WinSend ) column = guiGridListAddColumn ( pList, 'Player', 0.85 ) onUpdateMoneyPlayerList = function ( ) if ( column ) then for _, player in ipairs ( getElementsByType 'player' ) do local row = guiGridListAddRow ( pList ) guiGridListSetItemText ( pList, row, column, getPlayerName ( player ), false, false ) end elseif ( source == bahs ) then guiGridListClear ( pList ) local sName = guiGetText ( source ) if ( sName ~= '' ) then for _, player in ipairs ( getElementsByType 'player' ) do if string.find ( getPlayerName ( player ):lower ( ), sName:lower ( ), -1, true ) then local row = guiGridListAddRow ( pList ) guiGridListSetItemText ( pList, row, column, getPlayerName ( player ), false, false ) end end end end end addEventHandler ( 'onClientPlayerChangeNick', root, onUpdateMoneyPlayerList ) addEventHandler ( 'onClientPlayerQuit', root, onUpdateMoneyPlayerList ) addEventHandler ( 'onClientPlayerJoin', root, onUpdateMoneyPlayerList ) addEventHandler ( 'onClientResourceStart', resourceRoot, onUpdateMoneyPlayerList ) addEventHandler ( 'onClientGUIChanged', root, onUpdateMoneyPlayerList ) function click ( ) local row, col = guiGridListGetSelectedItem ( pList ) if ( row and col and row ~= -1 and col ~= -1 ) then local playerName = guiGridListGetItemText ( pList, row, col ) guiSetText ( plnmedit, playerName ) end end addEventHandler ( 'onClientGUIClick', pList, click )
  12. abu5lf

    Find edit

    onUpdateMoneyPlayerList = function ( ) local pName = getPlayerName ( localPlayer ) local column = guiGridListAddColumn ( pList, 'Player', 0.85 ) if ( column ) then for _, player in ipairs ( getElementsByType 'player' ) do local row = guiGridListAddRow ( pList ) guiGridListSetItemText ( pList, row, column, getPlayerName ( player ), false, false ) end addEventHandler ( 'onClientGUIClick', root, click ) -- where is click function? also, put in the start of function "if ( source == pList ) then" elseif ( source == bhsh ) then guiGridListClear ( pList ) local sName = guiGetText ( source ) if ( sName ~= '' ) then for _, player in ipairs ( getElementsByType 'player' ) do if string.find ( getPlayerName ( player ):lower ( ), sName:lower ( ), 1, true ) then local row = guiGridListAddRow ( pList ) guiGridListSetItemText ( pList, row, column, getPlayerName ( player ), false, false ) end end end end end addEventHandler ( 'onClientGUIClick', root, onUpdateMoneyPlayerList ) addEventHandler ( 'onClientPlayerChangeNick', root, onUpdateMoneyPlayerList ) addEventHandler ( 'onClientPlayerQuit', root, onUpdateMoneyPlayerList ) addEventHandler ( 'onClientPlayerJoin', root, onUpdateMoneyPlayerList ) addEventHandler ( 'onClientResourceStart', root, onUpdateMoneyPlayerList ) function click () local playerName = guiGridListGetItemText ( playerList, guiGridListGetSelectedItem ( playerList ), 1 ) guiSetText ( plnmedit, playerName ) end not work Edit: if ( string.find ( getPlayerName ( player ):lower ( ), sName:lower ( ), 1, true ) then ")" expected near "then"
  13. abu5lf

    Find edit

    What work did not work well
  14. abu5lf

    Find edit

    function onUpdateMoneyplayersList() playerName = getPlayerName ( getLocalPlayer() ) playerList = guiCreateGridList(17,59,166,327,false,WinSend) guiGridListSetSelectionMode(playerList,2) -- Create a players column in the list local column = guiGridListAddColumn( playerList, "Player", 0.85 ) 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 if ( source == bhsh ) then guiGridListClear ( playerList ); local sName = guiGetText ( source ); if ( sName ~= "" ) then for _, pPlayer in ipairs ( getElementsByType 'player' ) do if string.find ( getPlayerName ( pPlayer ):lower ( ), sName:lower ( ), 1, true ) then -- local row = guiGridListAddRow ( playerlist ); guiGridListSetItemText ( playerlist, row, column, getPlayerName ( pPlayer ), false, false ); end end end end end addEventHandler ( "onClientResourceStart", getRootElement(), onUpdateMoneyplayersList) addEventHandler("onClientPlayerJoin", getRootElement(), onUpdateMoneyplayersList) addEventHandler("onClientPlayerQuit", getRootElement(), onUpdateMoneyplayersList) addEventHandler("onClientPlayerChangeNick", getRootElement(), onUpdateMoneyplayersList) addEventHandler("onClientGUIChanged", getRootElement(), onUpdateMoneyplayersList) Find edit of the player is not working correctly
  15. abu5lf

    HUD Visible

    local ishudVisible = true bindKey (source,"i","down", function (key,state) if ishudVisible then showPlayerHudComponent ( source, "all", false ) ishudVisible = false else showPlayerHudComponent ( source, "all", true ) ishudVisible = true end end )
  16. abu5lf

    Level and EXP

    exports.scoreboard:addScoreboardColumn('exp') exports.scoreboard:addScoreboardColumn('level') levels = { [0] = {"Level 0", "10"}, [1] = {"Level 1", "20"}, [2] = {"Level 2", "100"}, [3] = {"Level 3", "150"}, [4] = {"Level 4", "200"}, [5] = {"Level 5", "5000"}, [6] = {"Level 6", "10000"}, [7] = {"Level 7", "20000"}, [8] = {"Level 8", "30000"}, [9] = {"Level 9", "40000"}, [10] = {"Level 10", "45000"}, [11] = {"Level 11", "50000"}, [12] = {"Level 12", "60000"}, [13] = {"Level 13", "70000"}, [14] = {"Level 14", "80000"}, [15] = {"Level 15", "95000"}, [16] = {"Level 16", "100000"}, [17] = {"Level 17", "150000"}, [18] = {"Level 18", "200000"}, [19] = {"Level 19", "250000"}, [20] = {"Level 20", "300000"}, } I want to show that level in the Scoreboard
  17. I'm sorry that it is working Thank you
  18. GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Window[1] = guiCreateWindow(417,300,467,219,"destroy",false) GUIEditor_Button[1] = guiCreateButton(37,119,148,54,"destroy",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(268,117,148,54,"x",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1], false) function hide(button, state, absoluteX, absoluteY) if ( source == GUIEditor_Button[2] ) then guiSetVisible(GUIEditor_Window[1], false) showCursor(false) guiSetInputEnabled(false) end end addEventHandler ("onClientGUIClick", getRootElement(),hide) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == GUIEditor_Button[1] ) then pCar = getPedOccupiedVehicle(getLocalPlayer()) triggerServerEvent("destroy",getLocalPlayer(),pCar) end end ) function oppenz() if guiGetVisible ( GUIEditor_Window[1] ) then guiSetVisible ( GUIEditor_Window[1], false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor_Window[1], true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F6","down",oppenz) addEvent("destroy",true) addEventHandler("destroy",root, function( theVehicle ) if ( isElement(theVehicle) and getElementType(theVehicle) == "vehicle" ) then destroyElement ( theVehicle ) local cx = math.random(15461,34641) givePlayerMoney ( source, tonumber(cx) ) outputChatBox ( "* destroy theVehicle ".. tonumber(cx) .."", source, 255, 0, 0 ) else outputChatBox ( "* Enter theVehicle ", source, 255, 0, 0 ) end end ) function hatmoter(source) local x,y,z = getElementPosition(source) theVehicle = createVehicle(500, x, y, z) warpPedIntoVehicle ( source, theVehicle ) end addCommandHandler ( "c", hatmoter ) It destroys vehicles freeroam I do not want it2
  19. server side : addEvent("destroy",true) addEventHandler("destroy",root, function( theVehicle ) if destroyElement ( theVehicle ) then local cx = math.random(15461,34641) givePlayerMoney ( source, cx ) outputChatBox ( "* destroy theVehicle ".. cx .."", source, 255, 0, 0 ) else outputChatBox ( "* Enter theVehicle ", source, 255, 0, 0 ) end end end ) client side : GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Window[1] = guiCreateWindow(417,300,467,219,"destroy",false) GUIEditor_Button[1] = guiCreateButton(37,119,148,54,"destroy",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(268,117,148,54,"x",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1], false) function hide(button, state, absoluteX, absoluteY) if ( source == GUIEditor_Button[2] ) then guiSetVisible(GUIEditor_Window[1], false) showCursor(false) guiSetInputEnabled(false) end end addEventHandler ("onClientGUIClick", getRootElement(),hide) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == GUIEditor_Button[1] ) then triggerServerEvent("destroy",getLocalPlayer()) end end ) It's not working to destroy the vehicle .
  20. abu5lf

    Player list

    Well,There are those who can help without full Code Show
×
×
  • Create New...