Jump to content

SAM!!

Members
  • Posts

    259
  • Joined

  • Last visited

Everything posted by SAM!!

  1. شباب معي مشكلة في خادمي كل اسماء السيرفرات العريبة تيجي كذا ؟؟؟؟؟؟ في حل
  2. السلام عليكم ورحمة الله اشتريت خادم وركبت لة لوحة اوبن قيم بانال بس اسوي سيرفر يجي كذا * Failed querying the server. الي يعرف حل يكلمني ولة هدية بس اريد اي سيرفر يسوية ينزل شغال تلقائي متحدث بأخر اصدار لو سمحتم
  3. شكرا ممكن تعمله لي وتسوي السيرفرات الي تريدها منة؟ لك حساب ادمن معي
  4. السلام عليكم معي خادم من يعرف يركب علية لوحة open game panel ؟
  5. @!#NssoR_) ذا ريان اكبر مشكلجي يسوي مشاكل مع الكل
  6. KhaledAlamri مايفتح الموقع
  7. بالتوفيق في الي هتعملة بعد MTA
  8. Rakan# Abdul KariM مشكورين
  9. بم بم بم بم بم بم بم بم
  10. @Abdul KariM @Abdul KariM @Rakan# مساعدة
  11. السلام عليكم ورحمه الله ابي اسوي مود شراء تاج وش الفنكشات الي بحتاجها ! يعني 2 ايديت بوكس واحد يكتب في التاج الي يبية والتاني يكتب فية اكواد االالوان ويضغط زر لو معة ملبغ محدد يعطية تاج وابي احط قائمة ممنوعات مثلا مايصير يسمي تاج باسم كونسل مثلا
  12. addEvent("Ranks:Buy1", true) addEventHandler("Ranks:Buy1", root, function() local Le3bA = getPlayerMoney(source) if Le3bA >= 250000 then local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local accountName = getAccountName(account) if not isObjectInACLGroup("user."..accountName, aclGetGroup("VIP")) then takePlayerMoney(source, 250000) aclGroupAddObject(aclGetGroup("VIP"), "user."..accountName) outputChatBox( "Account "..accountName.." succesfully added to the VIP group", source) outputChatBox("You're in VIP group Now.", source, 255, 0, 0, true) setTimer( function(accountName) aclGroupRemoveObject(aclGetGroup("VIP"),"user."..accountName) end,60000*5,1,accountName) else outputChatBox("You're already in VIP group.", source, 255, 0, 0, true) end else outputChatBox("You're not logged in.", source, 255, 0, 0, true) end else outputChatBox("You don't have $250000 to buy VIP", source, 255, 0, 0, true) end end ) @Rakan#
  13. Rakan# لا لا مابية لو طفي المود يختفي addEvent("Ranks:Buy1", true) addEventHandler("Ranks:Buy1", root, function() local Le3bA = getPlayerMoney(source) if Le3bA >= 250000 then local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local accountName = getAccountName(account) if not isObjectInACLGroup("user."..accountName, aclGetGroup("VIP")) then takePlayerMoney(source, 250000) aclGroupAddObject(aclGetGroup("VIP"), "user."..accountName) outputChatBox( "Account "..accountName.." succesfully added to the VIP group", source) outputChatBox("You're in VIP group Now.", source, 255, 0, 0, true) setTimer( function() aclGroupRemoveObject(aclGetGroup("VIP"),"user."..accountName) setTimer( function(accountName) end,60000*5,1,accountName) else outputChatBox("You're already in VIP group.", source, 255, 0, 0, true) end else outputChatBox("You're not logged in.", source, 255, 0, 0, true) end else outputChatBox("You don't have $250000 to buy VIP", source, 255, 0, 0, true) end end ) صح هيك قصدك؟
  14. Rakan# ممكن تسويلي تايمر اسبوع لاني سويتة وماظبط
  15. Rakan# لم تظبط ووالمود صار مايضيف اي شئ بالاسل اكواد سيرفر مود اللفل setTimer (function(player) local account = getPlayerAccount (player) if not (isGuestAccount (account)) then local accountData = getAccountData (account, "Level") if (accountData)then setElementData(player,"Money",accountData+99000) end end end,0,500) addEventHandler("onResourceStart", resourceRoot, function() DataBase = dbConnect("sqlite", "save.db") dbExec(DataBase, "CREATE TABLE IF NOT EXISTS LevelSystem1 (AccName, Level, XP)") for i, v in ipairs(getElementsByType("player")) do --[[if not ( isGuestAccount ( getPlayerAccount ( v ) ) ) then local SqlTable = dbPoll(dbQuery(DataBase, "SELECT * FROM LevelSystem1 WHERE AccName = ?", getAccountName(getPlayerAccount(v))), -1) if SqlTable and type(SqlTable) == "table" and #SqlTable > 0 then setElementData(v, "Level", SqlTable[1]["Level"]) setElementData(v, "xp", SqlTable[1]["XP"]) local account = getPlayerAccount(v) setAccountData(account, "Level", SqlTable[1]["Level"]) setAccountData(account, "xp", SqlTable[1]["XP"]) else setElementData(v, "Level", 1) setElementData(v, "xp", 0) local account = getPlayerAccount(v) setAccountData(account, "Level", 0) setAccountData(account, "xp", 0) end end]] local account = getPlayerAccount (v) if not (isGuestAccount (account)) then local accountData = getAccountData (account, "Level") local accountData2 = getAccountData (account, "xp") if (accountData) and (accountData2) then local playerLevel = getAccountData(account, "Level") local playerxp = getAccountData(account, "xp") setElementData(v,"Level",tonumber(playerLevel)) setElementData(v,"xp",tonumber(playerxp)) else setElementData(v,"Level",1) setElementData(v,"xp",0) end end end end ) addEventHandler("onResourceStop", resourceRoot, function() for i, v in ipairs(getElementsByType("player")) do if not ( isGuestAccount ( getPlayerAccount ( v ) ) ) then local SqlTable = dbPoll(dbQuery(DataBase, "SELECT * FROM LevelSystem1 WHERE AccName = ?", getAccountName(getPlayerAccount(v))), -1) if SqlTable and type(SqlTable) == "table" and #SqlTable > 0 then dbExec(DataBase, "UPDATE LevelSystem1 SET Level = ?, XP = ? WHERE AccName = ?",( getElementData( v, 'Level') or 0 ) ,( getElementData( v, 'xp') or 0 ), getAccountName(getPlayerAccount(v))) else dbExec(DataBase, "INSERT INTO LevelSystem1 ( Level,XP,AccName ) VALUES(?,?,?)", 1, 0, getAccountName(getPlayerAccount(v))) end end local account = getPlayerAccount (v) if not (isGuestAccount (account)) then local playerLevel = getElementData(v, "Level") or 0 local playerxp = getElementData(v, "xp") or 0 if playerLevel and playerxp then setAccountData(account,"Level",tonumber(playerLevel)) setAccountData(account,"xp",tonumber(playerxp)) end end end end ) addEventHandler( 'onPlayerLogin', root, function( _, acc ) --[[local SqlTable = dbPoll(dbQuery(DataBase, "SELECT * FROM LevelSystem1 WHERE AccName = ?", getAccountName(getPlayerAccount(source))), -1) if SqlTable and type(SqlTable) == "table" and #SqlTable > 0 then setElementData(source, "Level", SqlTable[1]["Level"]) setElementData(source, "xp", SqlTable[1]["XP"]) setAccountData(getPlayerAccount(source), "Level", SqlTable[1]["Level"]) setAccountData(getPlayerAccount(source), "xp", SqlTable[1]["XP"]) else setElementData(source, "Level", 1) setElementData(source, "xp", 0) setAccountData(getPlayerAccount(source), "Level", 1) setAccountData(getPlayerAccount(source), "xp", 0) end]] local account = getPlayerAccount (source) if not (isGuestAccount (account)) then local accountData = getAccountData (account, "Level") local accountData2 = getAccountData (account, "xp") if (accountData) and (accountData2) then local playerLevel = getAccountData(account, "Level") local playerxp = getAccountData(account, "xp") setElementData(source,"Level",tonumber(playerLevel)) setElementData(source,"xp",tonumber(playerxp)) else setElementData(source,"Level",1) setElementData(source,"xp",0) end end end ) addEventHandler('onPlayerQuit',root, function() if not ( isGuestAccount ( getPlayerAccount ( source ) ) ) then local SqlTable = dbPoll(dbQuery(DataBase, "SELECT * FROM LevelSystem1 WHERE AccName = ?", getAccountName(getPlayerAccount(source))), -1) if SqlTable and type(SqlTable) == "table" and #SqlTable > 0 then dbExec(DataBase, "UPDATE LevelSystem1 SET Level = ?, XP = ? WHERE AccName = ?",( getElementData( source, 'Level') or 0 ) ,( getElementData( source, 'xp') or 0 ), getAccountName(getPlayerAccount(source))) else dbExec(DataBase, "INSERT INTO LevelSystem1 ( Level,XP,AccName ) VALUES(?,?,?)", 1, 0, getAccountName(getPlayerAccount(source))) end --setAccountData(getPlayerAccount(source), "Level", ( getElementData( source, 'Level') or 0 )) --setAccountData(getPlayerAccount(source), "xp", ( getElementData( source, 'xp') or 0 )) end local account = getPlayerAccount (source) if not (isGuestAccount (account)) then local playerLevel = getElementData(source, "Level") or 0 local playerxp = getElementData(source, "xp") or 0 if playerLevel and playerxp then setAccountData(account,"Level",tonumber(playerLevel)) setAccountData(account,"xp",tonumber(playerxp)) end end end ) addEventHandler('onPlayerLogout',root, function() if not ( isGuestAccount ( getPlayerAccount ( source ) ) ) then local SqlTable = dbPoll(dbQuery(DataBase, "SELECT * FROM LevelSystem1 WHERE AccName = ?", getAccountName(getPlayerAccount(source))), -1) if SqlTable and type(SqlTable) == "table" and #SqlTable > 0 then dbExec(DataBase, "UPDATE LevelSystem1 SET Level = ?, XP = ? WHERE AccName = ?",( getElementData( source, 'Level') or 0 ) ,( getElementData( source, 'xp') or 0 ), getAccountName(getPlayerAccount(source))) else dbExec(DataBase, "INSERT INTO LevelSystem1 ( Level,XP,AccName ) VALUES(?,?,?)", 1, 0, getAccountName(getPlayerAccount(source))) end --setAccountData(getPlayerAccount(source), "Level", ( getElementData( source, 'Level') or 0 )) --setAccountData(getPlayerAccount(source), "xp", ( getElementData( source, 'xp') or 0 )) end local account = getPlayerAccount (source) if not (isGuestAccount (account)) then local playerLevel = getElementData(source, "Level") or 0 local playerxp = getElementData(source, "xp") or 0 if playerLevel and playerxp then setAccountData(account,"Level",tonumber(playerLevel)) setAccountData(account,"xp",tonumber(playerxp)) end end end ) addEventHandler("onPlayerWasted",root, function (_,killer) --[[if killer and killer ~= source and getElementType(killer) == "player" then setElementData(killer, "xp", (getElementData(killer, "xp") or 0) +1) setElementData(source, "xp", (getElementData(source, "xp") or 0) -1) setPlayerXp ( killer , (getPlayerXp ( killer ) + 9) ) isPlayerNextLevel ( player ) end]] local account = getPlayerAccount (source) if not (isGuestAccount (account)) then local playerLevel = getElementData(source, "Level") or 0 local playerxp = getElementData(source, "xp") or 0 if playerLevel and playerxp then setAccountData(account,"Level",tonumber(playerLevel)) setAccountData(account,"xp",tonumber(playerxp)) end end end) Marker = { } Timer = { } function showPlayerMarker (player) if Marker[player] then destroyElement(Marker[player]) Marker[player] = nil end local x, y, z = getElementPosition ( player ) Marker[player] = createMarker ( x , y , z -1, "cylinder", 1, math.random(255),math.random(255),math.random(255), 150 ) attachElements(Marker[player],player ,0,0,-1) Timer[player] = setTimer(function( pla ) setMarkerColor(Marker[pla],math.random(255),math.random(255),math.random(255),150) _, time,_ = getTimerDetails(Timer[player]) if time <= 1 then killTimer(Timer[player]) destroyElement(Marker[player]) Marker[player] = nil end end , 100,100 ,player) end addCommandHandler ( "xp", function (thePlayer,_,xp ) local name = getPlayerName(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then if tonumber(xp) <= 100 then for i, player in ipairs(getElementsByType("player")) do --setPlayerXp ( player , (getPlayerXp ( player ) + xp) ) setElementData( player, "xp", (getElementData( player, "xp") or 0 ) + xp) end else exports["guimessages"]:outputServer(thePlayer, "You can't send more than 100 XP", 255,100,100) end playSoundFrontEnd(root, 5) exports["guimessages"]:outputServer(root, "#65E3FCThe Manager #FFF700" .. name .. "#65E3FC Has Give All Players #15FF00[ #66AA0D".. xp .." #15FF00xp ]", 255,105,180) outputChatBox ( "#65E3FCThe Manager #FFF700" .. name .. "#65E3FC Has Give All Players #15FF00[ #66AA0D".. xp .." #15FF00xp ]", root, 255,105,180, true ) end end ) addCommandHandler ( "ADDXP", function (thePlayer,_,xp,namee ) local name = getPlayerName(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then if tonumber(xp) <= 100 then local playerFromName = getPlayerFromName(namee) if playerFromName then setElementData( playerFromName, "xp", (getElementData( playerFromName, "xp") or 0 ) + xp) playSoundFrontEnd(playerFromName, 5) exports["guimessages"]:outputServer(playerFromName, "#65E3FCThe Manager #FFF700" .. name .. "#65E3FC Has Give You #15FF00[ #66AA0D".. xp .." #15FF00xp ]", 255,105,180) outputChatBox ( "#65E3FCThe Manager #FFF700" .. name .. "#65E3FC Has Give You #15FF00[ #66AA0D".. xp .." #15FF00xp ]", playerFromName, 255,105,180, true ) exports["guimessages"]:outputServer(thePlayer, "You sent ".. xp .." to " .. namee .. "", 0,255,0) end else exports["guimessages"]:outputServer(thePlayer, "You can't send more than 100 XP", 255,100,100) end end end ) addCommandHandler ( "SETXP", function (thePlayer,_,xp,namee ) local name = getPlayerName(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then local playerFromName = getPlayerFromName(namee) if playerFromName then setElementData( playerFromName, "xp", xp) playSoundFrontEnd(playerFromName, 5) exports["guimessages"]:outputServer(playerFromName, "#65E3FCThe Manager #FFF700" .. name .. "#65E3FC Has Set Your Xp to #15FF00[ #66AA0D".. xp .." #15FF00xp ]", 255,105,180) outputChatBox ( "#65E3FCThe Manager #FFF700" .. name .. "#65E3FC Has Set Your Xp to #15FF00[ #66AA0D".. xp .." #15FF00xp ]", playerFromName, 255,105,180, true ) exports["guimessages"]:outputServer(thePlayer, "You Changed Xp for player " .. namee .. " to ".. xp .."", 0,255,0) end end end ) addCommandHandler ( "SETLEVEL", function (thePlayer,_,Level,n ) local name = getPlayerName(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then local playerName = getPlayerFromName(n) if playerName then setElementData( playerName, "Level", Level) playSoundFrontEnd(playerName, 5) exports["guimessages"]:outputServer(playerName, "#65E3FCThe Manager #FFF700" .. name .. "#65E3FC Has Set Your Level to #15FF00[ #66AA0D".. Level .." #15FF00 ]", 255,105,180) outputChatBox ( "#65E3FCThe Manager #FFF700" .. name .. "#65E3FC Has Set Your Level to #15FF00[ #66AA0D".. Level .." #15FF00 ]", playerName, 255,105,180, true ) exports["guimessages"]:outputServer(thePlayer, "You Changed Level for player " .. n .. " to ".. Level .."", 0,255,0) end end end ) addEventHandler("onElementDataChange",root, function (dataName, oldValue ) if dataName == "xp" then local account = getPlayerAccount (source) if account then isPlayerNextLevel ( source ) end end end) ------------------------------------------------------------------------------------------------- function setPlayerLevel ( player , Level ) setElementData( player, "Level", Level ) setAccountData(getPlayerAccount(player), "Level", Level) end function setPlayerXp ( player , xp ) setElementData( player, "xp", xp ) setAccountData(getPlayerAccount(player), "xp", xp) end function getPlayerLevel ( player ) return ( getElementData( player, "Level" ) or 0 ) end function getPlayerXp ( player ) return ( getElementData( player, "xp" ) or 0 ) end function isPlayerNextLevel ( player ) local xp = getPlayerXp ( player ) local Level = getPlayerLevel ( player ) if tonumber(Level) and tonumber(xp) and tonumber( xp ) >= tonumber( (Level*150) ) then setPlayerLevel ( player , (Level + 1) ) showPlayerMarker (player) local newLevel = Level+1 outputChatBox ( " [ "..getPlayerName ( player ).." ] Level up to [ Level "..newLevel.." ]",root, 0, 255, 0, true ) local TEAM = getPlayerTeam(player) if TEAM then OnServerSendMessage(player, "Level up "..newLevel.."", 0, 255, 0, 10000) end setTimer(function() setPlayerXp ( player , ( xp - (Level*150) ) ) end,500,1) end end ----------textAction-------------- function OnServerSendMessage(uPlayer, msg, r, g, b) if isElement(uPlayer) then triggerClientEvent(uPlayer, "OnSendMessage", uPlayer, msg, r, g, b) end end ---------------------------------- addCommandHandler ( "SCR", function (thePlayer,_, msg , r, g, b) local name = getPlayerName(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then local veve = { msg } local message = table.concat ( veve, " " ) triggerClientEvent(root, "OnSendMessage", root, message, r, g, b) end end )
  16. @Rakan# لو مشان الداتا فالداتا حق اللفل ابيها Level
  17. xAddToGroupFunction_ = function ( Group,Price,Level ) local account = getAccountName(getPlayerAccount(source)); if isGuestAccount(getPlayerAccount(source)) then return outputChatBox("#You must register first",source,255,0,0,true); end if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("#You have this rank, please choose another class",source,0,255,255,true); end ----------------------time--------------------------- local sValue = getElementData( source,'PlayTime' ) if not sValue then sValue = '0:0:0' end local data = split(sValue,':') local hour = tonumber( data[1] ) if hour == nil or not tonumber(hour) then hour = 0 end if ( hour >= tonumber(Price)) then ------------------------------------------------- ----------------------level--------------------------- local sValue = getElementData( source,'Level' ) if not sValue then sValue = 'Level' end local data = split(sValue,':') local Level = tonumber( data[1] ) if Level == nil or not tonumber(Level) then Level = 0 end if ( Level >= tonumber(Level)) then ------------------------------------------------- aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); outputChatBox("#Rank has been added successfully "..Name,source,255,0,0,true); else outputChatBox("#You do not have enough hours",source,0,255,255,true); end end addEvent("Accept:the:request",true) addEventHandler("Accept:the:request",root,xAddToGroupFunction_) ذي شرا رتب بالساعات واللفلات تقريبا الفلات خربانة يرجي التصحيح
×
×
  • Create New...