pawn Код:
dcmd_kick(playerid, params[])
{
if(AccountInfo[playerid][AdminLevel] <=1)
{
new pName[24], pVictim[24], gMessage[250], iD, gReason[250];
if(sscanf(params, "us[250]", iD, gReason)) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /kick [playerid] [reason]");
else if(iD == playerid) return SendClientMessage(playerid, 0xFFFFFFFF, "You cannot use this command on yourself.");
else if(!IsPlayerConnected(iD)) return return SendClientMessage(playerid, 0xFFFFFFFF, "That player is not connected.");
else
{
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerName(iD, gVictim, sizeof(gVictim));
format(gMessage, sizeof(gMessage), "* Server: %s has been kicked from the server by %s. Reason: %s", gVictim, pName, gReason);
SendClientMessageToAll(0xFF0000FF, gMessage);
Kick(iD);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "* You are not an admin.");
}
return 1;
}
If that fails to load, make sure you've downloaded the correct version of sscanf, and also make sure that you've added it to the plugins line on your config.ini
+ Rep if I've helped.