SA-MP Forums Archive
Problem with class! - 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: Problem with class! (/showthread.php?tid=243168)



Problem with class! - IvancheBG - 21.03.2011

I have a problem i add classes but when i conect ot my i cant see who to chosee!Please help!


Re : Problem with class! - anumaz - 21.03.2011

Have you put them under "OnGameModeInit"?


Re: Problem with class! - Klutty - 21.03.2011

You have to fix the camera and player position under the OnPlayerRequestClass callback.


Re : Problem with class! - Soumi - 21.03.2011

Put all your class's under OnGameModeInit , then you need to place the player Position when he is choosing a class , also you need to set the Camera Position and the Camera look at..under OnPlayerRequestClass..
Here's an example :
When player chooses a class , he's position will be in the desert.

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
//Teams
    
SetPlayerPos(playerid,11.9577,1716.7191,22.6222);
    
SetPlayerFacingAngle(playerid128.0980);
    
SetPlayerInterior(playerid0);
    
SetPlayerCameraPos(playerid,9.6063,1715.1882,22.6113);
    
SetPlayerCameraLookAt(playerid,11.9577,1716.7191,22.6222);
    
//-----------------------------------
    
return 1;

Also you can add a music and an anim..

if you need more help please let me know !!


Re: Problem with class! - IvancheBG - 22.03.2011

i get it thanks