Login Exit message
#1

hello how i make a this when player connect send message for all players: playername connected and: playername disconnected can someone help me
Reply
#2

Please search both the forum and wiki before posting. There will literally be hundreds of example scripts around that do exactly this.
Reply
#3

Код:
OnPlayerConnect ;
Код:
OnPlayerDisconnect ;
Reply
#4

Quote:
Originally Posted by KJ1
Посмотреть сообщение
Код:
OnPlayerConnect ;
Код:
OnPlayerDisconnect ;
yes buy how i make like this Jenny_Lumber has join to server

Jenny_Lumber has left the server
Reply
#5

Код:
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;
}
Reply
#6

Код:
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)