Author Topic: Add welcome message.  (Read 3007 times)

0 Members and 1 Guest are viewing this topic.

Offline theweirdgeek

  • Street Thug
  • *
  • Posts: 17
    • View Profile
Add welcome message.
« on: February 22, 2010, 08:00:00 pm »
I'm new to all this scripting, And need your help...

I would like to add the following script which displays a message on user entry...

public OnPlayerConnect(playerid){
   SendClientMessage(playerid,COLOR_GRAY,"Welcome to my server.");
   return 1;
}  


Where abouts in my pawn script would i insert the script above?

Many thanks,
Jake
« Last Edit: February 23, 2010, 11:16:53 pm by Boss »

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: Help please.
« Reply #1 on: February 22, 2010, 09:32:42 pm »
Doesn't matter where u put it, aslong as its not in any other callback.

Offline theweirdgeek

  • Street Thug
  • *
  • Posts: 17
    • View Profile
Re: Help please.
« Reply #2 on: February 22, 2010, 09:41:51 pm »
I inserted it in the script in:

//------------------------------------------------------------------------------------------------------

public OnPlayerConnect(playerid){
   SendClientMessage(playerid,COLOR_GRAY,"Welcome to {Jakes server} , Enjoy yourself! , This server is hosted at buzzsocial.co.uk");
   return 1;
}

//------------------------------------------------------------------------------------------------------

Is this ok? Anyways after saving it to the server no changes have taken place and a welcome message is not showing?

Thanks,
Jake

Offline Ettans

  • VC:MP Beta Tester
  • Wiseguy
  • *
  • Posts: 56
    • View Profile
Re: Help please.
« Reply #3 on: February 23, 2010, 10:27:09 am »
Are you sure there isn't a second OnPlayerConnect callback in your gamemode? Also, don't forget to re-compile. ;)