need help
#1

Hey all.

Someone helped me to make this:

dcmd_kick(playerid, params[])

{

new player;

new reason[64],name[24];

if (sscanf(params, "us", player,reason)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/kick <playerid> <reason>\"");

else if (player == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");

else

{

GetPlayerName(player,name,24);

format(reason,64,"%s has been kicked. Reason: %s,name,reason);

SendClientMessageToAll(0x00FF00AA, reason);

Kick(player);

}

return 1;

}

But now I have to know how to use the command.
He told me that I had to put this at the bottom of my script. Compiled without warnings/errors.
But what do I have to put in OnPlayerCommandText?
Because when I use /kick it doesn't works yet.
Reply
#2

OnPlayerCommandText

pawn Код:
dcmd(kick, 4, cmdtext);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)