SA-MP Forums Archive
Having trouble with class selection - 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)
+--- Thread: Having trouble with class selection (/showthread.php?tid=418617)



Having trouble with class selection - MokeR - 25.02.2013

Hi,

I Don't know why but this is annoying me..it doesn't show the camera were i put it at or doesn't show the player skins until spawn..here is the code i'm using:

SetPlayerPos(playerid, 1958.5710,1325.7734,11.7135);
SetPlayerCameraPos(playerid, 1958.1526,1324.9481,11.7135);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);


Re: Having trouble with class selection - needhack - 25.02.2013

Try

pawn Код:
SetPlayerPos(playerid, 1958.5710,1325.7734,11.7135);
SetPlayerCameraPos(playerid, 1958.1526,1324.9481,11.7135);
SetPlayerCameraLookAt(playerid, 1958.5710,1325.7734,11.7135);



Re: Having trouble with class selection - Misiur - 25.02.2013

In which callback did you place this? OnPlayerRequestClass?


Re: Having trouble with class selection - MokeR - 25.02.2013

@Misiur i placed it on OnGameModeInit


Re: Having trouble with class selection - needhack - 25.02.2013

Place it at OnPlayerRequestClass aswell.


Re: Having trouble with class selection - MokeR - 25.02.2013

So both? it should be on OnGameModeInit and OnPlayerRequestClass?


Re: Having trouble with class selection - MokeR - 25.02.2013

I'm having another problem when i save my GameMode i go to GameMode files i only find the .pwn but not the .amx file? why is that


Re: Having trouble with class selection - needhack - 25.02.2013

No, use the code I gave you and place it at OnPlayerRequestClass only.
Don't save your gamemode, compile it.


Re: Having trouble with class selection - MokeR - 25.02.2013

Thanks .amx file done,But how come it shows up like this?



Re: Having trouble with class selection - needhack - 25.02.2013

In your saved positions, use the last coordinates in the line and put them like this at OnPlayerRequestClass:
pawn Код:
SetPlayerFacingAngle(playerid,YOUR LAST COORDINATES );
Also put the camera that looks at the player further away. As you can see it's way too close.