SA-MP Forums Archive
Joining - 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)
+--- Thread: Joining (/showthread.php?tid=465221)



Joining - benjaminjones - 21.09.2013

How to create message to send to all admins when someone join the server like - Name of the players has joined the server IP:
If you can please help me


Re: Joining - JimmyCh - 21.09.2013

Hmm, depends on your admin system, but that's really easy to do.
It should be like the following, let's say your enums are PlayerInfo[MAX_PLAYERS][Admin] for the admin rank.
pawn Код:
public OnPlayerConnect(playerid)
{
new name, nam[128];
GetPlayerName(playerid, name, sizeof(name));
format(nam, sizeof(nam), "%s has joined the server!", name);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerInfo[i][Admin] >=1) SendClientMessage(i, -1, nam);
}
return 1;
}
It's simple.