-
Posts
95 -
Joined
-
Last visited
Everything posted by aBo.F[ra]G<3
-
ضبط يعطيكم العافيهه
-
الى طلبته ماحصلتهه بسس ذا اكواد الى بالسيرفر ---------------------- --------------- outputChatBox("Level System | #00FF00By Al3grab",root,255,255,0,true) outputDebugString("Level System By Al3grab | Started") --------------- --++-- rRoot = getResourceRootElement(getThisResource()) --++-- --NextPerx = 250 ----------- function restLevelData(player) if player then setElementData(player,"Level","Level 0") setElementData(player,"Exp",tonumber(0)) setElementData(player,"Next",tonumber(NextPerx)) end end addCommandHandler("restmylevel",function(plr) restLevelData(plr) end) addEventHandler("onPlayerJoin",root,function() restLevelData(source) end ) function saveLevelData(player) if player then hisAcc = getPlayerAccount(player) if hisAcc and ( not isGuestAccount(hisAcc) ) then Level = getElementData(player,"Level") Exp = getElementData(player,"Exp") Next = getElementData(player,"Next") if Level and Exp and Next then setAccountData(hisAcc,"Level",tostring(Level)) setAccountData(hisAcc,"Exp",tonumber(Exp)) setAccountData(hisAcc,"Next",tonumber(Next)) end end end end addEventHandler("onPlayerQuit",root,function() saveLevelData(source) end ) addEventHandler("onPlayerLogout",root,function(thePreviousAccount) player = source Level = getElementData(player,"Level") Exp = getElementData(player,"Exp") Next = getElementData(player,"Next") setAccountData(thePreviousAccount,"Level",tostring(Level)) setAccountData(thePreviousAccount,"Exp",tonumber(Exp)) setAccountData(thePreviousAccount,"Next",tonumber(Next)) setAccountData(thePreviousAccount,"pName",getPlayerName(source)) restLevelData(source) end ) function getLevelData(player) if not isElement(player) then player = source end hisAcc = getPlayerAccount(player) if hisAcc then Level = getAccountData(hisAcc,"Level") Exp = getAccountData(hisAcc,"Exp") Next = getAccountData(hisAcc,"Next") setAccountData(hisAcc,"pName",getPlayerName(player)) if Level and Exp and Next then setElementData(player,"Level",tostring(Level));setElementData(player,"Exp",tonumber(Exp));setElementData(player,"Next",tonumber(Next)) end end end addEventHandler("onPlayerLogin",getRootElement(),getLevelData) --------------------------------------------------------------------- function setUp() exports.scoreboard:scoreboardAddColumn("Level") exports.scoreboard:scoreboardAddColumn("Exp") exports.scoreboard:scoreboardAddColumn("Next") -- for k,v in ipairs ( getElementsByType("player") ) do -- getLevelData(v) end --[[ local lr = getResourceFromName("LoginRegister") if lr then st = getResourceState(lr) if st == "loaded" then startResource(lr) end end --]] -- key = get("Key") NextPerx = get("LevelNext") randomFrom,randomTo = get("RandomExpFrom"),get("RandomExpTo") if key and NextPerx and randomFrom and randomTo then setElementData(rRoot,"openKey",key) else for k=0,5 do outputChatBox("** Level System : Error in settings , resource might not work",root,255,0,0,true) end end end addEventHandler("onResourceStart",rRoot,setUp) --------------------------------------------------------------------- function plusExp(player) local hisExp = getElementData(player,"Exp") local random = math.random(randomFrom,randomTo) -- math.random(1,5) if random then setElementData(player,"Exp",hisExp+random) textOut(player,"+"..random.." Exp !",6,0,255,0,255,0.38,0.75,1.9) playSoundFrontEnd(player,40) saveLevelData(player) end end function plusLevel(player) local hisLevel = getElementData(player,"Level") if hisLevel then hisLevelNumber = gettok ( hisLevel, 2, string.byte(' ') ) setElementData(player,"Level","Level "..hisLevelNumber+1) end end function upgrade(player) if player then local hisNext = getElementData(player,"Next") local hisLevel = getElementData(player,"Level") if hisNext then setElementData(player,"Next",hisNext+NextPerx) ---------------------------------------------- textOut(player,"Up "..tostring(hisLevel).." !",10,255,255,0,255,0.38,0.88,4.2) triggerClientEvent(player,"Sound",player) triggerClientEvent(player,"showLevelWindow",player) setTimer(triggerClientEvent,10 * 1000 , 1 , player , "hideLevelWindow" , player ) outputChatBox("Congratulation's [ #FFFFFF"..getPlayerName(player).."#FF0000 ] You're up to #00FF00["..hisLevel.."] ",root,255,0,0,true) ---------------------------------------------- end end end --------------------------------------------------------------------- function onKill(ammo,killer) if ( killer ) and ( killer ~= source ) then local hisLevel = getElementData(killer,"Level") local hisExp = getElementData(killer,"Exp") local hisNext = getElementData(killer,"Next") if hisLevel and hisExp and hisNext then ----------------- plusExp(killer) ----------------- if tonumber(hisExp) > tonumber(math.floor(hisNext-1)) then plusLevel(killer) upgrade(killer) end end end end addEventHandler("onPlayerWasted",root,onKill) ---------------------------------------------------------------------- -- top 10 shit function redo10() TOP10 = sortAccounts() end setTimer(redo10,5000,1) setTimer(redo10,30 * 60 * 1000 , 0) function send10(plr) if not TOP10 then redo10() end for index, data in ipairs(TOP10) do local acName = getAccountData(data.account,"pName") or "N/A" if not getAccountData(data.account,"Exp") then setAccountData(data.account,"Exp",tonumber(0)) end local top1 = ( index == 1 and true or false ) triggerClientEvent(plr,"returnTop",plr,index,string.gsub(acName,'#%x%x%x%x%x%x', ''),data.points,data.level,top1) if index == 10 then break end end end addEvent("send10",true) addEventHandler("send10",root,redo10) function on10Request() send10(source) end addEvent("on10Request",true) addEventHandler("on10Request",root,on10Request) function sortAccounts() local rowdata = {} for index, account in pairs(getAccounts()) do rowdata[index] = { account = account, points = getAccountData(account,"Exp") or "N/A", level = getAccountData(account,"Level") or "N/A", } end local comp = function (a, b) return (tonumber(a.points) or 0) > (tonumber(b.points) or 0) end table.sort(rowdata, comp) setTimer(function(rowdata) rowdata = nil end , 5000 ,1,rowdata ) return rowdata end function textOut(Player,Text,Time,r,g,b,a,x,y,size) if ( Player and getElementType(Player) == "player" and tostring(Text) and tonumber(Time)) then newDisplay = textCreateDisplay() if newDisplay then newText = textCreateTextItem( tostring(Text), tonumber(x) or 0.4,tonumber(y) or 0.5,"medium",tonumber(r) or 255,tonumber(g) or 255,tonumber(b) or 255,tonumber(a) or 255,tonumber(size) or 2.0,"left","center",150) if newText then textDisplayAddText(newDisplay,newText) textDisplayAddObserver(newDisplay,Player) -- setTimer ( function ( Player , Display , Text ) if Player and Display and Text then textDestroyDisplay(Display) end end , Time * 1000 , 1 , Player , newDisplay , newText ) end end end end addEvent("textOut",true) addEventHandler("textOut",root,textOut) ----------------------------------------------------------------------
-
ي شباب معاد باقي الا الشغله ذي كملو جميلكم
-
ماراح يشتغل المود
-
--------------- --------------- --++-- rRoot = getResourceRootElement(getThisResource()) lp = getLocalPlayer() x,y = guiGetScreenSize() sw, sh = guiGetScreenSize() --++-- drawed = false function Draw(text,up,r,g,b,size,time) triggerServerEvent("textOut",localPlayer,localPlayer,text,time or 6,r or 255,g or 255,b or 0,255,0.38,0.85,size or 2.0) end ------------------------------------------------------------------ addEvent("Sound",true) addEventHandler("Sound",root,function() playSound("LevelUP.mp3") end ) ------------------------------------------------------------------ -- top 10 shit addEventHandler("onClientResourceStart",rRoot, function () triggerServerEvent("on10Request",lp) end ) function returnTop(num,pn,exp,lev,top1) guiGridListClear(top10grid) setTimer(function(top10grid) if num then row = guiGridListAddRow(top10grid) pNum = tostring(num) pName = tostring(pn) pExp = tostring(exp) pLev = tostring(lev) guiGridListSetItemText(top10grid, row, NumCol, pNum, false, false) guiGridListSetItemColor(top10grid, row, NumCol, 0,255,255) if top1 then guiGridListSetItemColor(top10grid, row, NumCol, 255,0,0) guiGridListSetItemText(top10grid, row, NumCol, pNum, true, true) end guiGridListSetItemText(top10grid, row, pNCol, pName, false, false) guiGridListSetItemColor(top10grid, row, pNCol,0,255,255) if top1 then guiGridListSetItemColor(top10grid, row, pNCol, 255,0,0) guiGridListSetItemText(top10grid, row, pNCol, pName, true, true) end guiGridListSetItemText(top10grid, row, ExpCol, pExp, false, false) guiGridListSetItemColor(top10grid, row, ExpCol, 0,255,255) if top1 then guiGridListSetItemColor(top10grid, row, ExpCol, 255,0,0) guiGridListSetItemText(top10grid, row, ExpCol, pExp, true, true) end guiGridListSetItemText(top10grid, row, LevCol, pLev, false, false) guiGridListSetItemColor(top10grid, row, LevCol, 0,255,255) if top1 then guiGridListSetItemColor(top10grid, row, LevCol, 255,0,0) guiGridListSetItemText(top10grid, row, LevCol, pLev, true, true) end end end,100,1,top10grid) end addEvent("returnTop",true) addEventHandler("returnTop",root,returnTop) top10grid = guiCreateGridList(435,427+5-10,407,188,false,wnd) guiSetVisible(top10grid,false) NumCol = guiGridListAddColumn(top10grid, "#", 0.13) pNCol = guiGridListAddColumn(top10grid, "Player Name", 0.40) LevCol = guiGridListAddColumn(top10grid, "Level", 0.20) ExpCol = guiGridListAddColumn(top10grid, "Exp", 0.20) function LevelSystem() local l,e,n = getElementData(lp,"Level") or "N/A",getElementData(lp,"Exp") or "N/A",getElementData(lp,"Next") or "N/A" dxDrawRectangle(488.0,260.0-10,300.0,360.5,tocolor(0,0,0,100),false) end function showLevelWindow() hideLevelWindow() guiMoveToBack(top10grid) guiSetAlpha(top10grid,tonumber(0.-- s8) -->) guiSetVisible(top10grid,true) addEventHandler("onClientRender",root,LevelSystem) end addEvent("showLevelWindow",true) addEventHandler("showLevelWindow",root,showLevelWindow) function hideLevelWindow() if guiGetVisible(top10grid) ~= false then removeEventHandler("onClientRender",root,LevelSystem) guiSetVisible(top10grid,false) end end addEvent("hideLevelWindow",true) addEventHandler("hideLevelWindow",root,hideLevelWindow) l = false bindKey(getElementData(rRoot,"openKey"),"down",function() if not l then l = true showLevelWindow() else hideLevelWindow() l = false end end ) -- fileDelete("LS-C.lua")
-
client او server
-
لا الميزه ذي من العقرب بالاساس كل ماتقتل ويجيك لفل تظهر اللوحه تلقاياا بس انا مابيها تظهر
-
بس في مشكل بسيطهه اذا جبت لفل اللوحه تظهر ذي http://im51.gulfup.com/Xxb8IU.png يعني كل ماجبت لفل تظهر اللوحه وروح اقفلها من اف 5 انا ابي اذا جبت لفل ماتظهر اتمنى فهمتني
-
الله يعطيك العاففيهه ي بعدي ضبط
-
جربتهاا بالشكل ذا addEventHandler("onZombieWasted",root,onKill) مانفع level مايزيد exp مايزيد ----------------- وجربتهاا بالشكل ذاا addEvent("onZombieWasted", true) addEventHandler("onZombieWasted",root,onKill) نفس الشي مايزيد
-
function onKill(ammo,killer) if ( killer ) and ( killer ~= source ) then local hisLevel = getElementData(killer,"Level") local hisExp = getElementData(killer,"Exp") local hisNext = getElementData(killer,"Next") if hisLevel and hisExp and hisNext then ----------------- plusExp(killer) ----------------- if tonumber(hisExp) > tonumber(math.floor(hisNext-1)) then plusLevel(killer) upgrade(killer) end end end end addEventHandler("onPlayerWasted",root,onKill)
-
لفل العقرب عندي مو مشفر
-
محد افادني الى يعرف لا يبخلل ابي استخدم لفل العقرب على الزومبي بس مااضبط وش الحل
-
ضفني سكايبي لاهنت ..
-
لا ي بعدي انا علتي بسيطهه ابي تضيف الكود على لفل العقرب ابي اذا قتلت زومبي يجي لفل لاهنت ي بعدي اذا الدعوهه مطوله ضفني سكايبي salman83511
-
ابي الحل ي شباب لا هنتو
-
واحد عطاني الكود ذا يقول ضيفه بالمود وجرب اقتل زومبي ==================================== جربت ركبته المود معاد يشتغل ياليت تفيدني .. -------------
-
العرب مع الواجهه مجانا MTA للبيع استايل
aBo.F[ra]G<3 replied to ' ρяofзśŝoя 亗's topic in القسم العام
بالتوفيق -
السلام عليكم ي شباب انا ابي استخدم اللفل حق العقرب على الزومبي بس اللفل مايزيد ماضبط ابي الكود + وين اضيفه بأي ملف لاهنتوو
-
السلام عليكم ي شباب ابي كود بـ مجرد ماضغط على الزر يخفي الشات واضغط مره ثانيه يظهر الشات ابي الكود كامل لاهنتوو
-
ضفني سكايبي salman83511
-
السسلام عليكم ي شباب ابي كود سياره انا سويت لوحه وابي بمجرد ماضغط على الزر تظهر سياره بدون فلوس مع كود اذا انفجرة تختفي -------------
-
تـم الأفاده يعطيك العافيه ي shwaeki
-
ضفني سكايبي ي shwaeki skybe: salman83511