Jump to content

طلب تعديل بسيط


Dr.Xen

Recommended Posts

السلام عليكم ورحمة الله وبركاته ..

خميسكم فلههه

ابي تعديل يالمزززز .....

:D:D

عندي مود بس الفلوس حقت اللوحة ابي اخليها حقت القيم مود ..

addEvent("addMoney",true) 
addEvent("removeMoney",true) 
addEvent("ToServer",true) 
local w = {} 
addEventHandler("ToServer",root, 
function (word,get,time) 
 if word and tonumber(get) and tonumber(time) then 
table.insert(w,{word,get}) 
setTimer(function ()  
 for _,v in ipairs(w) do  
  if v[1] == word and v[2] == get then  
   table.remove(w,i)  
   end  
 end  
end,time*60*60*1000,1) 
end 
end 
) 
addEventHandler("getPlayerMoney",root, 
function (plr) 
 triggerClinetEvent(plr,"ToClient",plr,getPlayerMoney(plr)) 
end 
) 
addEventHandler("onConsole",root, 
function (msg) 
 for _,v in ipairs(w) do 
  if msg == v[1] then 
    local playeraccount = getPlayerAccount ( source ) 
    if ( playeraccount ) and not isGuestAccount ( playeraccount ) then 
     if not getAccountData ( playeraccount, "Money-"..msg) then  
      addPlayermoney(source,v[2]) 
      setAccountData( playeraccount, "Money-"..msg,true) 
    end 
   end 
  end 
 end 
end 
) 
addEventHandler("addMoney",root, 
function (to,money) 
 if to == "all" then 
  for _,v in ipairs(getElementsByType("player")) do 
   addPlayermoney(v,money) 
  end 
  else 
   plr = getPlayerFromName(to) 
    if plr then 
    addPlayermoney(plr,money) 
    end 
 end 
end 
) 
addEventHandler("removeMoney",root, 
function (to,money) 
 if to == "all" then 
  for _,v in ipairs(getElementsByType("player")) do 
   removePlayermoney(v,money) 
  end 
  else 
   plr = getPlayerFromName(to) 
    if plr then 
    removePlayermoney(plr,money) 
    end 
 end 
end 
) 
setTimer( 
function () 
 for _,v in ipairs(getElementsByType("player")) do 
  setElementData(v,"Money",getPlayerMoney(v)) 
  end 
end,50,0) 
 function addPlayermoney(plr,money) 
 money = math.floor(money) 
 givePlayerMoney(plr,money) 
 end 
  function removePlayermoney(plr,money) 
  money = math.floor(money) 
  takePlayerMoney(plr,money) 
 end 
Link to post
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...