28.08.2013, 02:28
pawn Код:
CMD:kick(playerid, params[])
{
new PlayerToKick, Reason[128], ReasonMsg[128], Name[24], AdminName[24];
SendAdminText(playerid, "/kick", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 1)
{
if (sscanf(params, "us[128]", PlayerToKick, Reason)) SendClientMessage(playerid, 0xFF0000AA, "Digite: \"/kick <Player> <Motivo>\"");
else
if (IsPlayerConnected(PlayerToKick))
{
GetPlayerName(playerid, ADMName, sizeof(ADMName));
GetPlayerName(PlayerToKick, Name, sizeof(Name));
SendClientMessage(PlayerToKick, 0xFF0000FF, ReasonMsg);
format(ReasonMsg, 128, "//Mensagem aqui", Name, ADMName, Reason);//Entre as Duas barras a frente você coloca a Mensagem
SendClientMessageToAll(0xFF0000FF, ReasonMsg);
format(ReasonMsg, 128, "Voce Foi Kickado Pelo %s %s", AdminLevelName[APlayerData[playerid][PlayerLevel]], ADMName);
SendClientMessage(PlayerToKick, 0xFF0000FF, ReasonMsg);
format(ReasonMsg, 128, "Motivo: %s", Reason);
Kick(PlayerToKick);
}
else
SendClientMessage(playerid, 0xFF0000FF, "O Player nao esta Online");
}
else
return 0;
}
else
return 0;
return 1;
}
https://sampwiki.blast.hk/wiki/Kick