-
Posts
2,259 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Adham
-
local bind = 'F7' GUIEditor = { label = {} } -- -------cars cars ={ {"ferari",250,100000}, {"nisan",130,2000000}, } --------------- local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow((screenW - 563) / 2, (screenH - 622) / 2, 563, 622, "لوحة استئجار السيارات", false) guiWindowSetMovable(wnd, false) guiSetAlpha(wnd, 1.00) guiSetProperty(wnd, "CaptionColour", "C80AB9D3") guiSetVisible(wnd,false) grid = guiCreateGridList(9, 21, 263, 591, false, wnd) guiGridListAddColumn(grid, "the car", 0.5) guiGridListAddColumn(grid, "the price", 0.5) photo = guiCreateStaticImage(275, 27, 278, 179, "11.png", false, wnd) buy = guiCreateButton(278, 225, 275, 51, "استئجار السيارة", false, wnd) guiSetFont(buy, "default-bold-small") guiSetProperty(buy, "NormalTextColour", "C80AB9D3") light = guiCreateButton(278, 330, 275, 51, "تشغيل - اطفاء ضوء السيارة", false, wnd) guiSetFont(light, "default-bold-small") guiSetProperty(light, "NormalTextColour", "C80AB9D3") lock = guiCreateButton(278, 430, 275, 51, "قفل - فتح السيارة", false, wnd) guiSetFont(lock, "default-bold-small") guiSetProperty(lock, "NormalTextColour", "C80AB9D3") close = guiCreateButton(488, 557, 65, 55, "✖", false, wnd) guiSetFont(close, "default-bold-small") guiSetProperty(close, "NormalTextColour", "C81DB8C1") GUIEditor.label[1] = guiCreateLabel(288, 576, 179, 15, "this mod made by :- 1XxCr[o]sS", false, wnd) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 29, 184, 193) --------- bindKey (bind,'down', function () guiSetVisible (wnd,not guiGetVisible (wnd)) showCursor (guiGetVisible (wnd)) end) ------- addEventHandler("onClientGUIClick",resourceRoot, function ( ) if ( source == close ) then guiSetVisible(wnd,false) showCursor(false) end end ) for _, v in ipairs (cars) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid, Row, 1, v[1], false, false) guiGridListSetItemText(grid, Row, 2, v[2], false, false) guiGridListSetItemData ( grid, row, 1, v[2] ) end addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(grid) local id = unpack(guiGridListSetItemData(grid,row,1,v[2])) local money = unpack (guiGridListSetItemData(grid,row,2,v[3])) if ( source == buy ) then if sel ~= -1 then triggerServerEvent("givecar",source) end end end ) gc = {} addEvent("givecar",true) addEventHandler("givecar",root, if isElement (gc[Player]) then destroyElement end local x, y, z = getElementPosition(localPlayer) function gc[Player] = createVehicle (id, x, y, z) warpPedIntoVehicle(localPlayer,gc[Player]) takePlayerMoney(localPlayer,money) end)
-
bindKey ("m","down", function () triggerServerEvent ("check",localPlayer) end) addEvent ("openWND",true) addEventHandler ("openWND",root, function () guiSetVisible (wnd,not guiGetVisible (wnd)) showCursor (guiGetVisible (wnd)) guiSetInputEnabled (guiGetVisible(wnd)) end ) addEvent ("check",true) addEventHandler ("check",root, function () local acc = getAccountName (getPlayerAccount(source)) if not aclGetGroup ("Police Manager") then return outputChatBox ("cannot find 'Police Manager' acl group",source,255,5,5) end if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup("Police Manger")) then triggerClientEvent (source,"openWND",source) else return outputChatBox ("You're not police manager",source,255,5,5) end end)
-
ايوا بس فيه مشكله كلو عمل تمام لاما بكتب شي و بيعمل بيكون بعيد عندي يعني لازم اعمل الماوس عشان اجيب الكلام بعيدا عاوز اليكتب يكون قريبا الرساله
-
ما يطلع شي اللوحه تتفح عادي لاكن ما تعمل Send ولا شي ارجو تعملهوها
-
السلام عليكم انا سويت لوحه مود سبورت سيستم لاكن مش شغال ولا بيبعت كلنت GUIEditor = { tab = {}, tabpanel = {}, edit = {}, button = {}, label = {}, checkbox = {}, gridlist = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(67, 98, 680, 435, ":: Support Systeam ::", false) guiWindowSetSizable(wnd, false) guiSetVisible(wnd ,false) GUIEditor.button[1] = guiCreateButton(647, 23, 23, 19, "X", false, wnd) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.label[1] = guiCreateLabel(504, 411, 245, 24, "#Created By [L]e3bA | v3.4.1", false, wnd) guiLabelSetColor(GUIEditor.label[1], 253, 0, 0) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 18, 661, 390, false, wnd) GUIEditor.tab[1] = guiCreateTab("Live Chat", GUIEditor.tabpanel[1]) GUIEditor.gridlist[1] = guiCreateGridList(6, 5, 501, 316, false, GUIEditor.tab[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Message", 0.9) GUIEditor.edit[1] = guiCreateEdit(6, 322, 392, 27, "", false, GUIEditor.tab[1]) GUIEditor.button[2] = guiCreateButton(400, 322, 103, 28, "Send", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.checkbox[1] = guiCreateCheckBox(514, 325, 137, 15, "Show news in chat", false, false, GUIEditor.tab[1]) GUIEditor.gridlist[2] = guiCreateGridList(514, 5, 141, 314, false, GUIEditor.tab[1]) guiGridListAddColumn(GUIEditor.gridlist[2], "Support List", 0.9) end ) guiSetVisible (wnd, false) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( wnd, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F5", "down", OpenWin) ------------ addEventHandler("onClientGUIClick",resourceRoot, function ( ) if ( source == GUIEditor.button[1] ) then guiSetVisible(wnd,false) showCursor(false) end end ) -------------- addEvent("online",true) addEventHandler("online", root, function (name) local g = guiGridListAddRow(GUIEditor.gridlist[2]) guiGridListSetItemText(GUIEditor.gridlist[2],g, 1,""..name.."", false, false) end) -- addEventHandler("onClientGUIClick",GUIEditor.button[2],function () if guiGetText(GUIEditor.edit[1]) ~= '' then triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) end end, false) addEvent("sendmessage",true) addEventHandler("sendmessage",root, function() local gg = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],gg, 1,getPlayerName(localPlayer), false, false) guiGridListSetItemText(GUIEditor.gridlist[1],gg, 2,guiGetText(GUIEditor.edit[1]), false, false) guiGridListSetItemColor(GUIEditor.gridlist[1],gg, 1, 255, 0, 0, 255) guiGridListSetItemColor(GUIEditor.gridlist[1],gg, 2, 35, 254, 0, 255) if ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then outputChatBox("[support-System] #FF0000"..getPlayerName(localPlayer).."#FFFFFF : #00FF00"..guiGetText(GUIEditor.edit[1]),255,255,0,true) end end) addEvent("sendmessage2",true) addEventHandler("sendmessage2",root, function() local gg = guiGridListAddRow(GUIEditor.gridlist[2]) guiGridListSetItemText(GUIEditor.gridlist[2],gg, 1,getPlayerName(localPlayer), false, false) guiGridListSetItemText(GUIEditor.gridlist[2],gg, 2,guiGetText(GUIEditor.edit[1]), false, false) guiGridListSetItemColor(GUIEditor.gridlist[2],gg, 1, 255, 0, 0, 255) guiGridListSetItemColor(GUIEditor.gridlist[2],gg, 2, 35, 254, 0, 255) if ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then outputChatBox("[support-System] #FF0000"..getPlayerName(localPlayer).."#FFFFFF : #00FF00"..guiGetText(GUIEditor.edit[1]),255,255,0,true) end end) سرفر addEvent("refresh",true) addEventHandler("refresh",root,function () for k,v in ipairs (getElementsByType("player")) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)),aclGetGroup("Support")) ) then triggerClientEvent("online",source,getPlayerName(v)) end end end) addEvent("support",true) addEventHandler("support",root,function () if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)),aclGetGroup("Support")) ) then triggerClientEvent("sendmessage",) else triggerClientEvent("sendmessage2",source) end end)
-
كيف؟ كلنت ------------------------------------------ -- TopBarChat -- ------------------------------------------ -- Developer: Braydon Davis -- -- File: c.lua -- -- Copyright 2013 (C) Braydon Davis -- -- All rights reserved. -- ------------------------------------------ -- Script Version: 1.4 -- ------------------------------------------ local maxMessages = 5; -- The max messages that will show (on each bar) local DefaultTime = 8; -- The max time each message will show if time isn't defined. ------------------------------------------ -- For scripters only -- ------------------------------------------ local sx_, sy_ = guiGetScreenSize ( ) local sx, sy = sx_/1280, sy_/720 -- you got xXMADEXx's resolution :3 plz no hak mi local DefaultPos = true; local messages_top = { } local messages_btm = { } function sendClientMessage ( msg, r, g, b, pos, time ) -- Msg: String -- R: Int (0-255) -- G: Int (0-255) -- B: Int (0-255) -- Pos: Boolean -- Time: Int if ( not msg ) then return false end if ( pos == nil ) then pos = DefaultPos end local r, g, b = r or 255, g or 255, b or 255 local time = tonumber ( time ) or DefaultTime local data = { message = msg, r = r, g = g, b = b, alpha=0, locked=true, rTick = getTickCount ( ) + (time*1000) } --> Scripters note: --> The remove and intro fades are handled in the render event if ( pos == true or pos == "top" ) then table.insert ( messages_top, data ) return true elseif ( pos == false or pos == "bottom" ) then table.insert ( messages_btm, data ) return true end return false end addEvent ( getResourceName ( getThisResource ( ) )..":sendClientMessage", true ) addEventHandler ( getResourceName ( getThisResource ( ) )..":sendClientMessage", root, sendClientMessage ) function dxDrawNotificationBar ( ) local doRemove = { top = { }, bottom = { } } -- This is used so it prevents the next message from flashing -- Top Message Bar for i, v in pairs ( messages_top ) do local i = i - 1 if ( not v.locked ) then v.alpha = v.alpha - 3 if ( v.alpha <= 20 ) then table.insert ( doRemove.top, i+1 ) end messages_top[i+1].alpha = v.alpha else if ( v.alpha < 160 ) then v.alpha = v.alpha + 1 messages_top[i+1].alpha = v.alpha end if ( v.rTick <= getTickCount ( ) ) then v.locked = false messages_top[i+1].locked=false end end dxDrawRectangle ( (sx_/2-530/2), i*25, 530, 25, tocolor ( 0, 0, 0, v.alpha ) ) dxDrawText ( tostring ( v.message ), 0, i*25, sx_, (i+1)*25, tocolor ( v.r, v.g, v.b, v.alpha*1.59375 ), sy*1, "default-bold", "center", "center") end if ( #messages_top > maxMessages and messages_top[1].locked ) then messages_top[1].locked = false end -- Bottom Message Bar for i, v in pairs ( messages_btm ) do if ( not v.locked ) then v.alpha = v.alpha - 3 if ( v.alpha <= 20 ) then table.insert ( doRemove.bottom, i ) end messages_btm[i].alpha = v.alpha else if ( v.alpha < 160 ) then v.alpha = v.alpha + 1 messages_btm[i].alpha = v.alpha end if ( v.rTick <= getTickCount ( ) ) then v.locked = false messages_btm[i].locked=false end end dxDrawRectangle ( (sx_/2-530/2), sy_-(i*25), 530, 25, tocolor ( 0, 0, 0, v.alpha ) ) dxDrawText ( tostring ( v.message ), 0, sy_-(i*25), sx_, sy_-((i-1)*25), tocolor ( v.r, v.g, v.b, v.alpha*1.59375 ), sy*1, "default-bold", "center", "center") end if ( #messages_btm > maxMessages and messages_btm[1].locked ) then messages_btm[1].locked = false end -- handle message removes if ( #doRemove.top > 0 )then for i, v in pairs ( doRemove.top ) do table.remove ( messages_top, v ) end end if ( #doRemove.bottom > 0 ) then for i, v in pairs ( doRemove.bottom ) do table.remove ( messages_btm, v ) end end end addEventHandler ( "onClientRender", root, dxDrawNotificationBar ) ------------------------------ -- For development -- ------------------------------ addCommandHandler ( 'rt', function ( ) for i=1, 5 do sendClientMessage ( "Testing - Index ".. tostring ( i ), 255, 255, 255, false ) sendClientMessage ( "Testing - Index ".. tostring ( i ), 255, 255, 255, true ) end end ) سرفر - ------------------------------------------ -- TopBarChat -- ------------------------------------------ -- Developer: Braydon Davis -- -- File: s.lua -- -- Copyright 2013 (C) Braydon Davis -- -- All rights reserved. -- ------------------------------------------ local rName = getResourceName ( getThisResource ( ) ) function sendClientMessage ( msg, who, r, g, b, pos, time ) if ( msg and who ) then if ( isElement ( who ) ) then triggerClientEvent ( who, rName..":sendClientMessage", who, msg, r, g, b, pos, time ) return true else return false end else return false end end addEventHandler ( "onPlayerJoin", root, function ( ) sendClientMessage ( '* '..getPlayerName ( source )..'has join the [Alex]', root, 48, 144, 199, true) end ) addEventHandler ( 'onPlayerQuit', root, function ( tp, reason, respons ) if ( tp == 'Kicked' or tp == 'Banned' ) then msg = '['..tp..' - '..respons..'] ('..reason..')' else msg = '['..tp..']' end sendClientMessage ( "* "..getPlayerName ( source ).." has quit. "..msg, root, 255, 100, 100, true) end )
-
مشكور طيب انا عامل المود كدا الخط صغير عاوز الخط يكون كدا addEventHandler ( "onPlayerLogin", root,function () exports["TopBarChat"]:sendClientMessage("* [RentSysteam] " .. getPlayerName(source) .. " Has logged in | قام بتسجيل دخوله",root,255,255,0,true) end) http://a.top4top.net/p_928oaz1.png
-
سلام عليكم اليوم عملت مود اليدخل السرفر يجيلو في الشات قام اللاعب بتسجيل دخوله انا عامل اليجي اسم اللاعب وما بتعمل في الشات خالص من ساعت ما حتيت كود getplayername function arabs( ) -- الوظيفة outputChatBox("* [RentSysteam]" .. getPlayerName(player)) Has logged in | قام بتسجيل دخوله") --s ستلاحظ بـ أن كلمة " مرحباً بك " ظهرت في الشات عند دخول الاعب end addEventHandler("onPlayerJoin", root, arabs) -- .الحدث مع اسم الوظيفة
-
تقصد ؟ اه يعني تبي تحط صوره مكان الوحه ضيف المود بقروب الادمن الاول
-
addEventHandler("onClientGUIChanged",root, function () if ( source == edit ) then local text = guiGetText(edit) if ( text == "" ) then putAllPlayersInList() else guiGridListClear(grid) for i,v in ipairs(getElementsByType("player")) do local name = getPlayerName(v) if string.find(name,text) then local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,name,false,false) guiGridListSetItemColor(grid,row,1,255,255,0) end end end end end )
-
استعمل . guiGridListClear وانشالله بتعمل
-
يعني ما فهمت عليك غير انك تغير الشكل بتاعها؟ كيف يعني؟
-
انت شتبي تساوي بظبت =؟
-
شبأب هوا يقصد هوا عامل لوحه مثلن تفتح ب "ف8" و عمل قريد ليست فيها وراح كلينت وعمل جدول وحط الكود ذا for _, v in ipairs (car) do local Row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], Row, 1, v[1], false, false) guiGridListSetItemText(GUIEditor.gridlist[1], Row, 2, v[2], false, false) end وعاوز اليضعط علي واحده منهم يجيلو سياره فا لازم يعمل داتا يشوف الشرح فوق القلتلو له وانشالله يستفيد car { {"NameCar",ID}, {"Camry2016",15}, }
-
اخوي لازم تسوي داتا لكل رو الحين مب مقسم انت لاكثر من اريقومنت مثلا local table = { ["Le3bA"123}, ["Adham"123}, } الارقيومنت الاول فيه اسمي التاني في رقم نفس الشي ب السيارات الاول فيه اسم السياره التانيه فيها الاي دي مثال -- local table { {"NameCar",ID}, } اول شي الريقومنت الاول سترونق ستنروق يعني كذا " " بين ذول العلامتين وهذا اسم السياره والبعده اي دي لازم تحد داتا للاي دي علشان يوم يطق علي السياره ينتقل فهمت؟
-
سلام عليكم اليوم انا ركبت مود الحلبه العناد حاطه اليروح ويمشي علي العلامه الصفرا وياخد فلوس فيه مشكله عندي ؟ الفلوس بتيجي فوق عند الدم عادي بتزيد لاكن في تاب مش بتزيد ؟ ايه المشكله؟