SA-MP Forums Archive
Class Selection problem -.- - 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: Class Selection problem -.- (/showthread.php?tid=277733)



Class Selection problem -.- - Machida - 19.08.2011

I tried to AddPlayerClass in main() or OnGameModeInit and many other places..I set the right positions and weapons , skin etc..
But the player never seens to show in the class selection , so i cant spawn..

Can someone makes me a simple code to add skin 118 with weapons : 4,1 && 24,200
Please any locations, I just want it to work.


Re: Class Selection problem -.- - Shockey HD - 19.08.2011

Your problem is the cameras not being set.



Replace OnPlayerRequestClass with this.


pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
    return 1;
}
Problem fixed


Re: Class Selection problem -.- - Machida - 19.08.2011

hmm and i can add classes with any location ? dont need to be the same as that one ?


Re: Class Selection problem -.- - Shockey HD - 19.08.2011

That becomes harder scripting. Learn the basics, then you will learn the more "advanced stuff"


Re: Class Selection problem -.- - Machida - 19.08.2011

I know C++ but im new to samp stuff :S


Re: Class Selection problem -.- - Machida - 19.08.2011

Now i got another problem, only CJ shows up, and i cant spawn him...(And i didn added CJ , i added id 118 )


Re: Class Selection problem -.- - [MWR]Blood - 19.08.2011

Where did you add it?


Re: Class Selection problem -.- - Abreezy - 19.08.2011

Show your
Код:
public OnGameModeInit()
and your
Код:
public OnPlayerRequestClass(playerid, classid)



Re: Class Selection problem -.- - Machida - 19.08.2011

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
return 1;
}

public OnGameModeInit(){
SetGameModeText("Fun OverDose!");
AddPlayerClass(118,835.938354, -2039.453613, 12.867187,180.468139,4,1,24,200,0,0);
}

Only CJ shows up.


Re: Class Selection problem -.- - iggy1 - 19.08.2011

Just a suggestion but you can change where players spawn inside any callback with this function.
https://sampwiki.blast.hk/wiki/SetSpawnInfo