02.06.2011, 11:51
If you have a GoodFather based GM (using pvars...)
I used isacop to make your life a little easier, so I will give you this too:
On the top of your script
And the function....
Note: This will play the sound for the 3 cops factions (1,2,3 - LSPD, FBI, SAST) you can changed this with your factions id.
pawn Код:
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsACop(i))
{
PlayCrimeReportForPlayer(i,0,3) // or whatever you want, just use "i" instead of playerid
return 1;
}
}
}
On the top of your script
pawn Код:
forward IsACop(playerid);
And the function....
pawn Код:
public IsACop(playerid)
{
if(IsPlayerConnected(playerid))
{
new leader = PlayerInfo[playerid][pLeader];
new member = PlayerInfo[playerid][pMember];
if(member==1 || member==2 || member==3)
{
return 1;
}
else if(leader==1 || leader==2 || leader==3)
{
return 1;
}
}
return 0;
}