SA-MP Forums Archive
gang colors - 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: gang colors (/showthread.php?tid=475653)



gang colors - iBots - 14.11.2013

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


Re: gang colors - Elie1996 - 14.11.2013

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?


Re: gang colors - iBots - 16.11.2013

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


AW: gang colors - Skimmer - 16.11.2013

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(...);
}



Re: gang colors - iBots - 16.11.2013

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


AW: gang colors - Skimmer - 16.11.2013

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

Do you mean the SkinID?


Re: gang colors - iBots - 17.11.2013

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


Re: gang colors - iBots - 17.11.2013

deleted