Leaderboard
Popular Content
Showing content with the highest reputation on 05/07/17 in all areas
-
2 points
-
إس كيو لايت قراءة عن إس كيو لايت في الموسوعة الحرة ويكيبيا : ( شرح مختصر ) هو حفظ المعلومات التي توجد في السيرفر مثلاً, تريد حفظ مال اللاعب وشخصيته وملابسه والخ .. السلام عليكم ورحمة الله وبركاته :أولاً شرح استخدام إس كيو لايت ملاحظة هامة: اس كيو لايت هو فقط في السيرفر وليس في الكلنت كان إس كيو لايت في الام تي اي سابقاً له وظائف متعددة مثل ExecuteSQLSelect ExecuteSQLUpdate ExecuteSQLCreateTable ExecuteSQLInsert ExecuteSQLDropTable ExecuteSQLDelete ExecuteSQLQuery الخ .. وكما نلاحظ في الويكي في كل من هذه الوظائف هذا التحذير في الويكي This function is deprecated. This means that its use is discouraged and that it might not exist in future versions. Please use executeSQLQuery instead. See the examples at executeSQLQuery for equivalent SELECT usage هذه الوظائف تم إهمالها لأسباب متعددة وربما لن تعد تصلح للنسخ الجديدة من الام تي اي, ولقد اختصروهم الى وظيفة واحدة وهي executeSQLQuery وهذه عبارة عن كوليمن و رو, تماماً مثل القريد لست ووظيفتها ترجع لجدول يحمل الكوليمن والرو مثل هذا الشكل { { colname1=value1, colname2=value2, ... }, { colname1=value3, colname2=value4, ... }, ... } (SELECT ملاحظة : الوظيفة ترجع جدول اذا كنت تريد ان تخرج النتيجة باستخدام) :ثانياً executeSQLQuery الأمثلة على وظائف ملاحظة : هذه (`) يمكن اختيارياً ان تستخدم في احاطة الجدول او اسماء الرو في قوسين {} executeSQLCreateTable المثال المماثل للوظيفة هذه الوظيفة تصنع جدول اذا لم يكن موجود executeSQLQuery("CREATE TABLE IF NOT EXISTS players (clothes_head_texture TEXT, clothes_head_model TEXT, name TEXT)") executeSQLQuery("CREATE TABLE IF NOT EXISTS `players` (`clothes_head_texture` TEXT, `clothes_head_model` TEXT, `name` TEXT)") -- executeSQLQuery("CREATE TABLE IF NOT EXISTS اسم الجدول (tاسم الكوليمن TEXT, tاسم الكوليمن2 TEXT, t اسم الكوليمن3 TEXT)") هذه نوع من انواع المعلومات في الاس كيو لايت, انواع معلومات الاس كيو لايت تجدها هنا TEXT بعضكم يستفسر ما هي executeSQLDelete المثال المماثل للوظيفة هذه الوظيفة تحذف رو من الجدول executeSQLQuery("DELETE FROM players WHERE name=?", playerName) executeSQLQuery("DELETE FROM `players` WHERE `name`=?", playerName) -- executeSQLQuery("DELETE FROM اسم الجدول WHERE اسم الرو=?", playerName) executeSQLDropTable المثال المماثل للوظيفة هذه الوظيفة تحذف الجدول, اذا الجدول لم يكن موجود هذه الوظيفة لا تفعل شيء executeSQLQuery("DROP TABLE players" ) executeSQLQuery("DROP TABLE `players`" ) -- executeSQLQuery("DROP TABLE اسم الجدول" ) executeSQLSelect المثال المماثل للوظيفة هذه الوظيفة تسترجع رو من جدول executeSQLQuery("SELECT * FROM players WHERE name=?", playerName ) executeSQLQuery("SELECT * FROM `players` WHERE `name`=?", playerName ) -- executeSQLQuery("SELECT * FROM اسم الجدول WHERE اسم الكوليمن=?", "t اسم الرو") بعضكم يستفسر ما هي هذه * هذه تختار كل الكوليمن التي بالجدول واذا تريد ان تضع اسم الكوليمن تحديداً ضعه واذا كانت عدة كوليمنات في جدول واحد ضع اسماءها هكذا "colName1, colName2, colName3" ( على حسب اسم الكوليمن ) executeSQLInsert المثال المماثل للوظيفة هذه الوظيفة تضيف رو للجدول executeSQLQuery("INSERT INTO players(name,color,sound) VALUES(?,?,?)", playerName, colorName, soundName ) executeSQLQuery("INSERT INTO `players`(`name`,`color`,`sound`) VALUES(?,?,?)", playerName, colorName, soundName ) -- executeSQLQuery("INSERT INTO اسم الجدول(tاسم الكوليمن1,tاسم الكوليمن2,tاسم الكوليمن3) VALUES(?,?,?)", playerName, colorName, soundName ) بعضكم يستفسر ما وظيفة ? هي اذا لم تريد ان تحدد اسم للرو واذا تريد افعل هكذا executeSQLQuery("INSERT INTO اسم الجدول(tاسم الكوليمن1,tاسم الكوليمن2,tاسم الكوليمن3) VALUES('اسم الرو1','tاسم الرو2','tاسم الرو3')") executeSQLUpdate المثال المماثل للوظيفة هذه الوظيفة تستخدم لتحديث رو او اكثر من رو executeSQLQuery("UPDATE players SET color='green',sound='somehead' WHERE name=?", playerName ) executeSQLQuery("UPDATE players SET color=?,sound=? WHERE name=?", colorName, soundName, playerName ) executeSQLQuery("UPDATE `players` SET `color`=?,`sound`=? WHERE `name`=?", colorName, soundName, playerName ) -- executeSQLQuery("UPDATE اسم الجدول SET كوليمن1 = ?,tكوليمن2 = ? WHERE name=?", colorName, soundName) والسلام عليكم ورحمة الله وبركاته1 point
-
Hey, I'm one of the staff members from Ardic. Just thought I'd make a post, maybe get us some players. We're a relatively new RP server, looking to actually RP, unlike most servers. We try our hardest to enforce RP, and hope to keep it that way. The server itself is set in Fort Carson for now, but we'll expand the 'RP Zone' as the playerbase grows. We're trying to avoid ghost towns, which is why we thought about doing it like this. We're still a small server, so if you think you have the time to hop on and RP for a bit, feel free to. Also, our forums will be up relatively soon. mtasa://81.7.14.138:22005 -Ardic Gaming Staff Team1 point
-
local names = { ["Admin"] = "Tulajdonos", ["LathatatlanAdmin"] = "Tulajdonos", ["FoAdmin"] = "FőAdmin", ["LFoAdmin"] = "FőAdmin", ["Adminseged"] = "AdminSegéd", ["LathatatlanAdminseged"] = "AdminSegéd", ["KisAdmin"] = "Admin", ["Fejleszto"] = "Fejlesztő", ["Moderator"] = "Moderátor", ["LathatatlanModi"] = "Moderátor" } function adminuzi(thePlayer, commandName, ...) for i,v in pairs(getElementsByType( "player" )) do for group, serverGroupName in pairs( names ) do if isGuestAccount( getPlayerAccount( v ) ) then return end if group then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup( group ) then message = table.concat({...}, " ") groupName = names["group"] outputChatBox("#0088FF["..groupName.."]#d8001f "..getPlayerName(thePlayer)..": "..message,v,0,0,0,true) end end end end end addCommandHandler("asay", adminuzi) Should work.1 point
-
1 point
-
emoticons = { {":D", "laugh"}, {":(", "sad"} } function checkMessage(message) for i=1,#emoticons do if string.find(message, emoticons[i][1]) then message:gsub(emoticons[i][1], emoticons[i][2]) end end end checkMessage("Testing message :D") something like this?1 point
-
1 point
-
1 point
-
لالغاء التكرار ادخل ملف fr_server.lua جوا مود الفري روم ودور علي الكلام دا و احذفه addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox(getPlayerName(source) .. ': #FFFFFF' .. msg:gsub('#%x%x%x%x%x%x', ''), g_Root, r, g, b, true) outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) end end )1 point
-
1 point
-
1 point
-
1 point
-
local names = { ["Admin"] = "Tulajdonos", ["Moderator"] = "Moderátor" } function adminuzi(thePlayer, commandName, ...) for i,v in pairs(getElementsByType( "player" )) do for group, serverGroupName in pairs( names ) do if isGuestAccount( getPlayerAccount( v ) ) then return end if group then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup( group ) then message = table.concat({...}, " ") groupName = names["group"] end end end end outputChatBox("#0088FF["..groupName.."]#d8001f "..getPlayerName(thePlayer)..": "..message,getRootElement(),0,0,0,true) end addCommandHandler("asay", adminuzi) If this^ doesn't work try making it: groupName = names[group] or groupName = names["'"..group.."'"]1 point
-
@Dutchman101 is correct. MTA uses a client-server system, so player IP's are not shared.1 point
-
The problem is caused by Linux filenames being case-sensitive. e.g. radar is not loading because meta.xml contains 'cursor.lua' but the file is actually called 'Cursor.lua' Fix all the filename errors shown at starup, and try again1 point
-
1 point
-
The log says it couldn't find some resources. Are they at the right place and not in a subfolder? Is there a correct meta.xml? (I assume there is as it worked on your Windows) Try to replace resources lines @ mtaserver.conf from your Windows server. Check if you have correct CHMOD permissions.1 point
-
Are all of those resources specified in mtaserver.conf?1 point
-
1 point
-
Oh, okey, i'll change that. local names = { ["Admin"] = "Tulajdonos", ["Moderator"] = "Moderátor" } function adminuzi(thePlayer, commandName, ...) for i,v in pairs(getElementsByType( "player" )) do for group, serverGroupName in pairs( names ) do if isGuestAccount( getPlayerAccount( v ) ) then return end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup( group ) then local message = table.concat({...}, " ") outputChatBox("#0088FF["..serverGroupName.."]#d8001f "..getPlayerName(v)..": "..message,getRootElement(),0,0,0,true) end end end end addCommandHandler("asay", adminuzi)1 point
-
local names = { ["Admin"] = "Tulajdonos", ["Moderator"] = "Moderátor" } function adminuzi(thePlayer, commandName, ...) for i,v in pairs(getElementsByType( "player" )) do for group, _ in pairs( names ) do if isGuestAccount( getPlayerAccount( v ) ) then return end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup( group ) then local message = table.concat({...}, " ") outputChatBox("#0088FF["..group.."]#d8001f "..getPlayerName(v)..": "..message,getRootElement(),0,0,0,true) end end end end addCommandHandler("asay", adminuzi) It should work now.1 point
-
أتوقع اللاعب يقدر يغير الزر حق النفاثة من اعدادات اللعبة ولا؟ اذا غيره بيصير كودك بدون أي فايدة1 point
-
1 point
-
local names = { ["Admin"] = "Tulajdonos", ["Moderator"] = "Moderátor" } local players = {} function adminuzi(thePlayer, commandName, ...) for i,v in pairs(aclGroupList()) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer), v) then if aclGroupGetName(v) == "Everyone" then return end players[thePlayer] = aclGroupGetName(v) end end local message = table.concat({...}, " ") outputChatBox("#0088FF["..players[thePlayer].."]#d8001f "..getPlayerName(thePlayer)..": "..message,getRootElement(),0,0,0,true) end addCommandHandler("asay", adminuzi)1 point
-
تفضل هذا شرح من الاخ LOD https://www.youtube.com/watch?v=XBpgT6ZKOpA كان عليك فقط البحث !1 point
-
Pleas show all the startup lines from server.log1 point
-
Have you considered that they might of used createEffect to create an Effect attached to the position of the end of the hose? This seems like quite a complex script, take it from a fellow newbie at scripting, go for easy stuff and work your way up. Have you created a fireman job yet? If not I'd personally start there first, then add the awesome custom stuff later once you learned a little more about lua.1 point
-
1 point
-
@rusztamas All connected clients (players) establish a direct connection with the server (through winsock), basically your server's OS will have open connections corresponding to online players. But as all traffic is handled between client and server and server to (other) clients, I'm pretty sure clients cannot leak their IP's to eachother. But to be 100% sure and be freed of your worries, confirm my answer/get a better one by asking someone like @ccw ...1 point
-
This is my server. The gui is made by dgs. ( I am bad in design sry)1 point
-
1 point
-
1 point
-
@#_iMr.[E]coo مالها دخل بالاخير فيه تحققات جرب الكود هذا ويعتمد على كود انشاء السيارة addEventHandler ( "onVehicleStartEnter", getRootElement(), function ( player ) if ( Vehicle [ player ] ~= source ) then cancelEvent ( true , "مركبة خاصة" ) outputChatBox ( getCancelReason ( ) , player , 255 , 255 , 255 , true ) end end ) الكود شغال ومتأكد منه اذا ماضبط اطرح كود انشاء السيارة1 point
-
يوم تنزل سيارة حط داتا على السيارة وتكون القيمة الاعب الي نزلها وبعدين اول مايركب الاعب السيارة تحقق ان مايساوي الي عليه الداتا وكنسل الافنت1 point
-
انا لابغيت اسوي مولتي قيم اول شي وانا اشوفه شي اساسي بالمولتي قيم انك تخلي كل قيم في عالم وهمي وعن طريق العالم الوهمي تقدر تجيب الاعبين وتقدر تسوي الي تبيه لكن يوم تحوس بالداتا والتيبلات راح تواجه مشكلات فـ انصحك بالدمنشن setElementDimension getElementDimension وتقدر تسوي وظيفة تجيب الاعبين الي بالدمنشن بالتوفيق1 point
-
بمعنى يطلع لك السريال الي حددته من القريد ولا قيمة ثانية playerSerial تأكد من outputChatBox ( playerSerial )1 point
-
1 point
-
1 point
-
جرب المثال local screenW, screenH = guiGetScreenSize() t = coNdxLibCreateButton ( screenW * 0.2950, screenH * 0.5200, screenW * 0.3950, screenH * 0.0433 ) addEventHandler ( "onClientRender" , root , function ( ) coNdxLibDrawButton ( t ) end )1 point
-
function coNdxLibCreateButton(PosX,PosY,SizeX,SizeY,ButtonText,ButtonTextColor,ButtonColor,postGUI) local PosX,PosY,SizeX,SizeY = tonumber(PosX),tonumber(PosY),tonumber(SizeX),tonumber(SizeY) if PosX and PosY and SizeX and SizeY then local dxLibButtonElement = createElement("dxLibButton") if dxLibButtonElement then local dxButtonData = {} dxButtonData.PosX = PosX dxButtonData.PosY = PosY dxButtonData.SizeX = SizeX dxButtonData.SizeY = SizeY dxButtonData.ButtonText = ButtonText or "dxLibButton" dxButtonData.ButtonTextColor = ButtonTextColor or tocolor(255,255,255,240) dxButtonData.ButtonColor = ButtonColor or tocolor(220,220,220,250) dxButtonData.postGUI = postGUI or false outputDebugString( "dxLibElements , coNdxLibCreateButton Created Successfully ", 3 , 255, 150, 0 ) setElementData(dxLibButtonElement,"dxLibData",dxButtonData, false) return dxLibButtonElement end end end function coNdxLibDrawButton(dxLibButtonElement) if dxLibButtonElement then local drawData = getElementData(dxLibButtonElement,"dxLibData") if drawData and type(drawData) == "table" then PosX = drawData.PosX PosY = drawData.PosY SizeX = drawData.SizeX SizeY = drawData.SizeY ButtonText = drawData.ButtonText ButtonTextColor = drawData.ButtonTextColor ButtonColor = drawData.ButtonColor postGUI = drawData.postGUI dxDrawRectangle(PosX,PosY,SizeX,SizeY,ButtonColor,postGUI) dxDrawText(ButtonText,PosX+(SizeX/2), PosY + (SizeY/2), SizeX, SizeY, ButtonTextColor, 1.2, "default", "center", "center", true,false,postGUI,true) setElementData(dxLibButtonElement,"dxLibData",drawData,true) end end end1 point
-
1 point
