An simple quastion
#1

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
Reply
#2

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.
Reply
#3

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
Reply
#4

I just want a welcome message, this one shows the players name that joins.
What are I gonna remove to just get the message?
Reply
#5

Код:
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,0xFFFF00AA,"Welcome to the server!");
return true;
}
Reply
#6

Quote:
Originally Posted by DeathlyForce
Код:
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,0xFFFF00AA,"Welcome to the server!");
return true;
}
Thanks!
Reply
#7

Oh, one last thing, someone know where I can find color codes?
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)