[SOLVED]Script got screwed up!!
#1

I just added a new "Onplayerrequestclass" and now my script is screwed up!


I think it's because of the 2 warnings i'm receiving and because of them my commands are now screwing up. Can yall please help me.


This is what i just added

Код:
public OnPlayerRequestClass(playerid, classid)
{
	 if(classid == 0 || classid == 1 || classid == 2 || classid == 3 || classid == 4 || classid == 5 || classid == 6 || classid == 7 || classid == 10 || classid == 11 || classid == 12 || classid == 13)

	{
	SetPlayerPos(playerid, 1529.1810, -1677.3951, 5.8906);
	SetPlayerInterior(playerid, 0);
	SetPlayerFacingAngle(playerid, 45.3003);
	SetPlayerCameraPos(playerid, 1525.6810, -1673.3951, 7.3906);
	SetPlayerCameraLookAt(playerid, 1529.1810, -1677.3951, 5.8906);
	}
	else if(classid == 8)
	{
	SetPlayerPos(playerid, 2723.9865, -2412.3259, 29.6615);
	SetPlayerInterior(playerid, 0);
	SetPlayerFacingAngle(playerid, 33.4930);
	SetPlayerCameraPos(playerid, 2720.4865, -2408.3259, 31.1615);
	SetPlayerCameraLookAt(playerid, 2723.9865, -2412.3259, 29.6615);
	}
	else if(classid == 14)
	{
	SetPlayerPos(playerid, 1482.1323, -1765.6755, 18.7957);
	SetPlayerInterior(playerid, 0);
	SetPlayerFacingAngle(playerid, 46.4726);
	SetPlayerCameraPos(playerid, 1478.6323, -1761.6755, 20.2957);
	SetPlayerCameraLookAt(playerid, 1482.1323, -1765.6755, 18.7957);
	}
	else if(classid == 15)
	{
	SetPlayerPos(playerid, 1070.1849, -1680.1513, 27.2890);
	SetPlayerInterior(playerid, 0);
	SetPlayerFacingAngle(playerid, 33.6026);
	SetPlayerCameraPos(playerid, 1066.6849, -1676.1513, 28.7890);
	SetPlayerCameraLookAt(playerid, 1070.1849, -1680.1513, 27.2890);
	}
	else if(classid == 16)
	{
	SetPlayerPos(playerid, 1479.7327, -1788.8096, 156.7533);
	SetPlayerInterior(playerid, 0);
	SetPlayerFacingAngle(playerid, 48.7935);
	SetPlayerCameraPos(playerid, 1476.2327, -1784.8096, 158.2533);
	SetPlayerCameraLookAt(playerid, 1479.7327, -1788.8096, 156.7533);
	}
	else if(classid == 17 || classid == 18 )
	{
	SetPlayerPos(playerid, 1473.4134, -2285.6518, 42.4204);
	SetPlayerInterior(playerid, 0);
	SetPlayerFacingAngle(playerid, 35.6807);
	SetPlayerCameraPos(playerid, 1469.9134, -2281.6518, 43.9204);
	SetPlayerCameraLookAt(playerid, 1473.4134, -2285.6518, 42.4204);
	}
	else if(classid == 19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63)
	{
	SetPlayerPos(playerid, 1473.4134, -2285.6518, 42.4204);
	SetPlayerInterior(playerid, 0);
	SetPlayerFacingAngle(playerid, 35.6807);
	SetPlayerCameraPos(playerid, 1469.9134, -2281.6518, 43.9204);
	SetPlayerCameraLookAt(playerid, 1473.4134, -2285.6518, 42.4204);
	}

And because of it, I received new warnings and my script is messed up.

warnings:

Код:
(11007) : warning 203: symbol is never used: "SetPlayerTeamFromClass"
Код:
(11007) : warning 203: symbol is never used: "SetPlayerToTeamColor"
Line 11007 is not even part of my script. My Script ends at line 11006 Please help me, I'm not sure what i've done!


If i put my "Onplayerrequestclass" as what i had before:

Код:
 SetPlayerTeamFromClass(playerid, classid);
  SetPlayerPos(playerid, 1742.8436,-1862.3859,13.5764);
  SetPlayerFacingAngle(playerid, 0.0);
  SetPlayerCameraPos(playerid, 1743.2014,-1858.4879,13.4141);
  SetPlayerCameraLookAt(playerid, 1742.8436,-1862.3859,13.5764);
Then, My script is back to normal
Reply
#2

it is not screwed they just warning they dont affect the scipt it all
Reply
#3

Quote:
Originally Posted by MEXICAN_NORTE
it is not screwed they just warning they dont affect the scipt it all
It did effect the script because my teams no longer have colors (it's just plain grey meaning they are dead in my script)


And commands that are not suppose to work with certain teams, do. This did not happen until i added that and those warnings came up....
Reply
#4

take out all the thigs that you aded
Reply
#5

Quote:
Originally Posted by MEXICAN_NORTE
take out all the thigs that you aded
But i need my onplayerrequestclass to work like that.....I need help fixing what the problem is.
Reply
#6

mmmmmmmmmmmmmmmmmmmmm weird
Reply
#7

please help
Reply
#8

But.. whats your problem? Those warnings are because you made a variable wich is never used, but its not big deal...

EDIT: Why did you open a new thread? Here ist the other one http://forum.sa-mp.com/index.php?top...2443#msg912443 , you should post this on that one.
Reply
#9

Add SetPlayerTeamFromClass(playerid, classid); and SetPlayerToTeamColor(playerid); under OnPlayerSpawn or under OnPlayerRequestSpawn
Reply
#10

Quote:
Originally Posted by Fedee!
But.. whats your problem? Those warnings are because you made a variable wich is never used, but its not big deal...

EDIT: Why did you open a new thread? Here ist the other one http://forum.sa-mp.com/index.php?top...2443#msg912443 , you should post this on that one.
The problem is, Ever since i added a new "Onplayerrequestclass" I now receive these 2 warnings and because of them, My teams no longer have a color (which they are supposed to have) and they no longer have a limit on cmds they could use (robbers could use /taze, etc)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)