game text wont show for first team! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: game text wont show for first team! (
/showthread.php?tid=224850)
game text wont show for first team! -
Kasis - 12.02.2011
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;
}
Re: game text wont show for first team! -
TouR - 12.02.2011
The position of the camera etc working?
Re: game text wont show for first team! -
Ash. - 12.02.2011
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)
Re: game text wont show for first team! -
Kasis - 12.02.2011
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
Re: game text wont show for first team! -
Kasis - 14.02.2011
Switch doesn't work. I still don't get game text for first team. :@
Please help!