Jump to content

[Help] Got Pay Script how to use it?


Recommended Posts

Hi, i got an Pay Script but i dont know which things i need to edit? (New to Scripting)

Here it is:

1.
     x, y, z = getElementPosition(source)
  2.
     stats = 0
  3.
 
  4.
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
  5.
function()
  6.
setTimer(enterStuntZone, 2000, 0)
  7.
end
  8.
)
  9.
 
 10.
 
 11.
function enterStuntZone()
 12.
if (getDistanceBetweenPoints3D ( x,y,z, xGate, yGate, zGate ) < 7 )  then -- xGate, yGa...... position of gate or airport terminal.....
 13.
if   stats == 0   then
 14.
           stats = 1
 15.
setTimer(setStats, 6000, 1)
 16.
if   getPlayerMoney(source) > 500   then
 17.
setPlayerMoney(source, getPlayerMoney(source)-500)
18.
--here function of gate
 19.
outputChatBox("Welcome to stunt zone!", source)
 20.
setTimer(setStats, 6000, 1)
 21.
else
 22.
outputChatBox("You havent money for enter stunt zone!", source)
 23.
end   
 24.
end   
 25.
else
26.
--close gate function.......
 27.
end   
 28.
end
 29.
 
 30.
     setStats()
 31.
        stats = 0
 32.
end

I know that very much people on this Community knows it. I would really appreciate it if you post an Reply.

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...