I Need! - 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: I Need! (
/showthread.php?tid=125074)
I Need! -
JustinSton - 02.02.2010
I wish that when a person who never set on the server, if it was her first time, announced to the entire server:
We have a beginner, NAME, welcome.
Re: I Need! -
[HiC]TheKiller - 02.02.2010
Well, you could save everyones names into a file and then check if the player name is in that file but this would be a bit inefficient.
Re: I Need! -
Joe Staff - 02.02.2010
Well if you have files for every player then you could search to see if they have a file, because if they don't then they're new.
pawn Код:
public OnPlayerConnect(playerid)
{
new tmp[100];
new pname[24];
GetPlayerName(playerid,pname,24);
format(tmp,100,"/users/%s.ini",pname);
if(!fexist(tmp))
{
format(tmp,100,"Everyone please welcome %s to the server!",pname);
SendClientMessageToAll(0xFFFFFFFF,tmp);
}
}