Jump to content

setPlayerMoney


Recommended Posts

آلسسلآمم عليكمم ,

آنآ عندي ممود يوزع ع جميع لآععبي آلسسيرففر ففلوس ,

بـ كوممند ,

آبي إذآ

كتبت ممثلآ

aze

يتحول التوزيع تلققآئي من غير مآ آكتب بـ كومند !

وآلففلوس تتوزع كل 10 دققآيقق ..

وششش آلففنكشنآت ؟

Link to comment

هذآ آللي عرففت آسسويهة ! -_-"

function Give() 
players = getElementsByType("player") 
 for _,v in next( Players ) do  
givePlayerMoney(v,2500) 
end 
addCommandHandler("giveM",Give) 
  
addCommandHandler("aze", 
players = getElementsByType("player") 
for _,v in next( Players ) do  
setTimer( 
function() 
    givePlayerMoney(v,2500) 
end,10000,1) 

Link to comment

-- # Server Side ! 
addCommandHandler("aze", 
function (  ) 
    setTimer ( 
        function ( ) 
        for _,v in next,getElementsByType ( "player" ) do 
            givePlayerMoney ( v,2500 ) 
            outputChatBox("* The Server Has Been Sent 2500 $ To All Players !",v) 
        end 
    end,600000,0 
    ) 
end 
) 
Link to comment

هذا تكتب بآف 8

aze

يوزع للكل ذذ مبلغ 2500 كل 10 دقايق # و اعتقد الكود يسبب لاق استخدم هـ الكود افضل #

-- # Server Side ! 
  
PrestegeTimer = {   } 
  
addCommandHandler("aze", 
function ( player ) 
    if ( isTimer ( PrestegeTimer[player] ) ) then 
        killTimer ( PrestegeTimer[player] ) 
        PrestegeTimer[player] = nil 
    end 
PrestegeTimer[player] = setTimer ( 
        function ( ) 
        for _,v in next,getElementsByType ( "player" ) do 
            givePlayerMoney ( v,2500 ) 
            outputChatBox("* The Server Has Been Sent 2500 $ To All Players !",v) 
        end 
    end,600000,0 
    ) 
end 
) 
Link to comment

@برستيجج

شفف وركز ممعي , :D

آنآ لمآ آكتب

giveM

يوزع ع آلسيرففر 2500 ,

ولمآ آكتب

aze

يصير يوزع تلققآئي كل 10 دققآيقق 2500

من دون مآ آكتب giveM

ففهمتني ؟ :mrgreen:

Link to comment

واذا تبي غيره ..

جميع الحقوق محفوظة لدى عناد ..

  
-- # Server Side ! 
addCommandHandler("giveM", 
function () 
    local money = math.random (5000,15000) 
    givePlayerMoney( getRootElement(), money ) 
    outputChatBox("* #000000[ #00ff00 $"..money.."  #000000] #0099cc This Money has been sent to All players #ff0000❤" ,getRootElement(),255,0,0,true) 
end 
) 
-- 
PrestegeTimer = {   } 
  
addCommandHandler("aze", 
function ( player ) 
    if ( isTimer ( PrestegeTimer[player] ) ) then 
        killTimer ( PrestegeTimer[player] ) 
        PrestegeTimer[player] = nil 
    end 
PrestegeTimer[player] = setTimer ( 
        function ( ) 
        for _,v in next,getElementsByType ( "player" ) do 
            givePlayerMoney ( v,2500 ) 
            outputChatBox("* The Server Has Been Sent 2500 $ To All Players !",v) 
        end 
    end,600000,0 
    ) 
end 
) 
  

لم يتم التجربه

Edited by Guest
Link to comment

-- # Server Side ! 
  
PrestegeTimer = {   } 
  
addEventHandler("onPlayerCommand",getRootElement(), 
function ( cmd ) 
        if ( cmd == "giveM" ) then 
            for _,v in next,getElementsByType("player") do 
                givePlayerMoney ( v,2500 ) 
                outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !",v) 
            end 
        elseif ( cmd == "aze" ) then 
    if ( isTimer ( PrestegeTimer[source] ) ) then 
        killTimer ( PrestegeTimer[source] ) 
        PrestegeTimer[player] = nil 
    end 
PrestegeTimer[source] = setTimer ( 
        function ( ) 
        for _,v in next,getElementsByType ( "player" ) do 
            givePlayerMoney ( v,2500 ) 
            outputChatBox("* The Server Has Been Sent 2500 $ To All Players !",v) 
        end 
    end,600000,0 
    ) 
    end 
end 
) 
Link to comment

إيهة كذآ ظظبطط ,

بس ي برستيج آبي إذآ كتبت giveM

بعد مآ يصير التوزيع التلقآئي مآ تققدر توزعع ,

الـ giveM

آبيهآ تتففعل بعد مآ يتعطل التوزيع التلقآئي بـ إعآدةة كتآبةة aze !

Link to comment

  
PrestegeTimer = {   } 
  
addEventHandler("onPlayerCommand",getRootElement(), 
function ( cmd ) 
        if ( cmd == "giveM" ) then 
        if getElementData ( player, "iscmd" ) == false then 
            for _,v in next,getElementsByType("player") do 
                givePlayerMoney ( v,2500 ) 
                outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !",v) 
setElementData( player, "iscmd", true ) 
            end 
        elseif ( cmd == "aze" ) then 
    if ( isTimer ( PrestegeTimer[source] ) ) then 
        killTimer ( PrestegeTimer[source] ) 
        PrestegeTimer[player] = nil 
     setElementData( player, "iscmd", false ) 
    end 
PrestegeTimer[source] = setTimer ( 
        function ( ) 
        for _,v in next,getElementsByType ( "player" ) do 
            givePlayerMoney ( v,2500 ) 
            outputChatBox("* The Server Has Been Sent 2500 $ To All Players !",v) 
        end 
    end,600000,0 
    ) 
elseif ( cmd == "aze" ) then 
if setElementData( player, "iscmd", false ) then 
setElementData( player, "iscmd", true ) 
else 
if setElementData( player, "iscmd", true ) then 
setElementData( player, "iscmd", false ) 
end 
end 
end 
end 
end 
) 
  

لم يتم التجربة !!

Link to comment
PrestegeTimer = {   } 
  
local canGiveM = nil 
  
addEventHandler("onPlayerCommand",getRootElement(), 
function ( cmd ) 
        if ( cmd == "giveM" ) then 
        if canGiveM then 
            for _,v in next,getElementsByType("player") do 
                givePlayerMoney ( v,2500 ) 
                outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !",v) 
            end 
            end 
        elseif ( cmd == "azeStop" ) then 
    if ( isTimer ( PrestegeTimer[source] ) ) then 
        killTimer ( PrestegeTimer[source] ) 
        PrestegeTimer[player] = nil 
        canGiveM = true 
   else 
outputChatBox("aze is stoped", source, 255, 0, 0, false) 
 end 
        elseif ( cmd == "aze" ) then 
    if ( isTimer ( PrestegeTimer[source] ) ) then 
        killTimer ( PrestegeTimer[source] ) 
        PrestegeTimer[player] = nil 
        canGiveM = true 
    end 
PrestegeTimer[source] = setTimer ( 
        function ( ) 
        for _,v in next,getElementsByType ( "player" ) do 
            givePlayerMoney ( v,2500 ) 
            canGiveM = false 
            outputChatBox("* The Server Has Been Sent 2500 $ To All Players !",v) 
        end 
    end,600000,0 
    ) 
    end 
end 
) 

azeStop لآيقاف التوزيع التلقائي اكتب

Edited by Guest
Link to comment

  
Server Side ! 
addCommandHandler ( "giveM", 
function (player) 
                if getElementData ( player, "iscmd" ) == false then 
                for _,v in next,getElementsByType("player") do 
                givePlayerMoney ( v,2500 ) 
                outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !",v) 
end 
end 
end 
) 
-- 
addCommandHandler ( "aze1", 
function (player) 
if ( isTimer ( PrestegeTimer[source] ) ) then 
killTimer ( PrestegeTimer[source] ) 
PrestegeTimer[player] = nil 
setElementData( player, "iscmd", false ) 
end 
end 
) 
-- 
addEventHandler("onPlayerCommand",getRootElement(), 
function ( cmd ) 
if ( cmd == "aze2" ) then 
PrestegeTimer[source] = setTimer ( 
function ( ) 
for _,v in next,getElementsByType ( "player" ) do 
givePlayerMoney ( v,2500 ) 
outputChatBox("* The Server Has Been Sent 2500 $ To All Players !",v) 
end 
end,600000,0 
) 
end 
end 
) 
  

ججرب اظن ما يمديك تسوي cmd فيه شيين

اذا كتبت

aze1

يوقف التوزيع التلقائي ويخليه يمديك توزع giveM

واذا كتبت

aze2

يشغل التوزيع التلقائي

لم يتم التجربه !!

Link to comment

-- # Server Side ! 
  
PrestegeTimer = {   } 
  
  
addEventHandler("onPlayerCommand",getRootElement(), 
function ( cmd ) 
        if ( cmd == "giveM" ) then 
            if getElementData(source,"CanSend") == false then return end 
            for _,v in next,getElementsByType("player") do 
                givePlayerMoney ( v,2500 ) 
                outputChatBox("* The #1De[4]gle, Has Been Sent 2500 $ To All Players !",v) 
            end 
        elseif ( cmd == "aze" ) then 
if isTimer (  PrestegeTimer[source] ) then killTimer ( PrestegeTimer[source] ) setElementData(source,"CanSend",true) return end 
            setElementData(source,"CanSend",false) 
    PrestegeTimer[source] = setTimer ( 
        function ( source ) 
        for _,v in next,getElementsByType ( "player" ) do 
            givePlayerMoney ( v,2500 ) 
            outputChatBox("* The Server Has Been Sent 2500 $ To All Players !",v) 
        end 
    end,600000,0,v 
    ) 
    end 
end 
) 
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...