[Help] i need something - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] i need something (
/showthread.php?tid=427783)
[Help] i need something -
EdDy.DarK - 03.04.2013
Hello!, some one know how to make when you kick someone say who and why kick you? I need a filter script Thank You
Re: [Help] i need something -
Vin Diesel - 03.04.2013
Here
https://sampforum.blast.hk/showthread.php?pid=2110062#pid2110062
Re: [Help] i need something -
sniperwars - 03.04.2013
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;
}
Re: [Help] i need something -
xXitsgodzillaXx - 03.04.2013
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.
Respuesta: [Help] i need something -
EdDy.DarK - 03.04.2013
Thank You, But i need it like a Filter script