An simple quastion - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: An simple quastion (
/showthread.php?tid=78529)
An simple quastion -
Littleman774 - 20.05.2009
Hello scitpters!
My new script starts to get somewhere but...
It just looks so boring with no welcome text after the orange connect text?
I know I can read it on wiki, but that didnt help me out...
Thanks for the answers
Re: An simple quastion -
GanG$Ta - 20.05.2009
1.open the script you want to edit with pawno located in your serverfolder/pawno/pawno.exe.
2.search for public OnPlayerConnect.
3. Add the stuff below between the brackets to the OnPlayerConnect part of the GameMode.
Код:
public OnPlayerConnect(playerid)
{
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Welcome to the server \"%s\"", name);
SendClientMessage(playerid,0xFFFF00AA, string);
return true;
}
4.Compile the GameMode by pressing F5.
Re: An simple quastion -
Littleman774 - 21.05.2009
Quote:
Originally Posted by DeathlyForce
1.open the script you want to edit with pawno located in your serverfolder/pawno/pawno.exe.
2.search for public OnPlayerConnect.
3. Add the stuff below between the brackets to the OnPlayerConnect part of the GameMode.
Код:
public OnPlayerConnect(playerid)
{
new name[MAX_PLAYER_NAME], string[48];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Welcome to the server \"%s\"", name);
SendClientMessage(playerid,0xFFFF00AA, string);
return true;
}
4.Compile the GameMode by pressing F5.
|
Thanks, it works
Re: An simple quastion -
Littleman774 - 21.05.2009
I just want a welcome message, this one shows the players name that joins.
What are I gonna remove to just get the message?
Re: An simple quastion -
GanG$Ta - 21.05.2009
Код:
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,0xFFFF00AA,"Welcome to the server!");
return true;
}
Re: An simple quastion -
Littleman774 - 21.05.2009
Quote:
Originally Posted by DeathlyForce
Код:
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,0xFFFF00AA,"Welcome to the server!");
return true;
}
|
Thanks!
Re: An simple quastion -
Littleman774 - 21.05.2009
Oh, one last thing, someone know where I can find color codes?
Re: An simple quastion -
Badger(new) - 21.05.2009
Here is a page about colours in SA-MP:
https://sampwiki.blast.hk/wiki/Colors_List
Here is an image of the SetClientMessage colors:
http://www.build-a-website.net/hex-color-codes.png