SA-MP Forums Archive
Spawns bug :( Only one skin - CJ - 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: Spawns bug :( Only one skin - CJ (/showthread.php?tid=23041)



Spawns bug :( Only one skin - CJ - SaW_[VrTx] - 20.01.2008

Whats wring with this script In server i have only one team/skin - SKIN ID 0, CJ and i cant select it

http://tuned.oo.lv/servsamp/gamemodes/sftdm.pwn


Re: Spawns bug :( Only one skin - CJ - TTJJ - 21.01.2008

http://wikitmp.sa-mp.com/index.php/AddPlayerClass

http://wikitmp.sa-mp.com/index.php/Skins

Take a look at those, that may help


Re: Spawns bug :( Only one skin - CJ - Jashugan - 21.01.2008

try changing SetWorldTime(04); to SetWorldTime(4);


Re: Spawns bug :( Only one skin - CJ - TTJJ - 21.01.2008

Quote:
Originally Posted by Jashugan
try changing SetWorldTime(04); to SetWorldTime(4);
?? what will that do? he is looking to change the skins :P not time


Re: Spawns bug :( Only one skin - CJ - Grove - 21.01.2008

Quote:
Originally Posted by TTJJ
He hasnt used any Functions too change skin and he has done addplayerclass correctly.

Make sure there are no dodgey filterscripts, or if any plugins are required, they are loaded. do you spawn in the right place?


Re: Spawns bug :( Only one skin - CJ - SaW_[VrTx] - 21.01.2008

u dont understand!
here is screenshot


here is code: http://tuned.oo.lv/servsamp/gamemodes/sftdm.pwn


Re: Spawns bug :( Only one skin - CJ - Jashugan - 21.01.2008

Quote:
Originally Posted by TTJJ
Quote:
Originally Posted by Jashugan
try changing SetWorldTime(04); to SetWorldTime(4);
?? what will that do? he is looking to change the skins :P not time
If skins dont show like this it means the OnGameModeInIt function isn't loading properly which is usually caused by a piece of code being wrong in there. I dont know the function setworldtime well but it might be that "04" is bugging everything up if it should instead be "4".

Try it out and see, thats the only thing I can see that looks dodgy in the script.


Re: Spawns bug :( Only one skin - CJ - SaW_[VrTx] - 21.01.2008

And what is this?

Quote:

C:\AppServ\www\servsamp\gamemodes\sftdm.pwn(1129) : warning 235: public function lacks forward declaration (symbol "SetupPlayerForClassSelection")
C:\AppServ\www\servsamp\gamemodes\sftdm.pwn(1245) : warning 235: public function lacks forward declaration (symbol "GameModeExitFunc")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Warnings.




Re: Spawns bug :( Only one skin - CJ - SaW_[VrTx] - 21.01.2008

Still bug...

I think, problem is here:


Код:
public OnPlayerRequestClass(playerid, classid)

{

	SetPlayerClass(playerid, classid);

	SetupPlayerForClassSelection(playerid);

	gPlayerClass[playerid] = classid;

	switch (classid) {

	  case 0:

	    {

				GameTextForPlayer(playerid, "~g~Street racer", 500, 3);

			}

		case 1:

		  {

				GameTextForPlayer(playerid, "~g~Biker", 500, 3);

			}

		case 2:

	    {

				GameTextForPlayer(playerid, "~g~Wang Band", 500, 3);

			}



		case 3:

	    {

				GameTextForPlayer(playerid, "~g~FBI", 500, 3);
				
      }
      
      
    case 4:

	    {

				GameTextForPlayer(playerid, "~g~Mafia", 500, 3);

			}
			
			
    case 5:

	    {

				GameTextForPlayer(playerid, "~g~Girl", 500, 3);

			}

	}

}







//------------------------------------------------------------------------------
But what? It starts, when i remove "return 1", but when is it, pawn show lots of errors!


Re: Spawns bug :( Only one skin - CJ - Jashugan - 21.01.2008



Код:
public OnPlayerRequestClass(playerid, classid)

{

	SetPlayerClass(playerid, classid);

	gPlayerClass[playerid] = classid;

	switch (classid) {

	  case 0:

	    {

				GameTextForPlayer(playerid, "~g~Street racer", 500, 3);

			}

		case 1:

		  {

				GameTextForPlayer(playerid, "~g~Biker", 500, 3);

			}

		case 2:

	    {

				GameTextForPlayer(playerid, "~g~Wang Band", 500, 3);

			}



		case 3:

	    {

				GameTextForPlayer(playerid, "~g~FBI", 500, 3);
				
      }
      
      
    case 4:

	    {

				GameTextForPlayer(playerid, "~g~Mafia", 500, 3);

			}
			
			
    case 5:

	    {

				GameTextForPlayer(playerid, "~g~Girl", 500, 3);

			}

	}
	SetupPlayerForClassSelection(playerid);  <----- this at the bottom

}

then you do:

public SetupPlayerForClassSelection(playerid)
{
	switch (whatever you have defined for teams)
	{
		case team name:
		{
			SetPlayerInterior(playerid,interiorID);
			SetPlayerPos(playerid,X,Y,Z);
			SetPlayerFacingAngle(playerid, ANGLE);
			SetPlayerCameraPos(playerid,X,Y,Z);
			SetPlayerCameraLookAt(playerid,X,Y,Z);
		}


etc.



//------------------------------------------------------------------------------