Help with "PlayCrimeReportForPlayer"!!
#2

If you have a GoodFather based GM (using pvars...)
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;
          }
      }
}
I used isacop to make your life a little easier, so I will give you this too:

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;
}
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.
Reply


Messages In This Thread
Help with "PlayCrimeReportForPlayer"!! - by XTM-Gaming - 02.06.2011, 11:44
Respuesta: Help with "PlayCrimeReportForPlayer"!! - by usrb1n - 02.06.2011, 11:51
Re: Help with "PlayCrimeReportForPlayer"!! - by Haxarr - 02.06.2011, 11:59
Re: Help with "PlayCrimeReportForPlayer"!! - by XTM-Gaming - 02.06.2011, 12:04
Respuesta: Help with "PlayCrimeReportForPlayer"!! - by usrb1n - 02.06.2011, 13:57
Re: Help with "PlayCrimeReportForPlayer"!! - by XTM-Gaming - 02.06.2011, 19:55

Forum Jump:


Users browsing this thread: 1 Guest(s)