Jump to content

[Help] Pay Script


Recommended Posts

Posted

Hi, I made an Stunt zone (LS Airport)

Why i ask help is because:

I need a script

(EXAMPLE)

You pay 500$ at the Entrance of the LS Airport and the Gate opens for like 2 seconds

And closes again.

I really Appreciate it if someone has an Solution :wink:

Posted

as far as i remember you got (on this forum few days ago) a solution for gate opening..

just add money checking and taking..

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted
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

eb95a6cbb9ee.jpg
Posted
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

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