SA-MP Forums Archive
Players Connecting? - 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: Players Connecting? (/showthread.php?tid=83198)



Players Connecting? - yamoto - 23.06.2009

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?


Re: Players Connecting? - Grim_ - 23.06.2009

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;
}



Re: Players Connecting? - yamoto - 23.06.2009

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


Re: Players Connecting? - Grim_ - 23.06.2009

O.o Post what it says exactly.


Re: Players Connecting? - yamoto - 23.06.2009

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


Re: Players Connecting? - Grim_ - 23.06.2009

Where did you try to add the code?


Re: Players Connecting? - yamoto - 23.06.2009

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


Re: Players Connecting? - dice7 - 23.06.2009

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


Re: Players Connecting? - yamoto - 23.06.2009

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


Re: Players Connecting? - Correlli - 23.06.2009

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;
}