08.08.2012, 12:03
I'm doing a megaphone for my police/medics on my server, and I'm having a little trouble. I want them to only be able to use the megaphone whilst they're in a police car or an ambulance, this is what I've got...
pawn Код:
CMD:m(playerid, text[]) return cmd_megaphone(playerid, text);
CMD:megaphone(playerid, text[])
{
if(PlayerMuteInfo[playerid][AllMuted])
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, " You can't speak, you have been silenced!");
return 1;
}
if(IsACop(playerid))
{
else if(IsAnAmbulance(GetPlayerVehicleID(playerid)))
(
if(!IsPlayerInAnyVehicle(playerid) || !IsAnAmbulance(GetVehicleModel(GetPlayerVehicleID(playerid))) || !IsACopCar(GetVehicleModel(GetPlayerVehicleID(playerid))))
{
SendClientMessage(playerid, COLOR_LIGHTRED, " You are not in a police vehicle!");
return 1;