Jump to content

Mr.Mostafa

Members
  • Posts

    1,377
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Mr.Mostafa

  1. كدا ؟ @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 اي كود لون وش التحقق حقه ؟
  2. Database query failed : unrecognized token : "3ajel" غيرت اسم القاعدة واصلا صار المود مب شغال نهائي ومافي ديبق يطلع اصلا @N3xT طيب شوف اسحب علي القاعدة الحين كيف اسوي لو الشخص اسمه #ffffff ما يحط اسمه بالعاجل؟
  3. حاولت لكن كل الكود يعتبر مافي نقطة صح حاول تقولي كيف اصلحه 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 )
  4. لسا مب عارف اي شي عن هذا الكود / القاعدة طيب شوف بحاول - المحاولة شي حلو!
  5. سلام عليكم ابي مبرمج يسويلي بس لو رسترت العاجل - العاجل القديم الي كنت مسويه يضل زي ما هو ما يروح لان لسا اتدرب علي 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|>
  6. سلام عليكم حملت سيارة 28 ميجا ! كيف اخلي تحميلها مخفي - عشان ما يعلي تحميل السرفر
  7. debug = attempt to perform arithmetic on global ' number ' ( a nill value )
  8. اطرح سرفر مود الساعات حقك
  9. سلام عليكم ابي اسوي لو كتبت امر باف 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 )
  10. اضغط علي الكود نفسه بيطلع لك صفحة الويكي فيها امثلة وشرح وحاول ونساعدك ان شاء الله
  11. علي حد علمي !مثلا تبي لما شخص يكتب كلمة باف 8 ياخد فلوس لكن تبي شخص محدد لو كتبها ما ياخد الفلوس فا تروح تسوي if getPlayerSerial then return return = يعني يرجع وما يعطيه
  12. setTimer startResource stopResource
  13. لا عادي بس اتاكد من نكست
  14. تبدل كلمة source لــ root عشان تطلع الرسالة للكل
  15. 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
  16. -- # 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 )
  17. نفس المشكلة لازم دمج مع مود التاجات ؟
  18. سلام عليكم معي مود سبام لما يكرر يطلع رسالة والمفروض يمنع الرسالة انها تطلع لكن الرسالة تطلع عادي وش المشكلة 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 )
  19. كودك ما عرفت اظبطه
  20. ما بعرف اسويها دي ضض
  21. ليه ما قولتلي طيب ض1
×
×
  • Create New...