Login Exit message - 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: Login Exit message (
/showthread.php?tid=161184)
Login Exit message -
heroyou1221 - 19.07.2010
hello how i make a this when player connect send message for all players: playername connected and: playername disconnected can someone help me
Re: Login Exit message -
Betamaster - 19.07.2010
Please search both the forum and wiki before posting. There will literally be hundreds of example scripts around that do exactly this.
Re: Login Exit message -
KJ1 - 19.07.2010
Код:
OnPlayerDisconnect ;
Re: Login Exit message -
heroyou1221 - 19.07.2010
Quote:
Originally Posted by KJ1
Код:
OnPlayerDisconnect ;
|
yes buy how i make like this Jenny_Lumber has join to server
Jenny_Lumber has left the server
Re: Login Exit message -
KJ1 - 19.07.2010
Код:
public OnPlayerConnect(playerid)
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has joined the server. Welcome!",pName);
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}
Re: Login Exit message -
KJ1 - 19.07.2010
Код:
public OnPlayerDisconnect(playerid, reason)
{
new
string[64],
name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
switch(reason)
{
case 0: format(string,sizeof string,"%s left the server. (Timed out)",name);
case 1: format(string,sizeof string,"%s left the server. (Leaving)",name);
case 2: format(string,sizeof string,"%s left the server. (Kicked/Banned)",name);
}
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}