Welcome to ..., Connected to ...
#1

Hello.
I'm making a server, but i still don't know how
i can show a text after Connected to ...
I have here a screenshot, so i want the text
Welcome to Navi Roleplay, Name, Under connected
to Navi Roleplay. How can i do this?

Reply
#2

You can't, simply because those texts appear automatically when the player connects to the server. However, you could do a "fix" around this by clearing the players text when they connect, and then sending your own messages.
Reply
#3

He's asking about the 'Welcome to Navi Roleplay, %s.'
Reply
#4

Quote:
Originally Posted by Antonio (eternalrp.webatu.com)
He's asking about the 'Welcome to Navi Roleplay, %s.'
I know, that's default when you enter a server. It'll automatically create the message "Welcome to [Server Name], [User name]".
Reply
#5

Really ? Never noticed .. Lol
Reply
#6

If you want to bypass this and make a message yourself, do something like this:
pawn Код:
public OnPlayerConnect(playerid)
{
  for(new i = 0; i < 10; i++)
  {
   SendClientMessage(playerid, color, " ");
  }
  new str[60], name[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, sizeof(name));
  format(str, sizeof(str), "Welcome to [Your server name], %s", name);
  SendClientMessage(playerid, color, str);
  return 1;
}
Reply
#7

Doesn't it need to send more than 1 blank message ?
Reply
#8

Quote:
Originally Posted by Antonio (eternalrp.webatu.com)
Doesn't it need to send more than 1 blank message ?
I used a loop.
pawn Код:
for(new i = 0; i < 10; i++)
This means, it creates a new variable at 0. Then every time it finishes the loop (Sends the blank message) it increases the value by 1. And as long as the value of 'i' is less than 10, it will go through the action of the loop again.

So in the end, that code will send the blank message ten times.
Reply
#9

pawn Код:
new string[128], pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "%s Has Joined The Server!", pname);
    SendClientMessageToAll(0x00BFFFAA, string);
that shows everyone that a player joins..

-----------------------------------------------------------------------------------------------

pawn Код:
SendClientMessage(playerid, 0xFFFFFFAA,"Hey");
    SendClientMessage(playerid, 0xFFFFFFAA,"[type your text here]");
  SendClientMessage(playerid, 0xFFFFFFAA,"[type your text here]");
this sends the player some messages when he connects
Reply
#10

Will you please read what the problem is and what he's asking before replying?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)