24.01.2011, 06:57
If you put the command inside an include and include it in your code the command will work.
Example
And use this (if the name of the include is bartje)
Example
pawn Код:
#if defined _bartje_included
#endinput
#endif
COMMAND:kick(playerid,params[])
{
new reason[50],id,string[286];
if(adminlevel[playerid] <1) return SendClientMessage(playerid,COLOR_RED,"You're not allowed to do this");
if(sscanf(params,"us[50]",id,reason)) return SendClientMessage(playerid, COLOR_GREY, "HINT: /kick [playerid] [reason]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Player not connected");
else
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerName(id, playername2, sizeof(playername2));
format(string,sizeof(string),"Admin %s has kicked %s Reason: %s",playername,playername2,reason);
SendClientMessageToAll(COLOR_RED,string);
Kick(id);
return 1;
}
pawn Код:
#include <bartje>