SA-MP Forums Archive
How do i do this? (checkpoint for a team) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How do i do this? (checkpoint for a team) (/showthread.php?tid=109754)



How do i do this? (checkpoint for a team) - chaosnz - 22.11.2009

I'm making a job service on my server for the police and theres a command im making where players type /police to call an officer to their position. After being able to create a checkpoint for the player who "Called" the police, and managing to remove it once the police arrive, i tried to set it up so anyone who's a cop, sees the checkpoint and then heads to that location. But im not sure how to do that.

Can someone please tell me what i need to do to show the checkpoint FOR the players who are cops?


Re: How do i do this? (checkpoint for a team) - dice7 - 22.11.2009

This loops through all players and checks if they're cops

pawn Код:
for(new id = 0; id < MAX_PLAYERS; id++)
{
  if(gTeam[id] == TEAM_COP) //or whatever you use
  {
    SetPlayerCheckpoint(id, x, y, z, radius);
  }
}



Re: How do i do this? (checkpoint for a team) - chaosnz - 22.11.2009

thanks, much appreciated