13.09.2010, 17:18
(
Last edited by iggy1; 13/09/2010 at 05:32 PM.
Reason: lil mistake
)
This might work and be a bit clearer,
I hope it works for you. I should of made an "IsPlayerCivilTeam" lol would make that a bit shorter.
Oh and btw i didn't see any code where you set the players team or at least the PlayerTeam variable i hope you have that in the original code :/
pawn Code:
#define FILTERSCRIPT
#include <a_samp>
// ========= 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
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
new PlayerTeam[MAX_PLAYERS];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" VCRP Radio System");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerText(playerid, text[])
{
if(text[0] == '!' && PlayerTeam[playerid] == Team_LVPD || PlayerTeam[playerid] == Team_NSP || PlayerTeam[playerid] == Team_EMS || PlayerTeam[playerid] == Team_Fire))
{
MessageToCivilTeams(text);
return 0;
}
return 1;
}
stock MessageToCivilTeams(message[])
{
for(new i; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i))continue;
if(PlayerTeam[i] == Team_LVPD || PlayerTeam[i] == Team_NSP || PlayerTeam[i] == Team_EMS ||PlayerTeam[i] == Team_Fire)
{
SendClientMessage(i,0xB4B5B7AA,message);
}
}
}
Oh and btw i didn't see any code where you set the players team or at least the PlayerTeam variable i hope you have that in the original code :/