• Welcome to Vice City Multiplayer.
 

Script for adding a new command...

Started by theweirdgeek, February 26, 2010, 09:12:11 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

theweirdgeek

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

Ettans

You could have done that yourself, there's even an example command in the example script (mode.pwn).

@to OnPlayerCommandText

if(strcmp(cmdtext,"help",true) == 0)
{
    SendClientMessage(playerid,0xFFFFFFFF,"Your message...");
    return true;
}

theweirdgeek


Ettans


theweirdgeek

Should i put it anywhere within the onplayercommand section?

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

Thanks,
Jake

Ettans

Yes, put it anywhere in OnPlayerCommandText.