Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: theweirdgeek on February 22, 2010, 08:00:00 pm

Title: Add welcome message.
Post by: theweirdgeek 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
Title: Re: Help please.
Post by: thijn on February 22, 2010, 09:32:42 pm
Doesn't matter where u put it, aslong as its not in any other callback.
Title: Re: Help please.
Post by: theweirdgeek 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
Title: Re: Help please.
Post by: Ettans 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. ;)