-
Posts
636 -
Joined
-
Last visited
-
Days Won
6
Everything posted by HassoN
-
عفواً توني انتبه انه كان ناقص .png ع اخر الصورة !
-
حاطه جهة كلنت!؟
-
تاكد من مكان الصورة بالضبط ، تاكد انك حاطها بالميتا ، وشوف ال debugscript
-
status = true function startRendering() if (status) then dxDrawImage(266, 39, 807, 74, "img/logoo", 0, 0, 0, tocolor(255, 255, 255, 255), false) end end addEventHandler("onClientRender", root, startRendering) ? كان ناقصك الايفنت ، المرة الجاية لاتصور الكود لكن اكتبه عشان اعرف انسخه وما اكتب من اول
-
For whatever resource that uses a <settings></settings> in it, you could use the function "set" to modify its value from inside the game. For example if the setting's name is "keyBind" and it's used with the key "X" you could use something like this: set("keyBind", "Z") to change its value. You may check the example of the "set" function in the wiki of MTA as well.
-
بتضبط بس بذي الحالة استعمل guiSetVisible بدل الفاربل
-
Use set to modify meta.xml settings.
-
تقدر تسوي زي الحركة ذي status = true if (status) then dxDrawImage(...) end وخلاص بتختفي false خليه status و اول ما اللاعب يسجل دخوله ، يرسبن ، الخ ... روح حط ال فاربل حق
-
local ranksNumbers = { ["Console"] = 1, ["Console2"] = 2, ["Admins"] = 3, ["Admins1"] = 4, } function isRank(player,rank) local playerAccount = getPlayerAccount ( player ) local groups = aclGetAccountGroups( playerAccount) for i, v in ipairs(groups) do if ranksNumbers[v] then if (ranksNumbers[v] <= ranksNumbers[rank]) then status = true return status end end end if (not status) then return false end end function checkGroup(plr) local result = isRank(plr,"Console") outputChatBox(tostring(result)) end addCommandHandler("checkRank", checkGroup) function aclGetAccountGroups ( account ) local acc = getAccountName ( account ) if ( not acc ) then return false end local res = {} acc = "user."..acc local all = "user.*" for ig, group in ipairs ( aclGroupList() ) do for io, object in ipairs ( aclGroupListObjects ( group ) ) do if ( ( acc == object ) or ( all == object ) ) then table.insert ( res, aclGroupGetName ( group ) ) break end end end return res end لو انت كونسل وكتبت isRank(plr, "Console") بيرجع لك true ولو كتبت isRank(plr, "Console2") المفروض يرجع لك برضو true nil لكن لو العكس (انت كونسل 2 وكتبت كونسل العادي الي هو المفروض اعلى منك) راح يرجع لك
-
للبوست حقي فوقEdit ما ادري ليش ما اقدر اسوي بس المهم توني انتبه على كم غلط ثانين ف عدلتهم local ranks = { [1] = "Console", [2] = "Console2", [3] = "Admins", [4] = "Admins1", } vi = 0 function isRank(player,rank) local playerAccount = getPlayerAccount ( player ) if player and rank then for i, v in ipairs ( ranks ) do if v == rank then vi = i outputChatBox(tostring(i),root) end end for ii, vv in ipairs ( ranks ) do if ii < vi+1 then if ( isObjectInACLGroup ( "user."..getAccountName(playerAccount),aclGetGroup(vv) ) ) then outputChatBox(vv,root,255,0,0,true) rk = "true" end end end end if rk == "true" then return true else return false end end addCommandHandler("checkRank", function(source) local ra = isRank(source,"Console") if ra == true then outputChatBox("true") else outputChatBox("false") end end ) المفروض كذا يطلع لك فالشات كذا 1 Console true مع العلم اني للحين مو فاهم ايش تبي فيهم كذا
-
جرب local ranks = { [1] = {"Console"}, [2] = {"Console2"}, [3] = {"Admins"}, [4] = {"Admins1"}, } vi = 0 function isRank(player,rank) local playerAccount = getPlayerAccount ( player ) if player and rank then for i, v in ipairs ( ranks ) do if v == rank then vi = i outputChatBox(tostring(i),root) return end end for ii, vv in ipairs ( ranks ) do if ii < vi+1 then if ( isObjectInACLGroup ( "user."..getAccountName(playerAccount),aclGetGroup(vv) ) ) then outputChatBox(vv,root,255,0,0,true) rk = "true" end end end end if rk == "true" then return true else return false end end addCommandHandler("checkRank", function(source) local ra = isRank(source,"Console2") if ra == true then outputChatBox("true") else outputChatBox("false") end end )
-
Here's an example: -- Server side function fixColors(player) -- making a function local team = getPlayerTeam(player) -- getting player's team if team then -- checking if the player is in a team local r, g, b = getTeamColor(team) -- get the team's color setPlayerNametagColor(player, r, g, b) -- set player color to his team. end -- first if end end -- function end addCommandHandler("fix", fixColors) -- command
-
Try making the command on server side, check if player is not a guest then send a trigger to client side to open the menu.
- 1 reply
-
- 1
-
-
Use getPlayerTeam getTeamColor setPlayerNametagColor
-
بذي الحالة عندك حلين: 1. تستعمل hasObjectPermissionTo عشان تتحقق من خاصية معينة تكون عند كل الادمنية الي يقدرون يستعملون الكوماند حقك ، او العكس مثلا كونسل 1 عنده خاصية ماعندها الكونسل 2 ف تتحقق من وجودها او عدمه 2. بكل بساطة تسوي فنكشن يجيب رتبة اللاعب ويعطيه تلقائي كل الرتب الي اوطى منه
-
Try this -- client addEventHandler("onDgsMouseClick", root, function() if source == askbt1 then local text = DGS:dgsGetText(askEdit) playSoundFrontEnd(1) triggerServerEvent( "askPlayer", localPlayer, text) end end) -- server function askPlayer (text) outputChatBox ( "#DC143C[SYS] #ffffff["..hours..":"..minutes..":"..second.."] #FFA500ASK: #FFFFFF"..tostring(text), client, 255, 100, 200,true ) end addEvent("askPlayer",true) addEventHandler("askPlayer",root,askPlayer) I have basically just sent "text" with the trigger and received it with the function askPlayer (text) then used ..tostring(text) in the outputChatBox.
-
I'm not quiet sure that I understood you, do you mean like get text from dgsGetText and post it as an outputChatBox? if so: --client addEventHandler("onDgsMouseClick", root, function() if source == askbt1 then local text = DGS:dgsGetText(askEdit) playSoundFrontEnd(1) outputChatBox ("#DC143C[SYS] #ffffff["..hours..":"..minutes..":"..second.."] #FFA500ASK: #FFFFFF"..tostring(text), 255, 100, 200) end end) but that will only outputs to the player who triggered the event. If you want to show the message to everyone send it to server side.
-
ماني متأكد اني فهمتك بس اعتقد المفروض تعدل بالاسل نفسه ، تسوي اسل قروب للرتب وبعدها تضيفها وحدة وحدة ولا قصدك انه مثلا لو معك كونسل تبي يدخلك برضو قروب كونسل 2 ادمن وادمن 1؟
-
hassan.saad2000
-
افضل سيرفير حياة واقعية مطلوب سيرفير حياه واقعية
HassoN replied to mahmoudma180's topic in Arabic / العربية
CIT افضل سيرفر حياة واقعية هو mtasa://94.23.158.180:22003 https://cit2.net يدعم الغة العربية ، حط لغة العبة عربي من الاعدادات ثم ادخل وبتلاقي دعم عربي وادمنية عرب ، حياك الله