Onplayerrequestclass problem
#1

Theres something wrong with my requestclass....it's invisible


I'm done my script except this lol....


how do i fix it?

Код:
public OnPlayerRequestClass(playerid, classid)
{
  SetPlayerTeamFromClass(playerid, classid);
  SetPlayerColor(playerid,COLOR_DEADCONNECT);
  SetPlayerInterior(playerid, 0);
  SetPlayerPos(playerid, 435.355652,2532.222900,26.623209);
	SetPlayerCameraPos(playerid,435.355652,2535.222902,26.623209);
	SetPlayerCameraLookAt(playerid, 222.1653, 1823.0802, 6.4141);

		// 435.355652,2532.222900,26.623209

// 257.750336,-42.528057,1002.23438

	if (classid >= 0 && classid <= 3)
	{
	  SetPlayerTeamFromClass(playerid, classid);
		SetPlayerToTeamColor(playerid);
		SetPlayerPos(playerid, 1574.4642,-1694.2188,6.2188);
		GameTextForPlayer(playerid, "~b~POLICE OFFICER~n~~w~CITY OFFICER", 3000, 5);
	}
	if (classid >= 4 && classid <= 6)
	{
	  SetPlayerTeamFromClass(playerid, classid);
		SetPlayerToTeamColor(playerid);
		SetPlayerPos(playerid, 1879.6774,-2543.1067,17.2344);
		GameTextForPlayer(playerid, " ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~~r~~h~RAPIST TEAM!", 6000, 6);
	}
	if (classid >= 7 && classid <= 8)
	{
	  SetPlayerTeamFromClass(playerid, classid);
		SetPlayerToTeamColor(playerid);
		SetPlayerPos(playerid, 1879.6774,-2543.1067,17.2344);
		GameTextForPlayer(playerid, "~b~MEDIC", 3000, 5);
	}
	if (classid >= 9 && classid <=9)
	{
	  SetPlayerTeamFromClass(playerid, classid);
		SetPlayerToTeamColor(playerid);
		SetPlayerPos(playerid, 1879.6774,-2543.1067,17.2344);
		GameTextForPlayer(playerid, "~w~CAR MECHANIC", 3000, 5);
	}
	if (classid >= 10 && classid <= 11)
	{
	  SetPlayerTeamFromClass(playerid, classid);
		SetPlayerToTeamColor(playerid);
		SetPlayerPos(playerid, 1879.6774,-2543.1067,17.2344);
		GameTextForPlayer(playerid, "~g~TAXI DRIVER", 3000, 5);
	}
	if (classid >= 12 && classid <= 57)
	{
	  SetPlayerTeamFromClass(playerid, classid);
		SetPlayerToTeamColor(playerid);
		SetPlayerPos(playerid, 1879.6774,-2543.1067,17.2344);
		GameTextForPlayer(playerid, "~w~CIVILIAN~b~~n~CHOOSE A JOB WHEN YOU SPAWN", 3000, 5);
	}
	return 1;
}
Reply
#2

pawn Код:
SetPlayerPos(playerid, 435.355652,2532.222900,26.623209);
SetPlayerCameraPos(playerid,435.355652,2535.222902,26.623209);
SetPlayerCameraLookAt(playerid, 222.1653, 1823.0802, 6.4141);
Those wouldn't work..
Reply
#3

Quote:
Originally Posted by [HiC
TheKiller ]
pawn Код:
SetPlayerPos(playerid, 435.355652,2532.222900,26.623209);
SetPlayerCameraPos(playerid,435.355652,2535.222902,26.623209);
SetPlayerCameraLookAt(playerid, 222.1653, 1823.0802, 6.4141);
Those wouldn't work..
Can you give me a set that would work?
Reply
#4

pawn Код:
SetPlayerCameraPos(playerid, 2232.188232, 2458.268310, 12.148024);
SetPlayerCameraLookAt(playerid, 2237.345214, 2458.268310, 13.442037);
SetPlayerPos(playerid, 2237.345214, 2458.268310, 13.442037);
Reply
#5

Quote:
Originally Posted by [HiC
TheKiller ]
pawn Код:
SetPlayerCameraPos(playerid, 2232.188232, 2458.268310, 12.148024);
SetPlayerCameraLookAt(playerid, 2237.345214, 2458.268310, 13.442037);
SetPlayerPos(playerid, 2237.345214, 2458.268310, 13.442037);
Still invisible..............
Reply
#6

no one really knows?
Reply
#7

Firstly you're setting the player camera to some place:

pawn Код:
SetPlayerCameraPos(playerid,435.355652,2535.222902,26.623209);
SetPlayerCameraLookAt(playerid, 222.1653, 1823.0802, 6.4141);
Later you set the player to a special position for a group of classid's.

Solution: You can remove the lines above or set special positions for the camera too.
Reply
#8

Quote:
Originally Posted by Merlо
Firstly you're setting the player camera to some place:

pawn Код:
SetPlayerCameraPos(playerid,435.355652,2535.222902,26.623209);
SetPlayerCameraLookAt(playerid, 222.1653, 1823.0802, 6.4141);
Later you set the player to a special position for a group of classid's.

Solution: You can remove the lines above or set special positions for the camera too.
I want the camera to face infront of the player. Can you give me the angle for that please
Reply
#9

If you've noticed, several classes spawn in the same place:

pawn Код:
SetPlayerPos(playerid, 1879.6774,-2543.1067,17.2344);
Probably you will need take all spawn positions again.
Reply
#10

Quote:
Originally Posted by Merlо
If you've noticed, several classes spawn in the same place:

pawn Код:
SetPlayerPos(playerid, 1879.6774,-2543.1067,17.2344);
Probably you will need take all spawn positions again.
I have set seperate spawn places for my characters. All i need to do is set the camera so it faced the front of the skin.


any ideas?
Reply
#11

Quote:
Originally Posted by killdahobo99
Quote:
Originally Posted by Merlо
If you've noticed, several classes spawn in the same place:

pawn Код:
SetPlayerPos(playerid, 1879.6774,-2543.1067,17.2344);
Probably you will need take all spawn positions again.
I have set seperate spawn places for my characters. All i need to do is set the camera so it faced the front of the skin.


any ideas?
You can walk forward and /save the camerapos, then, set it looking at player position.
Reply
#12

Ugh i tryed....The cords still messed it up. Can you give me some cords that will make the camera face my character from the front?



Or anyone?
Reply
#13

If it still hard for you, I suggest then: [FS] Easy Camera
Reply
#14

Quote:
Originally Posted by Merlо
If it still hard for you, I suggest then: [FS] Easy Camera
same but you can just delete the whole OnPLayerRequest things you added it then re do it it saves times and your Script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)