Jump to content

مساعده


Crisi#

Recommended Posts

ابي اذا لمس ماركر

يعطي فلوس ما بين 4000 و 5000

حلو كذا

لحين ابي

بعد 3 دقايق يروحو فلوس

ممكن تزبطو تايم

  
addEventHandler,('onMarkerHit',marker, 
function (hitElemtnt) 
if (getElementType)(hitElmenet)=='Player' 
givePlayerMoney(player,math.random(3000,4134)) 
end 
  
end) 
  

Link to comment
جرب ذا
  
addEventHandler,('onMarkerHit',marker, 
function ms (hitElemtnt) 
if (getElementType)(hitElmenet)=='Player' 
givePlayerMoney(player,math.random(3000,4134)) 
end) 
setTimer(ms,الوقت هنا) 
  

# عفسةةة .

, ججرب

marker = createMarker ( ..... ); 
Timer = {}; 
local Time, timeExecute = 5000, 1 
  
addEventHandler ( "onMarkerHit", marker, function ( player ) 
     if getElementType ( player ) == "player" then 
          money = math.random( 3000, 4134 ); 
          givePlayerMoney( player, money) 
          setElementData ( player, "HaveMoney", true ) 
          setElementData ( player, "Money", tonumber( money ) ) 
           if not ( isTimer ( Timer [ player ] ) ) then 
             Timer [ player ] = setTimer ( RemoveMoney, Time, timeExecute, player ) 
                   end 
             end 
      end 
) 
          
RemoveMoney = function ( plr ) 
  if ( getElementData( plr, "HaveMoney" ) ) then 
      if ( getElementData( plr, "Money" ) ~= nil ) then 
         takePlayerMoney ( plr, getElementData( plr, "Money" ) ) 
           end 
      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...