Jump to content

[Help] Pay Script


Recommended Posts

x, y, z = getElementPosition(source)
stats = 0
 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
function()
setTimer(enterStuntZone, 2000, 0)
end
)
 
 
function enterStuntZone()
if (getDistanceBetweenPoints3D ( x,y,z, xGate, yGate, zGate ) < 7 )  then -- xGate, yGa...... position of gate or airport terminal.....
if	stats == 0	then
	stats = 1
setTimer(setStats, 6000, 1)
if	getPlayerMoney(source) > 500	then
setPlayerMoney(source, getPlayerMoney(source)-500)
--here function of gate
outputChatBox("Welcome to stunt zone!", source)
setTimer(setStats, 6000, 1)
else
outputChatBox("You havent money for enter stunt zone!", source)
end	
end	
else
--close gate function.......
end	
end
 
setStats()
stats = 0
end

Link to comment
x, y, z = getElementPosition(source)
stats = 0
 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
function()
setTimer(enterStuntZone, 2000, 0)
end
)
 
 
function enterStuntZone()
if (getDistanceBetweenPoints3D ( x,y,z, xGate, yGate, zGate ) < 7 )  then -- xGate, yGa...... position of gate or airport terminal.....
if	stats == 0	then
	stats = 1
setTimer(setStats, 6000, 1)
if	getPlayerMoney(source) > 500	then
setPlayerMoney(source, getPlayerMoney(source)-500)
--here function of gate
outputChatBox("Welcome to stunt zone!", source)
setTimer(setStats, 6000, 1)
else
outputChatBox("You havent money for enter stunt zone!", source)
end	
end	
else
--close gate function.......
end	
end
 
setStats()
stats = 0
end

Instructions? sorry im enw to scripting

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