Jump to content

#\_oskar_/#

Members
  • Posts

    570
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by #\_oskar_/#

  1. الاكواد اللي استخدمتها dbConnect + export
  2. كل واحد وتفكيره لو تبي تسويها له تفضل
  3. عشان يجيب اللوق من لوحة الادمن ويحطه باللوحه اللي سواها
  4. استخدم الداتا اسهل طريقه setElementData + getElementData + executeSQLQuery
  5. اتكلم عربي او روح صفحة الاجانب واطرح موضوعك
  6. addCommandHandler("قفل", function( plr ) local acc = getPlayerAccount( plr ) local accName = getAccountName ( acc ) if isGuestAccount(acc) then return end if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then if ( getElementData(plr, "ChatL") == true ) then setElementData(plr, "ChatL", false) outputChatBox("تم اغلاق العاجل",root,255,0,0,true) else setElementData(plr, "ChatL", true) outputChatBox("تم فتح العاجل",root,255,0,0,true) end else outputChatBox ("You ! :o",plr,255,255,255,true) end end) addCommandHandler("IM",function ( source,_,...) if ( getElementData(source, "ChatL") == false ) then return outputChatBox("مغلق",source,255,0,0,true) end local msg = table.concat({...} , " ") if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)),aclGetGroup ('Console')) or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)),aclGetGroup ('Msg')) or nil then setElementData(resourceRoot,"Msg_",msg) setElementData(resourceRoot,"Have_",true) setElementData(resourceRoot,"By_",getPlayerName(source)) else outputChatBox("انت لست ادمن",source,255,0,0,true) end end)
  7. Groups = { -- القروبات المسموح لها بالكتابة "Console", "AM", } -------------------- لا داعي لتعديل الأكواد تحت هذا السطر ------------------- function check ( thePlayer, commandName, ... ) if getElementData(resourceRoot,"oskar_") == 'false' then return outputChatBox('العاجل مغلق مؤقت',thePlayer,255,0,0,true) end local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) local veve = { ... } local message = table.concat ( veve, " " ) for i, v in ipairs ( Groups ) do if isObjectInACLGroup ( "user."..accName, aclGetGroup ( v ) ) then setElementData ( resourceRoot, "MessageAdmin", message); setElementData(resourceRoot,"PlrAdmin",getPlayerName(thePlayer)); SaveMessage ( ) triggerClientEvent ( "Bingo", getRootElement( ), getElementData ( resourceRoot, "MessageAdmin" ) ) end end end addCommandHandler( "AM", check ) addCommandHandler("MM",function (thePlayer,command,source) if source == 'false' then setElementData(resourceRoot,'oskar_','false') outputChatBox('تم قفل العاجل',thePlayer,255, 0, 0,true) elseif source == 'true' then setElementData(resourceRoot,'oskar_','true') outputChatBox('تم فتح العاجل',thePlayer,0, 255 , 0,true) end end) addEventHandler ( "onResourceStart", resourceRoot, function ( ) executeSQLQuery("CREATE TABLE IF NOT EXISTS SaveMessagee (Message, Server)") end ) addEvent ( "SetMessage", true ) addEventHandler ( "SetMessage", root, function ( ) getMessage ( ) end ) SaveMessage = function ( ) local msg = executeSQLQuery ( "SELECT * FROM SaveMessagee WHERE Server = '" .. getServerName ( ) .."'" ) if ( #msg ~= 0 ) then return executeSQLQuery("UPDATE SaveMessagee SET Message=? WHERE Server=? ", tostring ( getElementData ( resourceRoot, "MessageAdmin" ) ), getServerName ( ) ) else return executeSQLQuery("INSERT INTO SaveMessagee (Message,Server) VALUES(?,?)", tostring ( getElementData ( resourceRoot, "MessageAdmin" ) ), getServerName ( ) ) end end getMessage = function ( ) local msg = executeSQLQuery ( "SELECT * FROM SaveMessagee" ) if ( #msg ~= 0 ) then setElementData ( resourceRoot, "MessageAdmin", msg[1]["Message"] ) return setTimer ( triggerClientEvent, 1000, 1, "Bingo", getRootElement( ), getElementData ( resourceRoot, "MessageAdmin" ) ) else return setTimer ( triggerClientEvent, 1000, 1, "Bingo", getRootElement( ), " " ) end end اكتب ب اف 8 MM true >> مفتوح MM false >> مقفول
  8. وعليكم السلام المود لم يعجبني
  9. كيف الكود يشتغل بدون تحقق ؟ + اشك انه شغال اصلا
  10. local x,y,z = 0,0,100 -- حط احداثياتك هنا local size = 100 -- الحجم local C_ = createColRectangle (x,y,z,size) local R_ = createRadarArea (x,y,z,size,255,255,0,150,root) addEventHandler("onColShapeLeave",C_,function (e) if getElementType(e) == "player" then killPed(e) outputChatBox('لايمكنك الخروج',e,255,0,0) end end) كنت مسويه لك يرجعه مكانه بدل مايقتله حرام
  11. local x,y,z = 0,0,100 -- حط احداثياتك هنا local size = 100 -- الحجم local C_ = createColRectangle (x,y,z,size) local R_ = createRadarArea (x,y,z,size,255,255,0,150,root) addEventHandler("onColShapeLeave",C_,function (e) if getElementType(e) == "player" then local x,y,z = getElementPosition(e) setElementPosition (e,x-5,y-5,z) outputChatBox('لايمكنك الخروج',e,255,0,0) end end) جرب
  12. --#Client addEvent ( "Enablee", true ) addEventHandler ( "Enablee",root,function (e) guiSetEnabled ( thebest,e) end) --#Server addEventHandler("onPlayerLogin",root,function (e) for _,v in ipairs ('Console','Admin') do if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(source)), aclGetGroup (v[1]) ) then triggerClientEvent (source,"Enablee",source,true) end end end) addEventHandler("onPlayerLogout",root,function (e) triggerClientEvent (source,"Enablee",source,false) end) جرب
  13. مااعرف احداثيات مابك عشان اضبطها عليه انت حاول تضبط الاحداثيات
  14. local x,y,z = 0,0,100 -- حط احداثياتك هنا local size = 100 -- الحجم local C_ = createColRectangle (x,y,z,size) local R_ = createRadarArea (x,y,z,size,255,255,0,150,root) -- Useful function C(e,t,_,b,r,g) if getElementType(e) == "player" then toggleControl (e,"fire",_) toggleControl (e, "aim_weapon",_) outputChatBox(t,e,b,r,g) end end -- Enter addEventHandler("onColShapeHit",C_,function (e) C(e,'لا يمكنك استخدام الاسلحه',false,255,0,0) end) -- Leave addEventHandler("onColShapeLeave",C_,function (e) C(e,'الان يمكنك استخدام الاسلحه',true,0,255,0) end)
  15. مايحتاج كلنت الكود كله سيرفر انت بس حاول تسوي اي شئ
  16. createColRectangle onColShapeHit onColShapeLeave toggleControl الموضوع سهل جدا حاول تسويه
  17. وضح اكثر لان مافهمت طلبك
×
×
  • Create New...