SA-MP Forums Archive
Dont know how to make color, help me? - 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: Dont know how to make color, help me? (/showthread.php?tid=71470)



Dont know how to make color, help me? - Frankox - 01.04.2009

I made 3 gangs, and now i made colors and after it i get in game and then i chossed some gang i had color what i wanted, but after i type /kill and press F4 to change skin and i change it to other gang skin , it has color of the gang what i had before.




HELP


Re: Dont know how to make color, help me? - Mikep - 01.04.2009

What do you wan't us to do without any code to see?


Re: Dont know how to make color, help me? - Frankox - 01.04.2009

Quote:
Originally Posted by Mikep
What do you wan't us to do without any code to see?
public OnPlayerRequestSpawn(playerid)
{
if (gTeam[playerid] == TEAM_GROVE)
{
SetPlayerColor(playerid,TEAM_GROVE_COLOR);
}
else if (gTeam[playerid] == TEAM_BALLAS)
{
SetPlayerColor(playerid, TEAM_BALLAS_COLOR);
}
else if (gTeam[playerid] == TEAM_VAGOS)
{
SetPlayerColor(playerid, TEAM_VAGOS_COLOR);
}
return 1;
}

public SetPlayerToTeamColor(playerid)
{
if (gTeam[playerid] == TEAM_GROVE)
{
SetPlayerColor(playerid,TEAM_GROVE_COLOR);
}
else if (gTeam[playerid] == TEAM_BALLAS)
{
SetPlayerColor(playerid, TEAM_BALLAS_COLOR);
}
else if (gTeam[playerid] == TEAM_VAGOS)
{
SetPlayerColor(playerid, TEAM_VAGOS_COLOR);
}
return 1;
}

public SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 0 || classid == 1 || classid == 2 )
{
gTeam[playerid] = TEAM_GROVE;
}
else
if (classid == 3 || classid == 4 || classid == 5 )

{
gTeam[playerid] = TEAM_BALLAS;
}
else
if (classid == 6 || classid == 7 || classid == 8 )

{
gTeam[playerid] = TEAM_VAGOS;
}
return 1;
}















REPATING, i have colors but when i want to change the class, i change it and i have the color from the gang what i chossed first.


Re: Dont know how to make color, help me? - Crake^ - 01.04.2009

You have to define the colors

#define TEAM_COLOR_GROVE 0x00ff0000

Get a whole list of colors here - http://pastebin.com/f7fa3eecd