color/teams problem
#1

i have one problem... i'm trying to make gangs (ballas, grove street, los aztecas, vagos)
when i connect to my server, there are problem with team colors (example. ballas have blue color)

classes:
Код:
//BALLAS
	AddPlayerClass(102,2202.8977,-1152.3108,29.8044,270.2080,0,0,0,0,0,0);
	AddPlayerClass(103,2202.8977,-1152.3108,29.8044,270.2080,0,0,0,0,0,0);
	AddPlayerClass(104,2202.8977,-1152.3108,29.8044,270.2080,0,0,0,0,0,0);

	//GROVE STREET
	AddPlayerClass(105,2510.9287,-1691.7239,13.5095,9.3615,0,0,0,0,0,0);
	AddPlayerClass(106,2510.9287,-1691.7239,13.5095,9.3615,0,0,0,0,0,0);
	AddPlayerClass(107,2510.9287,-1691.7239,13.5095,9.3615,0,0,0,0,0,0);

	//VAGOS
	AddPlayerClass(108,2804.8940,-1427.1069,40.0625,180.4031,0,0,0,0,0,0);
	AddPlayerClass(109,2804.8940,-1427.1069,40.0625,180.4031,0,0,0,0,0,0);
	AddPlayerClass(110,2804.8940,-1427.1069,40.0625,180.4031,0,0,0,0,0,0);

	//LOS AZTECAS
	AddPlayerClass(114,1808.8962,-1939.7173,13.5469,26.0726,0,0,0,0,0,0);
	AddPlayerClass(115,1808.8962,-1939.7173,13.5469,26.0726,0,0,0,0,0,0);
	AddPlayerClass(116,1808.8962,-1939.7173,13.5469,26.0726,0,0,0,0,0,0);
defines:
Код:
#define BALLAS 1
#define GROVE 2
#define VAGOS 3
#define LOSAZTECAS 4
Код:
new team;
	team = GetPlayerTeam(playerid);
	
  if(team == BALLAS)
  {
    SetPlayerColor(playerid, 0xAD6ECFF);
  }
	if(team == GROVE)
  {
    SetPlayerColor(playerid, 0x00BF00FF);
  }
  if(team == VAGOS)
  {
    SetPlayerColor(playerid, 0x39E2FBFF);
  }
	if(team == LOSAZTECAS)
  {
    SetPlayerColor(playerid, 0xEAEA00FF);
  }
classid:
Код:
if(classid == 0)
  {
    SetPlayerTeam(playerid, BALLAS);
  }
  if(classid == 1)
  {
    SetPlayerTeam(playerid, BALLAS);
  }
  if(classid == 2)
  {
    SetPlayerTeam(playerid, BALLAS);
  }
  if(classid == 3)
  {
    SetPlayerTeam(playerid, GROVE);
  }
  if(classid == 4)
  {
    SetPlayerTeam(playerid, GROVE);
  }
  if(classid == 5)
  {
    SetPlayerTeam(playerid, GROVE);
  }
  if(classid == 6)
  {
    SetPlayerTeam(playerid, VAGOS);
  }
  if(classid == 7)
  {
    SetPlayerTeam(playerid, VAGOS);
  }
  if(classid == 8)
  {
    SetPlayerTeam(playerid, VAGOS);
  }
  if(classid == 9)
  {
    SetPlayerTeam(playerid, LOSAZTECAS);
  }
  if(classid == 10)
  {
    SetPlayerTeam(playerid, LOSAZTECAS);
  }
  if(classid == 11)
  {
    SetPlayerTeam(playerid, LOSAZTECAS);
  }
Reply
#2

try with this

put somewhere and modify

Код:
public SetPlayerToTeamColor(playerid)
{
	if(gTeam[playerid] == TEAM_GROVE)
	{
		SetPlayerColor(playerid,0x33AA33AA); // green
	}
	if(gTeam[playerid] == TEAM_COP)
	{
	  SetPlayerColor(playerid,0x375FFFFF); // blue
	}
}
somewhere in script put and modify

Код:
SetPlayerTeamFromClass(playerid, classid)
{
	if(classid == 0 || classid == 1 || classid == 2)
	{
		gTeam[playerid] = TEAM_GROVE; // DONE
	}
	if(classid == 3 || classid == 4)
	{
	  gTeam[playerid] = TEAM_COP; // DONE
	}
}
OnPlayerSpawn

Код:
SetPlayerToTeamColor(playerid);
TopOfScript

Код:
forward SetPlayerToTeamColor(playerid);
try with this things

EDIT: try with gTeam

put this Top Of Your SCRIPT

Код:
static gTeam[MAX_PLAYERS]; // Tracks the team assignment for each player
Reply
#3

i did this already (from http://weedarr.wikidot.com/teams)

it didn't work.... grove street and ballas colors are good but vagos are blue and los aztecas are yellow
Reply
#4

post me your script in pastebin and i will modify it ... if you want ofc
Reply
#5

Quote:
Originally Posted by Lajko1
post me your script in pastebin and i will modify it ... if you want ofc
here you go.... http://pastebin.com/f5b52276a
Reply
#6

DUDE!!!
if
{
}
"ELSE" if
{
}
Where's else
Reply
#7

Quote:
Originally Posted by DJDhan
DUDE!!!
if
{
}
"ELSE" if
{
}
Where's else
it doesn't work anyway.... i need teams!

EDIT:
grove street color - green (good)
ballas color - purple (good)
vagos color - light blue (not good)
los aztecas color - yellow (not good)
Reply
#8

you ever heard for defining COLORS ? lol

http://pastebin.com/m12176ecd

i think this should work

now i go test
Reply
#9

Quote:
Originally Posted by Lajko1
you ever heard for defining COLORS ? lol

http://pastebin.com/m12176ecd

i think this should work

now i go test
damn!!!! it doesn't work.................
Reply
#10

There I Mess With Colors Here I Just Change Colors

http://pastebin.com/m1a7f9128

what is worng in script that i post before ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)