WHAT THE HECK IS WORNG???? -
Cjgogo - 26.04.2011
Ok,even IF I FOLLWOED a tutorial step by step team colors it's still not working when I compile it gives me no errors,BUT IN GAME IT'S NOT WORKING:
pawn Код:
#define TEAM_ROBBERS 8
#define TEAM_COPS 9
#define TEAM_MEDICS 10
#define TEAM_FIREFIGHTERS 11
#define DARKRED 0x8C1717
#define LIGHTGREEN 0x00CD66
#define BLUE 0x0087ffff
#define WHITE 0xFFFFFF
#else
new gTeam[MAX_PLAYERS];
main()
{
print("\n----------------------------------");
print(" BLA BLA BLA");
print("----------------------------------\n");
}
SetPlayerTeamFromClass(playerid, classid)
{
if(classid == 118)
{
gTeam[playerid] = TEAM_ROBBERS;
return 1;
}
else if(classid == 120)
{
gTeam[playerid] = TEAM_ROBBERS;
return 1;
}
else if(classid == 125)
{
gTeam[playerid] = TEAM_ROBBERS;
return 1;
}
else if(classid == 274)
{
gTeam[playerid] = TEAM_MEDICS;
return 1;
}
else if(classid == 275)
{
gTeam[playerid] = TEAM_MEDICS;
return 1;
}
else if(classid == 276)
{
gTeam[playerid] = TEAM_MEDICS;
return 1;
}
else if(classid == 277)
{
gTeam[playerid] = TEAM_FIREFIGHTERS;
return 1;
}
else if(classid == 278)
{
gTeam[playerid] = TEAM_FIREFIGHTERS;
return 1;
}
else if(classid == 279)
{
gTeam[playerid] = TEAM_FIREFIGHTERS;
return 1;
}
else if(classid == 281)
{
gTeam[playerid] = TEAM_COPS;
return 1;
}
else if(classid == 282)
{
gTeam[playerid] = TEAM_COPS;
return 1;
}
else if(classid == 285)
{
gTeam[playerid] = TEAM_COPS;
return 1;
}
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid);
SetPlayerPos(playerid, -2556.3979,1217.2249,42.1484);
SetPlayerFacingAngle(playerid,9.1927);
SetPlayerCameraPos(playerid, -2556.9431,1224.0414,42.1484);
SetPlayerCameraLookAt(playerid,-2556.3979,1217.2249,42.1484);
return 1;
}
SetPlayerToTeamColor(playerid)
{
if(gTeam[playerid] == TEAM_ROBBERS)
{
SetPlayerColor(playerid,WHITE);
}
else if(gTeam[playerid] == TEAM_COPS)
{
SetPlayerColor(playerid,BLUE);
}
else if(gTeam[playerid] == TEAM_FIREFIGHTERS)
{
SetPlayerColor(playerid,DARKRED);
}
else if(gTeam[playerid] == TEAM_MEDICS)
{
SetPlayerColor(playerid,LIGHTGREEN);
}
}
public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColor(playerid);
SendClientMessage(playerid,YELLOW,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
SendClientMessage(playerid,GREEN,"Welocme to Los Santos DeathMatch");
SendClientMessage(playerid,BLUE,"Type /commands to see avaible commands");
SendClientMessage(playerid,YELLOW,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
ShowPlayerDialog(playerid,4,DIALOG_STYLE_MSGBOX,"RULES!!!","RULE 1:DO NOT CHEAT\nRULE 2:RESPECT ALL PLAYERS/ADMINS REGARDLESS\nRULE 3:NO SPAMMING\nRULE 4:TALK ENGLISH ON MAIN CHAT","Play","Leave");
SetWorldTime(14);
TogglePlayerClock(playerid,1);
return 1;
}
SO HERE'S ALL THE CODE,NO ERRORS WHEN COMPILING but SIMPLI it's not WORKING ON GAME.
Re: WHAT THE HECK IS WORNG???? -
Cjgogo - 26.04.2011
Help PELASE
??!!!!:O
Re: WHAT THE HECK IS WORNG???? -
Sinner - 26.04.2011
What isn't working, be more specific please.
Re: WHAT THE HECK IS WORNG???? -
Tee - 26.04.2011
Is the Cop color working?
Re: WHAT THE HECK IS WORNG???? -
Cjgogo - 26.04.2011
What could be not working when I type something the color is still orange and not the colors I've set and none of the team colors are working
Re: WHAT THE HECK IS WORNG???? -
xir - 26.04.2011
You didn't follow my code properly
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
switch(classid)
{
case 0:
{
gTeam[playerid] = TEAM_ROBBERS;
}
case 1:
{
gTeam[playerid] = TEAM_ROBBERS;
}
case 2:
{
gTeam[playerid] = TEAM_ROBBERS;
}
case 3:
{
gTeam[playerid] = TEAM_MEDICS;
}
case 4:
{
gTeam[playerid] = TEAM_MEDICS;
}
case 5:
{
gTeam[playerid] = TEAM_MEDICS;
}
case 6:
{
gTeam[playerid] = TEAM_FIREFIGHTERS;
}
case 7:
{
gTeam[playerid] = TEAM_FIREFIGHTERS;
}
case 8:
{
gTeam[playerid] = TEAM_FIREFIGHTERS;
}
case 9:
{
gTeam[playerid] = TEAM_COPS;
}
case 10:
{
gTeam[playerid] = TEAM_COPS;
}
case 11:
{
gTeam[playerid] = TEAM_COPS;
}
}
return 1;
}
Re: WHAT THE HECK IS WORNG???? -
Markx - 26.04.2011
pawn Код:
if(classid == 118)
{
gTeam[playerid] = TEAM_ROBBERS;
return 1;
}
else if(classid == 120)
{
gTeam[playerid] = TEAM_ROBBERS;
return 1;
}
else if(classid == 125)
{
gTeam[playerid] = TEAM_ROBBERS;
return 1;
}
else if(classid == 274)
{
gTeam[playerid] = TEAM_MEDICS;
return 1;
}
else if(classid == 275)
{
gTeam[playerid] = TEAM_MEDICS;
return 1;
}
else if(classid == 276)
{
gTeam[playerid] = TEAM_MEDICS;
return 1;
}
else if(classid == 277)
{
gTeam[playerid] = TEAM_FIREFIGHTERS;
return 1;
}
else if(classid == 278)
{
gTeam[playerid] = TEAM_FIREFIGHTERS;
return 1;
}
else if(classid == 279)
{
gTeam[playerid] = TEAM_FIREFIGHTERS;
return 1;
}
else if(classid == 281)
{
gTeam[playerid] = TEAM_COPS;
return 1;
}
else if(classid == 282)
{
gTeam[playerid] = TEAM_COPS;
return 1;
}
else if(classid == 285)
{
gTeam[playerid] = TEAM_COPS;
return 1;
}
return 1;
}
Dont put the skin ids here! Its the ID of the class, thats wrong!
Re: WHAT THE HECK IS WORNG???? -
Cjgogo - 26.04.2011
so what do I put at cassid what ever I want?
Re: WHAT THE HECK IS WORNG???? -
Cjgogo - 26.04.2011
thansk xir now it's working
Re: WHAT THE HECK IS WORNG???? -
Cjgogo - 26.04.2011
lol now the colours are wrongly assigned to calsses but at elast it's working xD how to solve this?