Jump to content

how to spawn vehicles?? or use a trainer


Recommended Posts

Hi, santosh.

You can send to the server a command `/spawncar` (for example) from your client side (you need to change a web part on the client side using this hack) when a user click to this buttons. And on the server you need to handle the command and spawn vehicles for users.

An example for handling clicks to `f1` and `t` buttons on the client in the web part:

  document.addEventListener('keydown', keyDownHandler, false);

  function keyDownHandler(e) {
    if(e.key === 'F1' || e.key === 't') {

Or you can use jquery for the handler. And you need to change/remove a bind to `t` button from the basic client side web part (`event.which == 84`).

Link to comment
Share on other sites

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