Help with setting team colors
#5

Quote:
Originally Posted by YanLanger
Посмотреть сообщение
I don't really understand i am not scripter

I am new xd
Then try to be one.
Read wiki pages, learn from other people's script.

Anyways, here is an example~

Put this on top of your script! (below includes)
pawn Код:
#define TEAM_GROVE  (0)
#define TEAM_BALLAS (1)
// Colors
#define COL_GREEN 0x33FF33FF
#define COL_PURPLE 0x2E8054FF
So, the top of your script should look like
pawn Код:
#include <a_samp>

#define TEAM_GROVE  (0)
#define TEAM_BALLAS (1)
// Colors
#define COL_GREEN 0x33FF33FF
#define COL_PURPLE 0x2E8054FF
On GameModeInit, put your classes (GroveStreet, Ballas) with AddPlayerClass
Then, go find the callback
pawn Код:
public OnPlayerSpawn(playerid)
Modify it to
pawn Код:
public OnPlayerSpawn(playerid)
{
    switch(GetPlayerSkin(playerid)) { // Get player's skin, and check it
        case 105..107 : { // Grove Street OGs Skins, I don't know what you have in your script
            SetPlayerTeam(playerid, TEAM_GROVE);
            SetPlayerColor(playerid, COL_GREEN);
        }
        case 102..104 : { // Ballas Skins, I don't know what you have in your script
            SetPlayerTeam(playerid, TEAM_BALLAS);
            SetPlayerColor(playerid, COL_PURPLE);
        }
    }
    return 1;
}
Easy, right?
Reply


Messages In This Thread
Help with setting team colors - by YanLanger - 30.06.2014, 15:04
AW: Help with setting team colors - by Macronix - 30.06.2014, 15:20
Re: Help with setting team colors - by YanLanger - 30.06.2014, 15:26
Re: Help with setting team colors - by ikkentim - 30.06.2014, 15:56
Re: Help with setting team colors - by greentarch - 30.06.2014, 16:00
Re: Help with setting team colors - by YanLanger - 30.06.2014, 16:21

Forum Jump:


Users browsing this thread: 5 Guest(s)