[Help] i need something
#1

Hello!, some one know how to make when you kick someone say who and why kick you? I need a filter script Thank You
Reply
#2

Here
https://sampforum.blast.hk/showthread.php?pid=2110062#pid2110062
Reply
#3

Try using this:

pawn Код:
CMD:kick(playerid, params[])
{
    new string[128];
    new reason[128];
    new id;
    if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, COLOR_GREY, "[USAGE]: /kick [playerid / part of name] [reason]");

    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected to the server!");
    format(string, sizeof(string), "Admin %s (%d) has kicked %s (%d) Reason: %s", GetName(playerid), playerid, GetName(id), id, reason);
    SendClientMessageToAll(COLOR_RED, string);
    format(string, sizeof(string), "You have kicked %s (%d) Reason: %s", GetName(id), id, reason);
    SendClientMessage(playerid, COLOR_RED, string);
    Kick(id);
    return 1;
}
Also you will need this stock:

pawn Код:
stock GetName(playerid)
{
   new name[MAX_PLAYER_NAME];
   if(IsPlayerConnected(playerid))
   {
      GetPlayerName(playerid, name, sizeof(name));
   }
   return name;
}
Reply
#4

Quote:
Originally Posted by sniperwars
Посмотреть сообщение
Try using this:

pawn Код:
CMD:kick(playerid, params[])
{
    new string[128];
    new reason[128];
    new id;
    if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, COLOR_GREY, "[USAGE]: /kick [playerid / part of name] [reason]");

    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected to the server!");
    format(string, sizeof(string), "Admin %s (%d) has kicked %s (%d) Reason: %s", GetName(playerid), playerid, GetName(id), id, reason);
    SendClientMessageToAll(COLOR_RED, string);
    format(string, sizeof(string), "You have kicked %s (%d) Reason: %s", GetName(id), id, reason);
    SendClientMessage(playerid, COLOR_RED, string);
    Kick(id);
    return 1;
}
Also you will need this stock:

pawn Код:
stock GetName(playerid)
{
   new name[MAX_PLAYER_NAME];
   if(IsPlayerConnected(playerid))
   {
      GetPlayerName(playerid, name, sizeof(name));
   }
   return name;
}
You will also need ZCMD to even use that command right there.
Reply
#5

Thank You, But i need it like a Filter script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)