01.03.2013, 17:04
Hey, I've made a simply command using the SendClientMessageToAll.
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;
}
When I did that on myself, It didnt sent me the SendClientMessageToAll, I recived only a message of the Kick(id).
The same bug/problem happends with anything else im scripting with SendClientMessageToAll and Kick.
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;
}
When I did that on myself, It didnt sent me the SendClientMessageToAll, I recived only a message of the Kick(id).
The same bug/problem happends with anything else im scripting with SendClientMessageToAll and Kick.