SA-MP Forums Archive
Welcome message with name - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Welcome message with name (/showthread.php?tid=536285)



Welcome message with name - AwokenNeoX - 08.09.2014

Hello Guys

I am new and want to know how to make a welcome message with name.

For Example :

Quote:

public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,COLOR_GREEN,"Welcome to UltimateFS (PlayerXY)!");
return 1;
}

How to script that :/ ?


Re: Welcome message with name - M0HAMMAD - 08.09.2014

Here You Go :
pawn Код:
new string[128],pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(string,sizeof(string),"Welcome to UltimateFS %s!",pname);
SendClientMessage(playerid,COLOR_GREEN,string);



Re: Welcome message with name - iOxide - 08.09.2014

Edit: Someone was faster


AW: Re: Welcome message with name - AwokenNeoX - 08.09.2014

Quote:
Originally Posted by M0HAMMAD
Посмотреть сообщение
Here You Go :
pawn Код:
new string[128],pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(string,sizeof(string),"Welcome to UltimateFS %s!",pname);
SendClientMessage(playerid,COLOR_GREEN,string);
Thank you so much :3