RESOLVED BY ME: creating connect and leave messages
#2

I'll help you only with leave:

pawn Код:
public OnPlayerConnect(playerid)
{
    new pname[MAX_PLAYER_NAME],string[22+MAX_PLAYER_NAME];
   GetPlayerName(playerid,pname,sizeof(pname));
   format(string,sizeof(string),"%s has joined the server",pname);
   SendClientMessageToAll(GREY,string);
    return 1;
}

OnPlayerDisconnect(playerid,reason)
{
        new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    switch(reason)
    {
        case 0: format(string, sizeof(string), "%s has left the server. (Timed Out)", pname);
        case 1: format(string, sizeof(string), "%s has left the server. (Leaving)", pname);
    }
    SendClientMessageToAll(GREY, string);
    return 1;
}
P.S:You could help me if you tell me how tos cript arrest command for a button if you know.
Reply


Messages In This Thread
RESOLVED BY ME: creating connect and leave messages - by Slash01 - 27.04.2011, 14:57
Re: RESOLVED BY ME: creating connect and leave messages - by Cjgogo - 27.04.2011, 15:28

Forum Jump:


Users browsing this thread: 1 Guest(s)