SA-MP Forums Archive
OnPlayerRequestClass Help - 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: OnPlayerRequestClass Help (/showthread.php?tid=610781)



OnPlayerRequestClass Help - Filbert - 28.06.2016

Code >
PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerPos(playerid2182.5454,1285.5814,42.9859);
    
SetPlayerFacingAngle(playerid,177.0116);
    
SetPlayerCameraPos(playerid,1523.5961,-49.4418,1003.1310);
    
SetPlayerCameraLookAt(playerid1523.7103,-45.2526,1002.1310);
    
PlayerPlaySound(playerid,SOUND_MUSIC1,-2109.7576,184.2289,35.1503);
    
SetPlayerClass(playeridclassid);
    if( 
Player_GetGangplayerid ) != GANG_INVALID )
        
Player_RemoveFromGangplayerid ); 
The Picture Of The Error >

There's Must Piramyd.
Help Me Please....


Re: OnPlayerRequestClass Help - Luicy. - 28.06.2016

You sure you got the right z? 1003 seems too much.


Re: OnPlayerRequestClass Help - Filbert - 28.06.2016

AddPlayerClass(259,2182.5454,1285.5814,42.9859,87. 7773,0,0,0,0,0,0); // blablabla


Re: OnPlayerRequestClass Help - Filbert - 28.06.2016

It Said That


Re: OnPlayerRequestClass Help - Vince - 28.06.2016

AddPlayerClass does not set the camera position ... Your camera is looking at the sky because you specifically told it to look at the sky.


Re: OnPlayerRequestClass Help - Dayrion - 28.06.2016

That's why when you create a new pawn file there is this :
PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraLookAt(playerid1958.37831343.157215.3746);
    return 
1;




Re: OnPlayerRequestClass Help - Filbert - 28.06.2016

So, What Is The Right Codes?
Please Tell Me


Re: OnPlayerRequestClass Help - Sew_Sumi - 28.06.2016

There's also no need to do
Код:
SetPlayerClass(playerid, classid);
Especially on class selection.