Jump to content

help with commands


marty000123

Recommended Posts

Hello

Now when I'm standing infront of my toll, it requires a command to open it. I did /paytoll. Now it doesn't work, because I don't know how to do it. The script is server sided. This is my structure:

function checkvehicle
if car then
    if heavyveh then
        triggerEvent(heavy)
    end
end
addEventHandler(onMarkerHit)

So when it's a heavy vehicle, it redirects to the Event called heavy. Now my problem is, how do I redirect this to another event/function while having the enter the command? I mean, it should be something like this:
addEvent(heavy)
function()
bla blah
end
addCommandHandler("paytoll")

Right now, I can do /paytoll everywhere because i dont know how to connect it from the checkvehicle function. Help would be appreciated!

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