Include help please
#2

If you put the command inside an include and include it in your code the command will work.
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;
}
And use this (if the name of the include is bartje)
pawn Код:
#include <bartje>
Reply


Messages In This Thread
Include help please - by bartje01 - 24.01.2011, 06:33
Re: Include help please - by iggy1 - 24.01.2011, 06:57
Re: Include help please - by alpha500delta - 24.01.2011, 12:38
Re: Include help please - by bartje01 - 24.01.2011, 13:05

Forum Jump:


Users browsing this thread: 2 Guest(s)