gang colors
#1

i tried to make gang colors,like each gang got it's own color,like if he is in family slot 1,his color when he logs in will be for example pink,and slot 2 green.....,without any command,just if he is in a gang his name will be colors as his gang color,please help,but don't give me links,i read the most popular links and it doesn't help me,i am using ngg gamemode, i have tried like":OnPlayerSpawn...
If playerinfo......p[pfmember] == 1
SetPlayerColor(playerid, COLOR_PINK)
it did'nt show any error but it did'nt work
Reply
#2

If you're new to scripting, you shouldn't use NGG Mod.
If you're new at scripting, I would actually recommend you script on a blank script, test out Pawno, get the hang of it and only then attempt to play it with the big boys.

Anyway, as for your question:
Under your enum there should be something like:
pawn Код:
enum stuff
{
  Grovestreet,
  Ballas,
// ...
};
new pInfo[playerid][stuff];
Then under OnPlayerConnect:

pawn Код:
public OnPlayerConnect(playerid)
{
if(pInfo[playerid][Grovestreet] == 1)
// Set Color GREEN
// ... etc
return 1;
}
Is that what you mean?
Reply
#3

I dont need it for dm or tdm server,its rp server and i cant set the names if the families,i just want it to be like if he is in family slot 1 his color will be pink
Reply
#4

In this way you should create a variable to save team.

pawn Код:
gTeam[MAX_PLAYERS];
I'd recommend also to define the teams.

pawn Код:
#define TEAM_HITMAN 1
#define TEAM_ROBBER 2
#define TEAM_ADMIN 3
pawn Код:
gTeam[playerid] = TEAM_ROBBER;
pawn Код:
if(gTeam[playerid] == TEAM_ROBBER)
{
    SetPlayerColor(...);
}
Reply
#5

But i just cant define the names if i dont know what the players family's name
Reply
#6

What do you mean with 'players family's name' ?

Do you mean the SkinID?
Reply
#7

Eh,i need it to be coded like:
if(PlayerInfo[playerid][pFMember] == 1)
SetPlayerColor(playerid, COLOR_GREEN);
i have added this into onplayerspawn and onplayerconnect and on player login,it doesnt work
Reply
#8

deleted
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)