dcmd_kick(playerid, params[])
{
new id, reason[64];
if(IsPlayerAdmin(playerid))
{
if (sscanf(params, "dz", id, reason))
{
SendClientMessage(playerid, COLOR_ORANGE, "Usage: /kick [playerid] [reason]");
return 1;
}
else if (!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "Invalid id");
{
SendClientMessage(id, COLOR_RED, "You have been kicked from the server %s!");
Kick(id);
SendClientMessage(playerid, COLOR_YELLOW, "Player kicked.");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not an admin!");
return 1;
}
return 1;
}
dcmd_kick(playerid, params[])
{
new PID, Str[80];
if(sscanf(params, "us[50]", PID, params)) return SendClientMessage(playerid, COLOR_RED, "Usage: /Kick < Player ID > < Reason >");
if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, COLOR_RED, "That user is not connected!");
format(Str, sizeof(Str), "You have kicked: %d - reason: %s", PID, params);
SendClientMessage(playerid, COLOR_RED, Str);
Kick(PID);
return 1;
}
SendClientMessage(id, COLOR_RED, "You have been kicked from the server %s!");
new str[128];
format(str,128,"You have been kicked from the server! Reason: %s!",reason);
SendClientMessage(playerid,COLOR_RED,str);
dcmd_kick(playerid, params[])
{
new
id,
reason[64];
if(isPlayerAdmin(playerid))
{
if (sscanf(params, "dz", id, reason)) return SendClientMessage(playerid, COLOR_ORANGE, "Usage: /kick [playerid] [reason]");
else if (!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Invalid id");
SendClientMessage(id, COLOR_RED, "You have been kicked from the server %s!");
SendClientMessage(playerid, COLOR_YELLOW, "Player kicked.");
return Kick(id);
}
else
{
return SendClientMessage(playerid, COLOR_RED, "You are not an admin!");
}
}
Replace
pawn Код:
pawn Код:
|