13.03.2011, 09:53
[ame]http://www.youtube.com/watch?v=HwBeNNjLB8k&feature=channel_video_title[/ame]
Watch this...
Edit: I suggest you to use sscanf and than you can easily create any command.
So, your command will look like this if you use sscanf.
Untested.
Watch this...
Edit: I suggest you to use sscanf and than you can easily create any command.
So, your command will look like this if you use sscanf.
pawn Код:
CMD:kick(playerid, params[])
{
new player, reason[128], str[128];
if(PlayerInfo[playerid][pAdminLevel] >= 2)
{
if(!sscanf(params, "us[128]",player, reason))
{
if(IsPlayerConnected(player))
{
SendClientMessage( playerid , 0xFFFFFFFF, "You have kicked the player!");
format(str, sizeof(str), "You got kicked by Admin | Reason: %s.", reason);
SendClientMessage( player , 0xFFFFFFFF, str);
Kick(player);
}
else return SendClientMessage( playerid , 0xFF0000FF, "This player is not online.");
}
else return SendClientMessage( playerid , 0xFFFFFFFF, "Usage: /kick [playerid][reason]");
}
else return SendClientMessage( playerid, 0xFF0000FF, "You'r not an admin!");
return 1;
}

