SA-MP Forums Archive
how to make a color for class? - 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: how to make a color for class? (/showthread.php?tid=294615)



how to make a color for class? - niels44 - 02.11.2011

hey everyone i made some classes now but i want it to make it that when a player clicks from player to player to choose 1 skin that above the player a line is which class it is in the right colour... how to make this i made something with GameTextFOrPlayer but i want to make it with colours pls help how to make this?


Re: how to make a color for class? - Kostas' - 02.11.2011

pawn Код:
SetPlayerToTeamColor(playerid)
{
    switch(gTeam[playerid])
    {
        case GROVE:
        {
            SetPlayerColor(playerid, TEAM_GROVE_COLOR);
        }
        case BALLA:
        {
            SetPlayerColor(playerid, TEAM_BALLA_COLOR);
        }
        case VAGOS:
        {
            SetPlayerColor(playerid, TEAM_VAGOS_COLOR);
        }
    }
}
Change the names to your team's names


Re: how to make a color for class? - niels44 - 02.11.2011

i already have this bro.... but it doesnt shows up...


Re: how to make a color for class? - Kostas' - 02.11.2011

Quote:
Originally Posted by niels44
Посмотреть сообщение
when a player clicks from player to player to choose 1 skin that above the player a line is which class it is in the right colour
What do you mean with this


Re: how to make a color for class? - Kakioshe22 - 02.11.2011

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    switch(
classid)
    {
        case 
0: { GameTextForPlayer(playerid"~r~Name 1"30006); }
        case 
1: { GameTextForPlayer(playerid"~r~Name 2"30006); }
        case 
2: { GameTextForPlayer(playerid"~r~Name 3"30006); }
        case 
3: { GameTextForPlayer(playerid"~r~Name 4"30006); }
        case 
4: { GameTextForPlayer(playerid"~r~Name 5"30006); }
        case 
5: { GameTextForPlayer(playerid"~r~Name 6"30006); }
        case 
6: { GameTextForPlayer(playerid"~r~Name 7"30006); }
        case 
7: { GameTextForPlayer(playerid"~r~Name 8"30006); }
        case 
8: { GameTextForPlayer(playerid"~r~Name 9"30006); }
        case 
9: { GameTextForPlayer(playerid"~r~Name 10"30006); }
        case 
10: { GameTextForPlayer(playerid"~r~Name 11"30006); }
}
        
SetPlayerPos(playerid,xyz);
        
SetPlayerCameraPos(playerid,512.8983,-11.3015,1001.5653);
        
SetPlayerCameraLookAt(playerid,512.9496,-15.1374,1001.5653);
        
SetPlayerFacingAngle(playerid0.2594);
        return 
1;

PHP код:
GameTextForPlayer(playerid"~r~Nice Old Man"30006); } //by this at ~r~ you type every color you want, the colors first letter 
At SetPlayerPos and that, you put where you want to put the look at, Hope i helped


Re: how to make a color for class? - niels44 - 02.11.2011

now i have a bugg that when i choose a skin there is ID 0 too the cj skin but how to remove that one? becuz its not 1 of the AddPlayerClasses... how to make this 1 dissapear?


AW: how to make a color for class? - Santox14 - 03.11.2011

Show me your AddPlayerClasse's