Bug -
nightday - 03.09.2014
Bug Showing Player Team Withe its Color Withe Showing it Blue Lol And Color Blue its Cyan And Color Cyan Blue any one can help me
PHP код:
#include <a_samp>
#define COLOR_Withe 0xFFFFFF
#define COLOR_Blue 0x0099FF
#define COLOR_Cyan 0x99FFFF
// Define the teams so its easier to use later
#define TEAM_BLUE 1
#define TEAM_Withe 2
#define TEAM_Cyan 3
// Define the colours you want each team to be, its easier for later on
#define TEAM_BLUE_COLOUR 0x0099FF // blue duh
#define TEAM_Withe_COLOUR 0xFFFFFF // Withe duh
#define TEAM_Cyan_COLOUR 0x99FFFF // Cyan duh
// Tracks what team a player is in
new gTeam[MAX_PLAYERS];
main()
{
print("\n----------------------------------");
print(" Cops And Robbers");
print("----------------------------------\n");
}
public OnGameModeInit()
{
SetGameModeText("Cops And Robbers");
AddPlayerClass(266,2303.9497,2439.0103,3.2734,19.1234,3,1,22,50,29,500); // blue team
AddPlayerClass(211,2303.9497,2439.0103,3.2734,19.1234,3,1,22,50,29,500); // blue team
AddPlayerClass(265,2303.9497,2439.0103,3.2734,19.1234,3,1,22,50,29,500); // blue team
AddPlayerClass(267,2303.9497,2439.0103,3.2734,19.1234,3,1,22,50,29,500); // blue team
AddPlayerClass(283,2303.9497,2439.0103,3.2734,19.1234,3,1,22,50,29,500); // blue team
AddPlayerClass(284,2303.9497,2439.0103,3.2734,19.1234,3,1,22,50,29,500); // blue team
AddPlayerClass(285,2303.9497,2439.0103,3.2734,19.1234,3,1,22,50,29,500); // Cyan team
AddPlayerClass(71,-1261.6409,38.9104,14.1387,226.4688,3,1,22,50,29,500); // Withe team
AddPlayerClass(50,2006.1929,2295.9451,10.8203,177.4306,22,50,0,0,0,0); // Withe team
AddPlayerClass(133,1151.7200,1399.4144,5.8203,0.9030,22,50,0,0,0,0); // Withe team
AddPlayerClass(151,1151.7200,1399.4144,5.8203,0.9030,22,50,0,0,0,0); // Withe team
AddPlayerClass(12,2090.1008,2078.2600,10.8203,263.0699,0,0,0,0,0,0); // Withe team
AddPlayerClass(23,2090.1008,2078.2600,10.8203,263.0699,0,0,0,0,0,0); // Withe team
AddPlayerClass(29,2815.0498,2254.1252,10.8203,158.6954,0,0,0,0,0,0); // Withe team
AddPlayerClass(294,2814.0542,2253.4043,10.8203,315.9051,0,0,0,0,0,0); // Withe team
AddPlayerClass(214,2812.1963,2247.7256,10.8203,352.8735,0,0,0,0,0,0); // Withe team
AddPlayerClass(1,2634.0793,1072.6293,10.8203,88.4012,0,0,0,0,0,0); // Withe team
AddPlayerClass(15,2634.0793,1072.6293,10.8203,88.4012,0,0,0,0,0,0); // Withe team
AddPlayerClass(34,2634.0793,1072.6293,10.8203,88.4012,0,0,0,0,0,0); // Withe team
AddPlayerClass(2,2193.6528,2007.7402,12.2894,1.8574,0,0,0,0,0,0); // Withe team
AddPlayerClass(9,2193.6528,2007.7402,12.2894,1.8574,0,0,0,0,0,0); // Withe team
AddPlayerClass(19,2193.6528,2007.7402,12.2894,1.8574,0,0,0,0,0,0); // Withe team
AddPlayerClass(22,2193.6528,2007.7402,12.2894,1.8574,0,0,0,0,0,0); // Withe team
AddPlayerClass(26,2082.0784,2480.8333,10.8203,182.0390,0,0,0,0,0,0); // Withe team
AddPlayerClass(31,2082.0784,2480.8333,10.8203,182.0390,0,0,0,0,0,0); // Withe team
AddPlayerClass(45,2082.0784,2480.8333,10.8203,182.0390,0,0,0,0,0,0); // Withe team
AddPlayerClass(46,2082.0784,2480.8333,10.8203,182.0390,0,0,0,0,0,0); // Withe team
AddPlayerClass(9,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(13,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(14,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(24,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(33,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(36,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(38,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(160,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(82,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(107,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(59,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(127,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(128,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(138,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(28,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(147,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(299,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(123,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(204,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(249,2193.7366,2007.4865,12.2894,358.2378,15,1,15,500,28,500); // Withe team
AddPlayerClass(264,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(269,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(270,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(293,2193.5884,2007.4149,12.2894,355.9373,0,0,0,0,0,0); // Withe team
AddPlayerClass(271,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // Withe team
AddPlayerClass(298,2193.5884,2007.4149,12.2894,355.9373,0,0,0,0,0,0); // Withe team
AddPlayerClass(137,2193.5884,2007.4149,12.2894,355.9373,0,0,0,0,0,0); // Withe team
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid); // calls the custom function
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColour(playerid); // calls the custom function
return 1;
}
forward SetPlayerTeamFromClass(playerid, classid);
public SetPlayerTeamFromClass(playerid, classid)
{
if(classid == 0)
{
gTeam[playerid] = TEAM_BLUE; // using the defines at the top
}
else if(classid == 1)
{
gTeam[playerid] = TEAM_Withe; // same ^^
}
else if(classid == 3)
{
gTeam[playerid] = TEAM_Cyan; // same ^^
}
}
forward SetPlayerToTeamColour(playerid);
public SetPlayerToTeamColour(playerid)
{
if(gTeam[playerid] == TEAM_BLUE)
{
SetPlayerColor(playerid,TEAM_BLUE_COLOUR); // Blue
}
else if(gTeam[playerid] == TEAM_Withe)
{
SetPlayerColor(playerid,TEAM_Withe_COLOUR); // Withe
}
else if(gTeam[playerid] == TEAM_Cyan)
{
SetPlayerColor(playerid,TEAM_Cyan_COLOUR); // Cyan
}
return 1;
}
Re: Bug -
HyDrAtIc - 03.09.2014
Can you use ****** translator, please?
I only understood blue and white..
Re: Bug -
Stinged - 03.09.2014
You're not adding alpha (transparency)
How your colors look: 0x000000
How they should look: 0x000000(00-99-AA-FF)
Note: It's white not withe
Re: Bug -
LeroyII - 03.09.2014
Why don't you just simply use exsisting fs? I mean how many theards did you posted already about this? You can get it done in few minutes lol
Re: Bug -
nightday - 03.09.2014
How to fix i get it in wiki color see
http://www.nthelp.com/colorcodes.htm
what i do to fix lol i get it from wiki and mistake what i do now
Re: Bug -
Stinged - 03.09.2014
What's so hard about understanding my post.
Re: Bug -
Rifa4life - 03.09.2014
For colours, as Stinged correctly said, you have to use the following format:
0x | RR | GG | BB | AA
Alpha is transparency, you don't need to worry about that. Basically, you use standard HEX, but add 0x at the beginning and (in your case) FF at the end.
Re: Bug -
nightday - 03.09.2014
Quote:
Originally Posted by Stinged
What's so hard about understanding my post.
|
yes i dont know u are now what i get from my head the color and i try to get withe or what and im new
Re: Bug -
nightday - 03.09.2014
i Get The 3 Colors White And Cyan And Blue and the skins mix up from Colors i make 5 Cops Color Blue And i Make Much Skin White And i Make 1 only Skin Color Cyan But its Mixup from there White Skin its Cyan Skins And Cops its Now Blue And White lol
what i do now to i fix teaming color to all mixed up and i defince color why its mix ?
PHP код:
#include <a_samp>
#define COLOR_White 0x00FFFF
#define COLOR_Blue 0x33FFFF
#define COLOR_Cyan 0xFFFFFF
// Define the teams so its easier to use later
#define TEAM_BLUE 1
#define TEAM_White 2
#define TEAM_Cyan 3
// Define the colours you want each team to be, its easier for later on
#define TEAM_White_COLOUR 0xFFFFFFAA // White duh
#define TEAM_BLUE_COLOUR 0x33FFFF // blue duh
#define TEAM_Cyan_COLOUR 0xFFFFFF // Cyan duh
// Tracks what team a player is in
new gTeam[MAX_PLAYERS];
PHP код:
AddPlayerClass(266,2303.9497,2439.0103,3.2734,19.1234,3,1,22,50,29,500); // blue team
AddPlayerClass(211,2303.9497,2439.0103,3.2734,19.1234,3,1,22,50,29,500); // blue team
AddPlayerClass(265,2303.9497,2439.0103,3.2734,19.1234,3,1,22,50,29,500); // blue team
AddPlayerClass(267,2303.9497,2439.0103,3.2734,19.1234,3,1,22,50,29,500); // blue team
AddPlayerClass(283,2303.9497,2439.0103,3.2734,19.1234,3,1,22,50,29,500); // blue team
AddPlayerClass(284,2303.9497,2439.0103,3.2734,19.1234,3,1,22,50,29,500); // blue team
AddPlayerClass(285,2303.9497,2439.0103,3.2734,19.1234,3,1,22,50,29,500); // Cyan team
AddPlayerClass(71,-1261.6409,38.9104,14.1387,226.4688,3,1,22,50,29,500); // White team
AddPlayerClass(50,2006.1929,2295.9451,10.8203,177.4306,22,50,0,0,0,0); // White team
AddPlayerClass(133,1151.7200,1399.4144,5.8203,0.9030,22,50,0,0,0,0); // White team
AddPlayerClass(151,1151.7200,1399.4144,5.8203,0.9030,22,50,0,0,0,0); // White team
AddPlayerClass(12,2090.1008,2078.2600,10.8203,263.0699,0,0,0,0,0,0); // White team
AddPlayerClass(23,2090.1008,2078.2600,10.8203,263.0699,0,0,0,0,0,0); // White team
AddPlayerClass(29,2815.0498,2254.1252,10.8203,158.6954,0,0,0,0,0,0); // White team
AddPlayerClass(294,2814.0542,2253.4043,10.8203,315.9051,0,0,0,0,0,0); // White team
AddPlayerClass(214,2812.1963,2247.7256,10.8203,352.8735,0,0,0,0,0,0); // White team
AddPlayerClass(1,2634.0793,1072.6293,10.8203,88.4012,0,0,0,0,0,0); // White team
AddPlayerClass(15,2634.0793,1072.6293,10.8203,88.4012,0,0,0,0,0,0); // White team
AddPlayerClass(34,2634.0793,1072.6293,10.8203,88.4012,0,0,0,0,0,0); // White team
AddPlayerClass(2,2193.6528,2007.7402,12.2894,1.8574,0,0,0,0,0,0); // White team
AddPlayerClass(9,2193.6528,2007.7402,12.2894,1.8574,0,0,0,0,0,0); // White team
AddPlayerClass(19,2193.6528,2007.7402,12.2894,1.8574,0,0,0,0,0,0); // White team
AddPlayerClass(22,2193.6528,2007.7402,12.2894,1.8574,0,0,0,0,0,0); // White team
AddPlayerClass(26,2082.0784,2480.8333,10.8203,182.0390,0,0,0,0,0,0); // White team
AddPlayerClass(31,2082.0784,2480.8333,10.8203,182.0390,0,0,0,0,0,0); // White team
AddPlayerClass(45,2082.0784,2480.8333,10.8203,182.0390,0,0,0,0,0,0); // White team
AddPlayerClass(46,2082.0784,2480.8333,10.8203,182.0390,0,0,0,0,0,0); // White team
AddPlayerClass(9,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(13,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(14,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(24,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(33,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(36,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(38,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(160,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(82,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(107,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(59,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(127,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(128,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(138,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(28,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(147,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(299,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(123,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(204,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(249,2193.7366,2007.4865,12.2894,358.2378,15,1,15,500,28,500); // White team
AddPlayerClass(264,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(269,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(270,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(293,2193.5884,2007.4149,12.2894,355.9373,0,0,0,0,0,0); // White team
AddPlayerClass(271,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // White team
AddPlayerClass(298,2193.5884,2007.4149,12.2894,355.9373,0,0,0,0,0,0); // White team
AddPlayerClass(137,2193.5884,2007.4149,12.2894,355.9373,0,0,0,0,0,0); // White team
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid); // calls the custom function
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColour(playerid); // calls the custom function
return 1;
}
forward SetPlayerTeamFromClass(playerid, classid);
public SetPlayerTeamFromClass(playerid, classid)
{
if(classid == 0)
{
gTeam[playerid] = TEAM_BLUE; // using the defines at the top
}
else if(classid == 1)
{
gTeam[playerid] = TEAM_White; // same ^^
}
else if(classid == 3)
{
gTeam[playerid] = TEAM_Cyan; // same ^^
}
}
forward SetPlayerToTeamColour(playerid);
public SetPlayerToTeamColour(playerid)
{
if(gTeam[playerid] == TEAM_BLUE)
{
SetPlayerColor(playerid,TEAM_BLUE_COLOUR); // Blue
}
else if(gTeam[playerid] == TEAM_White)
{
SetPlayerColor(playerid,TEAM_White_COLOUR); // Withe
}
else if(gTeam[playerid] == TEAM_Cyan)
{
SetPlayerColor(playerid,TEAM_Cyan_COLOUR); // Cyan
}
return 1;
}
Re: Bug -
Stinged - 03.09.2014
You have A LOT of classes, and you're only checking for 3. How did you think that will work..