Players Connecting?
#1

Hello i wanted to ask how to add into rp script that shows people joining like Name_Name (Join) or soemthing like that? can someone help me?
Reply
#2

pawn Код:
public OnPlayerConnect(playerid)
{
  new name[24], str[128];
  GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  format(str, sizeof str, "%s has joined the server", name);
  SendClientMessageToAll(color, str);
  return 1;
}
Reply
#3

when i added it pawno dont want to complie it says that it stop working and go back to script
Reply
#4

O.o Post what it says exactly.
Reply
#5

well it didnt say nothing but it says Pawn Complier Has stop working or smth like that
Reply
#6

Where did you try to add the code?
Reply
#7

Well i dunnoh were to put it in first time so i puted it like line 3117 so for me its close to Welcome to [Server name]

or should i put it on the back of the script?

[Edit] Where ever i put it it still says that Pawno complier has been stoped or somethink like that
Reply
#8

you forgot a ending or starting bracket in a public function and when you tried to compile, the compiler crashed.
That happens to me sometimes. Just check your brackets
Reply
#9

thats how it is


{
public OnPlayerConnect(playerid)
new name[24], str[128];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(str, sizeof str, "%s has joined the server", name);
SendClientMessageToAll(color, str);
return 1;
}

just the same and still it crash
Reply
#10

This is how it should be:
pawn Код:
public OnPlayerConnect(playerid)
{
  new name[24], str[128];
  GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  format(str, sizeof str, "%s has joined the server", name);
  SendClientMessageToAll(color, str);
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)