SA-MP Forums Archive
Checkpoint Question - 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: Checkpoint Question (/showthread.php?tid=143362)



Checkpoint Question - Steven82 - 22.04.2010

Is it possible(i think it is but i don't know how) to make the checkpoint viewable to only 1 team?

EX:

TEAM_GROVE
TEAM_BALLAS
TEAM_AZTECS
TEAM_VAGOS


Re: Checkpoint Question - Correlli - 22.04.2010

pawn Код:
/* using the sa:mp native GetPlayerTeam function. */
if(GetPlayerTeam(playerid) == TEAM_ID) SetPlayerCheckpoint(playerid, x_pos, y_pos, z_pos, size);
pawn Код:
/* using the player array. */
if(gTeam[playerid] == TEAM_ID) SetPlayerCheckpoint(playerid, x_pos, y_pos, z_pos, size);
pawn Код:
/* using the sa:mp PVar function (remember that this will ONLY work if you used the SetPVarInt before). */
if(GetPVarInt(playerid, "pTeam") == TEAM_ID) SetPlayerCheckpoint(playerid, x_pos, y_pos, z_pos, size);

/* setting the team. */
SetPVarInt(playerid, "pTeam", TEAM_ID);



Re: Checkpoint Question - Steven82 - 22.04.2010

Quote:
Originally Posted by Don Correlli
pawn Код:
/* using the sa:mp native GetPlayerTeam function. */
if(GetPlayerTeam(playerid) == TEAM_ID) SetPlayerCheckpoint(playerid, x_pos, y_pos, z_pos, size);
pawn Код:
/* using the player array. */
if(gTeam[playerid] == TEAM_ID) SetPlayerCheckpoint(playerid, x_pos, y_pos, z_pos, size);
pawn Код:
/* using the sa:mp PVar function (remember that this will ONLY work if you used the SetPVarInt before). */
if(GetPVarInt(playerid, "pTeam") == TEAM_ID) SetPlayerCheckpoint(playerid, x_pos, y_pos, z_pos, size);

/* setting the team. */
SetPVarInt(playerid, "pTeam", TEAM_ID);
Thanks your server need a beta tester , I can't wait it looks like so much fun!