game text wont show for first team!
#1

Okay, so the only game text which shows is for second team. For first team game text won't show.
Код:
public OnPlayerRequestClass(playerid, classid)
{
	if (classid == 0 || classid == 1 || classid == 2 || classid == 3 || classid == 4 || classid == 5 || classid == 6 || classid == 7 || classid == 8)
	{
	    GameTextForPlayer(playerid, "~n~~n~~n~~w~The Northern Neighbor ", 1000, 3);
	    SetPlayerInterior(playerid, 0);
		SetPlayerPos(playerid, 1497.4258,-699.9155,94.7500);
		SetPlayerFacingAngle(playerid, 180.9306);
		SetPlayerCameraPos(playerid, 1497.4098,-703.7816,94.7500);
		SetPlayerCameraLookAt(playerid, 1497.4258,-699.9155,94.7500);
		gTeam[playerid] = TEAM_ONE;
	}
	else if (classid == 9 || classid == 10 || classid == 11 || classid == 12 || classid == 13 || classid == 14 || classid == 15 || classid == 16)
	{
	    GameTextForPlayer(playerid, "~n~~n~~n~~w~The Southern Neighbor", 1000, 3);
	    SetPlayerInterior(playerid, 0);
 		SetPlayerPos(playerid, 1153.9160, -2037.0099, 69.0078);
		SetPlayerFacingAngle(playerid, 270.6361);
		SetPlayerCameraPos(playerid, 1157.3175, -2037.2214, 69.0078);
		SetPlayerCameraLookAt(playerid, 1153.9160, -2037.0099, 69.0078);
		gTeam[playerid] = TEAM_TWO;
	}
	return 1;
}
Reply
#2

The position of the camera etc working?
Reply
#3

Well, i would recommend a "switch"

pawn Код:
switch(classid)
{
     case 0, 1, 2, 3, 4, 5, 6, 7, 8:
     {
           //What you want to do for 0-8 class ids
     }
     case 9, 10, 11, 12, 13, 14, 15, 16:
     {
          //What you want to do for the others
     }
}
You have to remeber there is a limit on the length of allowed queries in an if statement. (8 i think is the limit, you have 9 in your first if)
Reply
#4

Quote:
Originally Posted by tour15
Посмотреть сообщение
The position of the camera etc working?
Yes, camera position works fine!

Quote:
Originally Posted by funky1234
Посмотреть сообщение
Well, i would recommend a "switch"

pawn Код:
switch(classid)
{
     case 0, 1, 2, 3, 4, 5, 6, 7, 8:
     {
           //What you want to do for 0-8 class ids
     }
     case 9, 10, 11, 12, 13, 14, 15, 16:
     {
          //What you want to do for the others
     }
}
You have to remeber there is a limit on the length of allowed queries in an if statement. (8 i think is the limit, you have 9 in your first if)
I tried with the limit. Still not working.
Gonna try later "switch"

If somebody have the solution then feel free to post it!!

-Thanks
Reply
#5

Switch doesn't work. I still don't get game text for first team. :@
Please help!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)