pawn Code:
#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
new channel[MAX_PLAYERS];
new PlayerTeam[MAX_PLAYERS];
// ========= TEAMS START =================
#define Team_Civ 0
#define Team_LVPD 1
#define Team_NSP 2
#define Team_EMS 3
#define Team_Fire 4
#define Team_Admin 5
#define Team_Jail 6
#define Team_Taxi 7
// =========== TEAMS END ===========-====
// =========== NEWS ==============
public OnPlayerText(playerid, text[])
{
if(text[0] == '!')
{
new string[256],name3[24];
GetPlayerName(playerid,name3,24);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerTeam[playerid] == Team_NSP && channel[playerid] == 1 || PlayerTeam[playerid] == Team_LVPD && channel[playerid] == 1 || PlayerTeam[playerid] == Team_EMS && channel[playerid] == 1 || PlayerTeam[playerid] == Team_Fire && channel[playerid] == 1)
format(string,sizeof string,"(NSP): %s: %s",name3,text);
SendClientMessage(i, 0xB4B5B7AA, string);
}
}
return 0;
}
return 1;
}
// =================== COLORS ======================
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" VCRP Radio System");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#endif
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
channel[playerid] = 0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
channel[playerid] = 0;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/pdradio", true) == 0)
{
channel[playerid] = 1;
return 1;
}
return 0;
}
/*
if(channel[playerid] == 1)//if the channel is 1
{
for(new i=0; i<MAX_PLAYERS; i++) {
{
if(PlayerTeam[playerid] == Team_NSP || PlayerTeam[playerid] == Team_LVPD || PlayerTeam[playerid] == Team_Fire || PlayerTeam[playerid] == Team_EMS)
{
SendClientMessage(i,COLOR_INDIGO,text);
}
}
return 0;
}
}
*/
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}