Jump to content

[HELP] Bind Key


Recommended Posts

Posted

I want a player only possar use the button "t" 5 in 5 seconds

If he tries to use the button nothing happens, it would be for the player not being able to chat only every 5 seconds

function () 
setTimer(function(player) 
     bindKey(player, "t", "down", ) 
end,5000, 1,source) 

What did this wrong?

Posted

That makes no sense, you must use the event "onPlayerChat" with cancelEvent to cancel the message if 5 seconds didn't yet pass, and you can use getTickCount to compare how long did it pass since last chat.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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