#7

Quote:
Originally Posted by pollo97
Посмотреть сообщение
Код:
//You must pass the id of player you want to kick
forward KickPlayer(playerid); 
public KickPlayer(playerid) 
{ 
    //Here you get the name of player to kick
    new pname[MAX_PLAYER_NAME], string[128]; 
    GetPlayerName(playerid, pname, sizeof(pname)); 
    format(string, sizeof(string), "{AFAFAF}%s {FF0000}has tried to login in RCON and got Kicked!", pname); 

    //Kick the player
    Kick(playerid);
    for (new i = 0; i < MAX_PLAYERS; i++) 
    { 
        //And than send the message to all connected players
        if(IsPlayerConnected(i)) SendClientMessageToAll(COLOR_RED, string); 
    }  
    return 1; 
}
You do realize that
pawn Код:
for (new i = 0; i < MAX_PLAYERS; i++)
    {
        //And than send the message to all connected players
        if(IsPlayerConnected(i)) SendClientMessageToAll(COLOR_RED, string);
    }
will send not one message, but as many messages as there are connected players.
Reply


Messages In This Thread
HELP - by DeStRoY232 - 22.09.2017, 10:25
Re: HELP - by FuNkYTheGreat - 22.09.2017, 10:39
Re: HELP - by pollo97 - 22.09.2017, 10:40
Re: HELP - by DeStRoY232 - 22.09.2017, 11:14
Re: HELP - by pollo97 - 22.09.2017, 11:51
Re: HELP - by Sew_Sumi - 22.09.2017, 11:59
Re: HELP - by dominik523 - 22.09.2017, 12:20
Re: HELP - by Kampott - 22.09.2017, 12:35
Re: HELP - by DeStRoY232 - 22.09.2017, 12:40
DeStRoY232 - by Sew_Sumi - 23.09.2017, 10:42

Forum Jump:


Users browsing this thread: 1 Guest(s)