19.10.2012, 15:29
Hello guys, can you please tell me what's wrong with this zcmd? How do i show someone a message that the cmd has been typed?
http://pastebin.com/h32AF51v
http://pastebin.com/h32AF51v
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(playerid, COLOR_DARKRED, string); SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USE JETPACK); return 1; } |
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;
}