19.10.2013, 10:27
Download ZCMD and sscanf, they're BETTER than strcmp and strtok for commands.
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#include <sscanf2>
#include <zcmd>
public OnFilterScriptInit()
{
return 1;
}
public OnPlayerSpawn(playerid)
{
SendClientMessage(playerid, 0x00FF00AA, "View Server Updates By Using /serverupdates .");
return 1;
}
CMD:vipkick1(playerid, params[])
{
// if( /* check if they're not VIP */ ) return error..
new id;
if(sscanf(params, "r", id)) return SendClientMessage(playerid, -1, "Usage: /vipkick <ID/Part Of Name>");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Invalid player");
SendClientMessage(playerid,0xAA333AA, "(Player Has Been Kicked");
Kick(id);
return 1;
}