SA-MP Forums Archive
[HELP] how to use setplayertoteamcolor - 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: [HELP] how to use setplayertoteamcolor (/showthread.php?tid=232890)



[HELP] how to use setplayertoteamcolor - Banana123 - 28.02.2011

how do i set up the setplayertoteamcolor on LARP script. not setplayercolor like that you can see on tab the colors of the teams and stuff, thankss.


Re : [HELP] how to use setplayertoteamcolor - vernz - 28.02.2011

Код:
public SetPlayerToTeamColor(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	SetPlayerColor(playerid,TEAM_HIT_COLOR); // white
	if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
     	SetPlayerColor(playerid,TEAM_BLUE_COLOR);
        if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
        SetPlayerColor(playerid,COLOR_ARMY);
        if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
        SetPlayerColor(playerid,0x3c5085ff);
        if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 1)
        SetPlayerColor(playerid,TEAM_BLUE_COLOR);
        if (PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
        SetPlayerColor(playerid,COLOR_SOS);
        if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
        SetPlayerColor(playerid,CF_COLOR);
        if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
        SetPlayerColor(playerid,COLOR_HITMAN);
        if (PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)
        SetPlayerColor(playerid,COLOR_TSD);
        if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
	SetPlayerColor(playerid, COLOR_BK);
        if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
        SetPlayerColor(playerid,COLOR_ALLDEPT);
        if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
        SetPlayerColor(playerid,COLOR_DT);
        if (PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
        SetPlayerColor(playerid,COLOR_BOD);
        if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
        SetPlayerColor(playerid,COLOR_BB);
        if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
        SetPlayerColor(playerid,COLOR_ACAB);
        if (PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17)
        SetPlayerColor(playerid,COLOR_B4L);
        if (PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18)
        SetPlayerColor(playerid,COLOR_LCF);

	}
}
You just have to go at public SetPlayerToTeamColor and then add yours


Re: Re : [HELP] how to use setplayertoteamcolor - Banana123 - 28.02.2011

Quote:
Originally Posted by vernz
Посмотреть сообщение
Код:
public SetPlayerToTeamColor(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	SetPlayerColor(playerid,TEAM_HIT_COLOR); // white
	if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
     	SetPlayerColor(playerid,TEAM_BLUE_COLOR);
        if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
        SetPlayerColor(playerid,COLOR_ARMY);
        if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
        SetPlayerColor(playerid,0x3c5085ff);
        if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 1)
        SetPlayerColor(playerid,TEAM_BLUE_COLOR);
        if (PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
        SetPlayerColor(playerid,COLOR_SOS);
        if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
        SetPlayerColor(playerid,CF_COLOR);
        if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
        SetPlayerColor(playerid,COLOR_HITMAN);
        if (PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)
        SetPlayerColor(playerid,COLOR_TSD);
        if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
	SetPlayerColor(playerid, COLOR_BK);
        if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
        SetPlayerColor(playerid,COLOR_ALLDEPT);
        if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
        SetPlayerColor(playerid,COLOR_DT);
        if (PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
        SetPlayerColor(playerid,COLOR_BOD);
        if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
        SetPlayerColor(playerid,COLOR_BB);
        if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
        SetPlayerColor(playerid,COLOR_ACAB);
        if (PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17)
        SetPlayerColor(playerid,COLOR_B4L);
        if (PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18)
        SetPlayerColor(playerid,COLOR_LCF);

	}
}
You just have to go at public SetPlayerToTeamColor and then add yours
the thing is that when you setplayercolor you will be shown in the minimap.. but i'm looking for a color that it will be shown only at tab. in example police department, when you click tab you'll see all police dep people in blue, not in a map, setplayertoteamcolor


Re : [HELP] how to use setplayertoteamcolor - vernz - 28.02.2011

Fine the thing for that isnt there you have to disable the icon color from the little radar but for that, im not sure


Re: Re : [HELP] how to use setplayertoteamcolor - Mike Garber - 28.02.2011

Quote:
Originally Posted by Banana123
Посмотреть сообщение
the thing is that when you setplayercolor you will be shown in the minimap.. but i'm looking for a color that it will be shown only at tab. in example police department, when you click tab you'll see all police dep people in blue, not in a map, setplayertoteamcolor
You're wrong, SetPlayerColor will not cause you to show up in the minimap. I use It for my server and it works fine.


Re: Re : [HELP] how to use setplayertoteamcolor - Banana123 - 28.02.2011

Quote:
Originally Posted by vernz
Посмотреть сообщение
Fine the thing for that isnt there you have to disable the icon color from the little radar but for that, im not sure
where can i disable the minimap colors?


Re: [HELP] how to use setplayertoteamcolor - Mike Garber - 28.02.2011

Put
pawn Код:
ShowPlayerMarkers(0);
In OnGameModeInit.


Re: Re : [HELP] how to use setplayertoteamcolor - Banana123 - 28.02.2011

edit nothing!


Re: [HELP] how to use setplayertoteamcolor - Banana123 - 28.02.2011

Quote:
Originally Posted by Mike Garber
Посмотреть сообщение
Put
pawn Код:
ShowPlayerMarkers(0);
In OnGameModeInit.
exactly where?

Quote:

public OnGameModeInit()
ShowPlayerMarkers(0);
{
new string[MAX_PLAYER_NAME];
new string1[MAX_PLAYER_NAME];
for(new c=0;c<CAR_AMOUNT;c++)
{
Gas[c] = GasMax;
}
LoadCar();
CreateFoodMenus();
CreateGuideMenus();




Re: [HELP] how to use setplayertoteamcolor - Banana123 - 28.02.2011

i got it, thanks!