Help - 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)
+--- Thread: Help (
/showthread.php?tid=606765)
Help -
karoliko - 08.05.2016
I need a system to my TDM server, i have 2 teams and i use gTeam (My teams are Policias and Terroristas)
I want to each team only can see on the map his team players
Example:
Player of Policias team can only see the other Policias
Please help me with this
Re: Help -
TheSimpleGuy - 08.05.2016
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerTeam(i) == GetPlayerTeam(playerid))
{
SetPlayerMarkerForPlayer(playerid, i, 0xFF0000FF); //select color
}
}
Place in any callback which you would like to start.
Respuesta: Help -
karoliko - 08.05.2016
In wich callback? Can you write example please...
Can you edit it to me to gTeam (Team 1: Policias, team 2: Terroristas)
Because i want to each team have one color, Azul (Blue) for Policias and Rojo (Red) for Terroristas.
Код:
static gTeam[MAX_PLAYERS];
#define Policias 1
#define Terroristas 2
#define RojoMarcado 0xFF0000FF //Colour for Terroristas
#define AzulMarcado 0x0000FFFF //Colour for Policias
Re: Help -
DTV - 08.05.2016
You could use something like:
pawn Код:
OnPlayerSpawn(playerid)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(gTeam[playerid] == 1) //Police team
{
SetPlayerMarkerForPlayer(playerid, i, COLOR_RED);
}
else SetPlayerMarkerForPlayer(playerid, i, COLOR_BLUE);
}
return 1;
}
Note that you'll have to define COLOR_RED and COLOR_BLUE to actually work.
Respuesta: Help -
karoliko - 08.05.2016
And if someone new join the server? This will update showing new players?
Respuesta: Help -
karoliko - 09.05.2016
BUMP
Re: Help -
Dayrion - 09.05.2016
This will not update marker for the player until he spawn again.
Respuesta: Re: Help -
karoliko - 09.05.2016
Quote:
Originally Posted by Dayrion
This will not update marker for the player until he spawn again.
|
Any mode to do it?
Re: Respuesta: Re: Help -
Dayrion - 09.05.2016
Quote:
Originally Posted by karoliko
Any mode to do it?
|
You can try to set a timer and include the function in this timer. Something like that.
Respuesta: Help -
karoliko - 09.05.2016
Can you do the code, i don't know... :3