19.10.2012, 15:40
pawn Код:
CMD:jetpack(playerid, params[])
{
new string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(sscanf(params, "u", playerid));
format(string, sizeof(string), "AdmCmd %s has spawned a Jetpack.", sendername);
ABroadCast(COLOR_DARKRED, string);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
return 1;
}
stock ABroadCast(color,string[],level)
{
foreach(Player, i)
{
if (PlayerInfo[i][pAdmin] >= level)
{
SendClientMessageEx(i, color, string);
}
}
return 1;
}