Author Topic: Script for adding a new command...  (Read 3710 times)

0 Members and 2 Guests are viewing this topic.

Offline theweirdgeek

  • Street Thug
  • *
  • Posts: 17
    • View Profile
Script for adding a new command...
« on: February 26, 2010, 12:12:11 pm »
Hello,
I would like to request a script...

I would like like it to be a /help command, So when people type /help it displays a message of my choice...

Thanks,
Jake

Offline Ettans

  • VC:MP Beta Tester
  • Wiseguy
  • *
  • Posts: 56
    • View Profile
Re: Script for adding a new command...
« Reply #1 on: February 26, 2010, 12:14:48 pm »
You could have done that yourself, there's even an example command in the example script (mode.pwn).

@to OnPlayerCommandText
Code: [Select]
if(strcmp(cmdtext,"help",true) == 0)
{
    SendClientMessage(playerid,0xFFFFFFFF,"Your message...");
    return true;
}

Offline theweirdgeek

  • Street Thug
  • *
  • Posts: 17
    • View Profile
Re: Script for adding a new command...
« Reply #2 on: February 26, 2010, 12:27:16 pm »
Its not working when i type /help?

Offline Ettans

  • VC:MP Beta Tester
  • Wiseguy
  • *
  • Posts: 56
    • View Profile
Re: Script for adding a new command...
« Reply #3 on: February 26, 2010, 12:31:50 pm »
/c help

Offline theweirdgeek

  • Street Thug
  • *
  • Posts: 17
    • View Profile
Re: Script for adding a new command...
« Reply #4 on: February 26, 2010, 12:46:08 pm »
Should i put it anywhere within the onplayercommand section?

When i type /c help in the game nothing happens...

Thanks,
Jake

Offline Ettans

  • VC:MP Beta Tester
  • Wiseguy
  • *
  • Posts: 56
    • View Profile
Re: Script for adding a new command...
« Reply #5 on: February 26, 2010, 01:05:37 pm »
Yes, put it anywhere in OnPlayerCommandText.