if(strcmp(cmd, "/kick", true) ==0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Only admins can use this command!");
new
id,
reason[120];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
new gname[MAX_PLAYER_NAME];
GetPlayerName(id, gname, sizeof(gname));
if (sscanf(cmd, "uz", id, reason)) return SendClientMessage(playerid, 0xFF0000AA, "Usage:/kick [id] [reason]");
else if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "ERROR:This player isn't connected!");
else
{
format(reason, sizeof(reason), "ADMIN KICK : %s has been kicked From The Server ( Reason : %d)",gname,reason);
SendClientMessageToAll(COLOR_PINK, reason);
Kick(id);
}
return 1;
}
if(strcmp(cmd, "/kick", true, 5) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Only admins can use this command!");
new id, reason[120];
new pName[24], gname[24];
GetPlayerName(playerid,pName,sizeof(pName));
GetPlayerName(id, gname, sizeof(gname));
if(sscanf(cmd, "us[120]", id, reason)) return SendClientMessage(playerid, 0xFF0000AA, "Usage:/kick [id] [reason]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "ERROR:This player isn't connected!");
format(reason, sizeof(reason), "ADMIN KICK : %s has been kicked From The Server ( Reason : %d )",gname,reason);
SendClientMessageToAll(COLOR_PINK, reason);
Kick(id);
return 1;
}
pawn Код:
|
if(strcmp(cmd, "/kick", true, 5) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Only admins can use this command!");
new id, reason[120];
new pName[24], gname[24];
GetPlayerName(playerid,pName,sizeof(pName));
if(sscanf(cmd, "{s[5]}us[120]", id, reason)) return SendClientMessage(playerid, 0xFF0000AA, "Usage:/kick [id] [reason]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "ERROR:This player isn't connected!");
GetPlayerName(id, gname, sizeof(gname));
format(reason, sizeof(reason), "ADMIN KICK : %s has been kicked From The Server ( Reason : %d )",gname,reason);
SendClientMessageToAll(COLOR_PINK, reason);
Kick(id);
return 1;
}
if(sscanf(cmd, "{s[5]}us[120]", id, reason)) return SendClientMessage(playerid, 0xFF0000AA, "Usage:/kick [id] [reason]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "ERROR:This player isn't connected!");
if(sscanf(cmd, "{s[5]}us[120]", id, reason)) return SendClientMessage(playerid, 0xFF0000AA, "Usage:/kick [id] [reason]");
else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "ERROR:This player isn't connected!");
if (sscanf(cmd, "is", id, reason))
if (sscanf(cmd, "uz", id, reason))