Jump to content

Mr.Mostafa

Members
  • Posts

    1,379
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Mr.Mostafa

  1. if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox("ADMIN :" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("King.Time")) then outputChatBox("#ff0033✱【⊰ #339933King Of Time #ff0033⊱】✱#FFFFFF" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then outputChatBox("#73dbff✱#ffffff【#ff96e7» #ffffffالــعــرب #ff96e7طــارات #7bdfff زائــر #ff96e7«#ffffff】#73dbff✱#ffffff" .. name .. ":"..color.." " .. text, root, 255, 255, 255, true) end end end addEventHandler("onPlayerChat", root, chatbox)
  2. وش الحل طيب
  3. كدا ؟ @N3xT addCommandHandler("AdminMsg", function ( player, cmd, ... ) if not ( isGuestAccount ( getPlayerAccount ( player ) ) ) then if ( isPlayerAdmin ( player ) ) then local msg = {...} local message = table.concat(msg, " ") setElementData ( resourceRoot, "Have_22", true ) setElementData ( resourceRoot, "Msg_22", message ) if ( getPlayerName(player) == "#ffffff" ) then setElementData ( resourceRoot, "By_22", getElementData ( player, "Name" )) else setElementData ( resourceRoot, "By_22", getPlayerName ( player )) end else outputChatBox("* You Are Not Admin !", player, 255, 0, 0, true) end else outputChatBox("* Please Login !", player, 255, 0, 0, true) end end) يب تمام ظبطت ان يجي الاسم مخفي لو اسمي #ffffff طيب كيف اخليه يجي مخفي لو اسمي فيه اي كود لون غير الابيض مثلا #ff0000 #ff00ff اي كود لون وش التحقق حقه ؟
  4. Database query failed : unrecognized token : "3ajel" غيرت اسم القاعدة واصلا صار المود مب شغال نهائي ومافي ديبق يطلع اصلا @N3xT طيب شوف اسحب علي القاعدة الحين كيف اسوي لو الشخص اسمه #ffffff ما يحط اسمه بالعاجل؟
  5. حاولت لكن كل الكود يعتبر مافي نقطة صح حاول تقولي كيف اصلحه executeSQLQuery("CREATE TABLE IF NOT EXISTS saveAm (3agel TEXT, name TEXT)") addCommandHandler("AdminMsg", function ( player, cmd, ... ) if not ( isGuestAccount ( getPlayerAccount ( player ) ) ) then if ( isPlayerAdmin ( player ) ) then local msg = {...} local message = table.concat(msg, " ") setElementData ( resourceRoot, "Have_", true ) setElementData ( resourceRoot, "Msg_", message ) executeSQLQuery("INSERT INTO saveAm(3agel,name) VALUES(?,?,?)", playerName ) if ( getElementData ( player, "Name" ) and getElementData ( player, "Name" ) ~= false ) then setElementData ( resourceRoot, "By_", getElementData ( player, "Name" )) else setElementData ( resourceRoot, "By_", getPlayerName ( player )) end else outputChatBox("* You Are Not Admin !", player, 255, 0, 0, true) end else outputChatBox("* Please Login !", player, 255, 0, 0, true) end end) addEventHandler("onResourceStart", root, function () executeSQLQuery("SELECT 3agel FROM saveAm WHERE name=?", playerName ) end )
  6. لسا مب عارف اي شي عن هذا الكود / القاعدة طيب شوف بحاول - المحاولة شي حلو!
  7. سلام عليكم ابي مبرمج يسويلي بس لو رسترت العاجل - العاجل القديم الي كنت مسويه يضل زي ما هو ما يروح لان لسا اتدرب علي executeSQLQuery وما اعرف لها زين - وشكرا كلنت local sX, sY = guiGetScreenSize () addEventHandler("onClientRender", root, function () if ( getElementData ( resourceRoot, "Have_" ) == true ) then local Lines = getChatboxLayout ()["chat_lines"] if ( Lines <= 10 ) then Lines = Lines + 1 elseif ( Lines >= 20 ) then Lines = Lines - 1 else Lines = Lines end if ( getElementData ( resourceRoot, "Msg_" ) == "ايقاف العاجل" ) then setElementData ( resourceRoot, "Have_", false ) else dxDrawText("Admin : ✱╚▶ ║ " .. getElementData ( resourceRoot, "Msg_" ).. " ║◄╝✱", 14 - 1, 194 - 1, 953 - 1, 212 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Admin : ✱╚▶ ║ " .. getElementData ( resourceRoot, "Msg_" ).. " ║◄╝✱", 14 + 1, 194 - 1, 953 + 1, 212 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Admin : ✱╚▶ ║ " .. getElementData ( resourceRoot, "Msg_" ).. " ║◄╝✱", 14 - 1, 194 + 1, 953 - 1, 212 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Admin : ✱╚▶ ║ " .. getElementData ( resourceRoot, "Msg_" ).. " ║◄╝✱", 14 + 1, 194 + 1, 953 + 1, 212 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Admin : ✱╚▶ ║ " .. getElementData ( resourceRoot, "Msg_" ).. " ║◄╝✱", 14, 194, 953, 212, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("".. getElementData ( resourceRoot, "By_" ) .."", 16 - 1, 213 - 1, 211 - 1, 232 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("".. getElementData ( resourceRoot, "By_" ) .."", 16 + 1, 213 - 1, 211 + 1, 232 - 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("".. getElementData ( resourceRoot, "By_" ) .."", 16 - 1, 213 + 1, 211 - 1, 232 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("".. getElementData ( resourceRoot, "By_" ) .."", 16 + 1, 213 + 1, 211 + 1, 232 + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("".. getElementData ( resourceRoot, "By_" ) .."", 16, 213, 211, 232, tocolor(145, 143, 143, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) end end end) bindKey("u", "down", "chatbox","AdminMsg") " .. getElementData ( resourceRoot, "Msg_" ).. " سيرفر local Groups = { "Console", "AdminMsg" } function isPlayerAdmin(player) for k,v in ipairs ( Groups ) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) ) then return true end end end addCommandHandler("AdminMsg", function ( player, cmd, ... ) if not ( isGuestAccount ( getPlayerAccount ( player ) ) ) then if ( isPlayerAdmin ( player ) ) then local msg = {...} local message = table.concat(msg, " ") setElementData ( resourceRoot, "Have_", true ) setElementData ( resourceRoot, "Msg_", message ) if ( getElementData ( player, "Name" ) and getElementData ( player, "Name" ) ~= false ) then setElementData ( resourceRoot, "By_", getElementData ( player, "Name" )) else setElementData ( resourceRoot, "By_", getPlayerName ( player )) end else outputChatBox("* You Are Not Admin !", player, 255, 0, 0, true) end else outputChatBox("* Please Login !", player, 255, 0, 0, true) end end) @+Source|>
  8. سلام عليكم حملت سيارة 28 ميجا ! كيف اخلي تحميلها مخفي - عشان ما يعلي تحميل السرفر
  9. debug = attempt to perform arithmetic on global ' number ' ( a nill value )
  10. اطرح سرفر مود الساعات حقك
  11. سلام عليكم ابي اسوي لو كتبت امر باف 8 يقولي الرقم 1 لو كتبته تاني يقولي الرقم 2 لو كتبته تاني يقولي الرقم 3 الخ محاولتي : المشكلة لما اكتب واكتبه تاني يكون 2 وما يتغير addCommandHandler ( "addnumber", function() local number = 1 outputChatBox("#00ff00* Script test :#ffffff Number is [ ".. number + 1 .." ] !",255,0,0, true) end )
  12. شوف الامثلة
  13. اضغط علي الكود نفسه بيطلع لك صفحة الويكي فيها امثلة وشرح وحاول ونساعدك ان شاء الله
  14. بداتا طيب ولا كيف
  15. علي حد علمي !مثلا تبي لما شخص يكتب كلمة باف 8 ياخد فلوس لكن تبي شخص محدد لو كتبها ما ياخد الفلوس فا تروح تسوي if getPlayerSerial then return return = يعني يرجع وما يعطيه
  16. setTimer startResource stopResource
  17. لا عادي بس اتاكد من نكست
  18. تبدل كلمة source لــ root عشان تطلع الرسالة للكل
  19. addEventHandler("onPlayerChat",getRootElement(),function(message) local acc = getPlayerAccount ( source ) if isGuestAccount ( acc ) then return outputChatBox('فضلا قم بتسجيل دخولك اولا للعب بالديربي', source, 255, 255, 255, true) end if tostring(message) == "ديربي" and checkDuel(source) == "prestart" and ( not checkExistPlrOnDuel(source) ) then سويتها كدا صارت اي رسالة من زاير تطلع له فضلا قم بتسجيل دخولك ! @N3xT
  20. -- # Client addEventHandler ( "onClientGUIClick" , root , function ( ) if source == button1 then showCursor(false) guiSetVisible(window,false) triggerServerEvent ( "removeAdminRank",localPlayer) end end ) -- # Server addEvent("removeAdminRank",true) addEventHandler("removeAdminRank",root, function() local accPlr = getPlayerAccount ( source ) local playerMoney = getPlayerMoney ( source ) local prize = 5000 -- سعر الرتبة if ( accPlr and not isGuestAccount ( accPlr ) ) then if ( playerMoney >= prize ) then if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( source ) ),aclGetGroup ("Admin") ) then aclGroupRemoveObject (aclGetGroup("Admin"), "user."..getAccountName(accPlr)) takePlayerMoney ( source, prize ) else outputChatBox("* Rank system : You don't have admin rank to remove it !", source, 255, 255, 255, true) end else outputChatBox("* Rank system : You don't have enough money !", source, 255, 255, 255, true) end else outputChatBox("* Rank system : You must register on account to remove your admin rank !", source, 255, 255, 255, true) end end )
  21. نفس المشكلة لازم دمج مع مود التاجات ؟
  22. سلام عليكم معي مود سبام لما يكرر يطلع رسالة والمفروض يمنع الرسالة انها تطلع لكن الرسالة تطلع عادي وش المشكلة addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() if chatTime[source] and chatTime[source] + tonumber(get("*chat/mainChatDelay")) > getTickCount() then outputChatBox("لا تحاول تكرر الكلام في الشات", source, 166, 255, 0 ) return else chatTime[source] = getTickCount() end if get("*chat/blockRepeatMessages") == "true" and lastChatMessage[source] and lastChatMessage[source] == msg then outputChatBox("لا تكرر نفس السطر مرتين", source, 166, 255, 0 ) return else lastChatMessage[source] = msg end end end )
  23. كودك ما عرفت اظبطه
  24. ما بعرف اسويها دي ضض
×
×
  • Create New...