SendClientMessageToAll Help
#10

This is the first post made by you:

pawn Код:
COMMAND:kick(playerid, params[])
{
    if(IsPlayerAdmin(playerid)||PInfo[playerid][pAdmin] > 0){
        new id;
        new reason[256];
        if (!sscanf(params, "us", id,reason)){
            if(id != INVALID_PLAYER_ID){
                format(string,sizeof(string),"AdmWrn: %s was kicked by %s reason: "COL_YELLOW"%s",PlayerName(id),PlayerName(playerid),reason);
                SendClientMessageToAll(COLOR_RED,string);
                Kick(id);
            }else return SendPM(playerid, COLOR_GRAD2, "The player is disconnected");
        }else return SendPM(playerid, COLOR_GRAD2, "/kick [id] [reason]");
    }
    return 1;
}
This is mine:

PHP код:
forward KickTimer(playerid);
public 
KickTimer(playerid)
{
Kick(playerid);
}
stock KickMessage(playeridmessage[128])
{
SendClientMessage(playeridCOLOR_ADMINmessage);
SetTimerEx("KickTimer"900"d"playerid);

And now..

pawn Код:
COMMAND:kick(playerid, params[])
{
    if(IsPlayerAdmin(playerid)||PInfo[playerid][pAdmin] > 0){
        new id;
        new reason[256];
        if (!sscanf(params, "us", id,reason)){
            if(id != INVALID_PLAYER_ID){
                format(string,sizeof(string),"AdmWrn: %s was kicked by %s reason: "COL_YELLOW"%s",PlayerName(id),PlayerName(playerid),reason);
                KickMessage(id, string);
                Kick(id);
            }else return SendPM(playerid, COLOR_GRAD2, "The player is disconnected");
        }else return SendPM(playerid, COLOR_GRAD2, "/kick [id] [reason]");
    }
    return 1;
}
Reply


Messages In This Thread
SendClientMessageToAll Help - by ofir060 - 01.03.2013, 17:04
Re: SendClientMessageToAll Help - by Patrick - 01.03.2013, 17:11
Re: SendClientMessageToAll Help - by AndreT - 01.03.2013, 17:29
Re: SendClientMessageToAll Help - by ofir060 - 01.03.2013, 18:43
Re: SendClientMessageToAll Help - by ofir060 - 01.03.2013, 19:42
Re: SendClientMessageToAll Help - by Patrick - 01.03.2013, 20:17
Re: SendClientMessageToAll Help - by AndreT - 01.03.2013, 21:57
Re: SendClientMessageToAll Help - by ofir060 - 01.03.2013, 23:12
Re: SendClientMessageToAll Help - by mittukuttan - 02.03.2013, 03:30
Re: SendClientMessageToAll Help - by Denying - 02.03.2013, 06:08

Forum Jump:


Users browsing this thread: 2 Guest(s)