Why that message dosn't work.
#1

pawn Код:
switch(reason)
    {
        new str[128];
        case 0:
        {
            format(str,128,"%s has left the server ((Crashed)",GetPlayersName(playerid));
            SendClientMessageToAll(-1,str);
        }
        case 1:
        {
            format(str,128,"%s has left the server ((Leaving)",GetPlayersName(playerid));
            SendClientMessageToAll(-1,str);
        }
        case 2:
        {
            format(str,128,"%s has left the server ((Kicked/Banned)",GetPlayersName(playerid));
            SendClientMessageToAll(-1,str);
        }
    }
Reply
#2

To get Ideas

pawn Код:
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. (Crashed)", pname);
        case 1: format(string, sizeof(string), "%s has left the server. (Leaving)", pname);
        case 2: format(string, sizeof(string), "%s has left the server. (Kicked)", pname);
    }
    SendClientMessageToAll(0xAAAAAAAA, string);
    return 1;
Reply
#3

And format your code then SendClientMessageToAll you don't need to use it in every single case.
Reply
#4

K thanks all
+rep
EDIT:LOL I CAN'T GIVE KABLOR REP
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)