Camera wont set on class selection
#1

Code:

pawn Code:
public OnPlayerRequestClass(playerid, classid)
{  
  SetPlayerPos(playerid,170.8213,1089.6483,21.8681);
  SetPlayerCameraPos(playerid,172,1094.6276,25);
  SetPlayerCameraLookAt(playerid,172.4376,1089.7999,23);
  SetPlayerFacingAngle(playerid, 333);
  return 1;
}
Result:



This is starting to get on my nerves.
Reply
#2

Player doesn't get to class request.. atleast looks like that.
(I have no problems with that and have close syntax to that)
Reply
#3

Mhhh... I dunno.

One thing I see is you're making the camera look at the camera position, not the player position.

yeah and as above said, it looks like your login system is stopping OnPlayerRequestClass, and when you login, you must spawn or something, try disabling your login system and see if it works, if it does, try moving your "must login" to OnPlayerRequestSpawn.
Reply
#4

UPDATE:

public OnPlayerRequestClass(playerid, classid)
{

SetPlayerPos(playerid, 2341.8713,1725.1122,25.2689);
SetPlayerCameraPos(playerid, 2335.43,1718.92,23);
SetPlayerCameraLookAt(playerid, 2342.11,1724.43,23);
SetPlayerFacingAngle(playerid, 140);

if(!GetPVarInt(playerid, "Logged")) SetPlayerSkin(playerid, GetPVarInt(playerid, "Skin"));
return 1;
}

New stuff, still old problem.
Reply
#5

I don't think you can set a players skin if he's not spawned either, set the skin when the person requests to spawn, or skip class selection all together for the player and give him his skin.
Reply
#6

More code >> more help !
Reply
#7

Didn't someone mention something about toggling spectate off?
Reply
#8

I think it's because you use GUI.
Reply
#9

That's exactly right. I removed the dialog and it worked fine. Thanks guys.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)