All teams are green!!!!!!!! -
samtey - 12.08.2011
OMG, like the title says!
I did this:
PHP код:
#define TEAM_GROVE_COLOR 0x00FF00AA // Bright Green (in RGBA format)
#define TEAM_BALLA_COLOR 0xFF00FFAA // Bright Purple
#define TEAM_VAGOS_COLOR 0xFFFF00AA // Yellow
And:
PHP код:
SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 0)
{
gTeam[playerid] = BALLA;
}
else if(classid == 1)
{
gTeam[playerid] = GROVE;
}
else if(classid == 2)
{
gTeam[playerid] = VAGOS;
}
}
SetPlayerToTeamColor(playerid)
{
if (gTeam[playerid] == GROVE)
{
SetPlayerColor(playerid, TEAM_GROVE_COLOR);
}
else if (gTeam[playerid] == BALLA)
{
SetPlayerColor(playerid, TEAM_BALLA_COLOR);
}
else if (gTeam[playerid] == VAGOS)
{
SetPlayerColor(playerid, TEAM_VAGOS_COLOR);
}
}
When I see a player on the map, he's green! EVERY PLAYER!
Also, I got the same problem in the CHAT! When somebody says something, it is only green, too!
Re: All teams are green!!!!!!!! -
MadeMan - 12.08.2011
How many classes you added with AddPlayerClass?
AW: All teams are green!!!!!!!! -
samtey - 12.08.2011
PHP код:
//Ballas
AddPlayerClass(102, 1974.4895,-1157.0608,20.9505,95.6222, 30, 350, 29, 350, 27, 350); //Ballas1
AddPlayerClass(103, 1976.7120,-1183.5504,26.0188,98.0542, 22, 350, 34, 350, 29, 350); //Ballas2
AddPlayerClass(104, 2092.0271,-1166.3419,26.5859,89.4869, 28, 350, 23, 350, 4, 0); //Ballas3
//Grove
AddPlayerClass(269, 2486.7598,-1647.5186,14.0703,187.5500, 30, 350, 25, 350, 24, 350); //Smoke
AddPlayerClass(271, 2459.9001,-1688.4135,13.5280,2.9949, 33, 350, 32, 350, 31, 350); //Ryder
AddPlayerClass(270,2516.3430,-1674.3085,13.9348,81.6422,32,350,31,350,34,350); // Sweet
AddPlayerClass(0,2495.4890,-1688.2717,13.7022,5.9233,1,0,29,350,27,350); // CJ
AddPlayerClass(105,2451.6484,-1642.4531,13.7357,182.6713,28,350,33,350,22,350); // grove1
AddPlayerClass(106,2413.7170,-1647.2096,14.0119,174.8622,26,350,30,350,23,350); // grove2
AddPlayerClass(107,2408.6982,-1674.0126,13.6037,356.5973,34,350,30,350,32,350); // grove3
//Vagos
AddPlayerClass(108,2571.8352,-1091.2091,66.9639,48.7203,29,350,9,0,31,350); // Vagos1
AddPlayerClass(109,2569.7373,-1088.5804,67.0079,220.8869,22,350,33,350,30,350); // Vagos2
AddPlayerClass(110,2576.0371,-1070.5568,69.8322,89.5007,27,350,24,350,32,350); // Vagos3
Re: All teams are green!!!!!!!! -
MadeMan - 12.08.2011
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
switch(classid)
{
case 0 .. 2:
{
gTeam[playerid] = BALLA;
}
case 3 .. 9:
{
gTeam[playerid] = GROVE;
}
case 10 .. 12:
{
gTeam[playerid] = VAGOS;
}
}
}
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);
}
}
}
AW: All teams are green!!!!!!!! -
samtey - 12.08.2011
Код:
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(330) : error 008: must be a constant expression; assumed zero
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(334) : error 008: must be a constant expression; assumed zero
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(338) : error 008: must be a constant expression; assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
lines:
pawn Код:
case GROVE:
case BALLA:
case VAGOS:
Re: All teams are green!!!!!!!! -
MadeMan - 12.08.2011
Don't change SetPlayerToTeamColor then.
AW: All teams are green!!!!!!!! -
samtey - 12.08.2011
Well, so far no errors, I can't test it yet 'cause nobody else is online!
What about the chat, why the hell is there every person who speaks green?
I have this, but this does not work!
PHP код:
public OnPlayerText(playerid, text[])
{
new sendername[MAX_PLAYER_NAME], string[128];
if(chatmode)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s: %s", sendername, text);
if(gTeam[playerid] == GROVE)
{
SendLocalChat(playerid,0x00FF00AA,string,20.0);
return 0;
}
if(gTeam[playerid] == BALLA)
{
SendLocalChat(playerid,0xFF00FFAA,string,20.0);
return 0;
}
if(gTeam[playerid] == VAGOS)
{
SendLocalChat(playerid,0xFFFF00AA,string,20.0);
return 0;
}
}
return 0;
}
Re: All teams are green!!!!!!!! -
Wesley221 - 12.08.2011
pawn Код:
CMD:test(playerid, params[])
{
new string[128];
format(string, sizeof string, "gTeam[playerid] = %s", gTeam[playerid]);
SendClientMessage(playerid, -1, string);
return 1;
}
Check if the gTeams are right with each team
AW: All teams are green!!!!!!!! -
samtey - 12.08.2011
But I need to know if the colors of the teams are right also!
Re: All teams are green!!!!!!!! -
Wesley221 - 12.08.2011
First just check if the gTeams are right
Re: All teams are green!!!!!!!! -
MadeMan - 12.08.2011
Your teams were wrongly set in SetPlayerTeamFromClass.
AW: All teams are green!!!!!!!! -
samtey - 12.08.2011
Does this also improve the Localchat? Is the localchat right now, too?
Re: All teams are green!!!!!!!! -
MadeMan - 12.08.2011
Should be.
AW: All teams are green!!!!!!!! -
samtey - 12.08.2011
Hmm, we tested it, still all names are green and the dots on the map, too!
Also the chat!
Re: All teams are green!!!!!!!! -
Zonoya - 12.08.2011
simple to fix look at my code this works PERFECTLY all u have to do is add the classes and do this
if(GetPlayerSkin(playerid, 116))
if(GetPlayerSkin(playerid, 115))
if(GetPlayerSkin(playerid, 114))
SetPlayerColor(playerid, Purpley);
SetPlayerMarkerForPlayer( i, playerid, Purpley );
thats all u do so say its Balla's u use if(getPlayerSkin(playerid, Balla skin 1))
then after SetPlayerColor(playerid, (Balla Purple);
same with vangos and Grove
if it works give me +rep plz
AW: All teams are green!!!!!!!! -
samtey - 12.08.2011
Omg, where to add this?^^
Re: All teams are green!!!!!!!! -
Zonoya - 12.08.2011
under OnPlayerSpawn so if they have the skin when they spawn they get the color
AW: All teams are green!!!!!!!! -
samtey - 13.08.2011
Oh man, I'm such too stupid, can you do it in the callback please?
PHP код:
public OnPlayerSpawn(playerid)
{
GangZoneShowForPlayer(playerid, ballas1, -2147418167);
GangZoneShowForPlayer(playerid, ballas2, -2147418167);
GangZoneShowForPlayer(playerid, ballas3, -2147418167);
GangZoneShowForPlayer(playerid, grove1, 16711888);
GangZoneShowForPlayer(playerid, grove2, 16711888);
GangZoneShowForPlayer(playerid, grove3, 16711888);
GangZoneShowForPlayer(playerid, vagos1, -65332);
GangZoneShowForPlayer(playerid, vagos2, -65332);
PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
SetPlayerToTeamColor(playerid);
PlayerInfo[playerid][pDead] = false;
//PreloadAnimLib(playerid,animlib[]);
return 1;
}
Re: All teams are green!!!!!!!! -
MadeMan - 13.08.2011
Remove this
add this
pawn Код:
#define GROVE 1
#define BALLA 2
#define VAGOS 3
change this
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);
}
}
}
Re: All teams are green!!!!!!!! -
Zonoya - 13.08.2011
yeah thats a good way