need help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: need help (
/showthread.php?tid=124366)
need help -
bartje01 - 30.01.2010
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.
Re: need help -
MadeMan - 30.01.2010
OnPlayerCommandText