24.11.2012, 04:00
Hello everyone,
I was having problem with the /megaphone command for LSPD, FBI and NG.
It was supposed to work while Inisde any of these vehicles but only works for LSPD. It doesn't work in NG and FBI vehicle.
Here is the code,
I need help.
I was having problem with the /megaphone command for LSPD, FBI and NG.
It was supposed to work while Inisde any of these vehicles but only works for LSPD. It doesn't work in NG and FBI vehicle.
Here is the code,
Код:
CMD:m(playerid, params[]) { new string[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(!IsACop(playerid) && !IsANG(playerid) && !IsAFBI(playerid) && !IsASSA(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an Leo Officer."); if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/m)egaphone [text]"); if(AntiAdv(playerid, params)) return 1; if(!IsLeoVehicle(GetPlayerVehicleID(playerid) && !IsNGVehicle (GetPlayerVehicleID(playerid) && !IsFBIVehicle (GetPlayerVehicleID(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You must be in an LEO vehicle to use the megaphone."); format(string, sizeof(string), "[%s:o< %s]", RPN(playerid), params); SendNearbyMessage(playerid, 40, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW); return 1; }