02.03.2013, 06:08
This is the first post made by you:
This is mine:
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);
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;
}
PHP код:
forward KickTimer(playerid);
public KickTimer(playerid)
{
Kick(playerid);
}
stock KickMessage(playerid, message[128])
{
SendClientMessage(playerid, COLOR_ADMIN, message);
SetTimerEx("KickTimer", 90, 0, "d", playerid);
}
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;
}