ClassSelection - 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: ClassSelection (
/showthread.php?tid=347648)
ClassSelection -
TzAkS. - 02.06.2012
I added to OnPlayerConnect,SetSpawnInfo to skip OnPlayerRequestClass,this is working.
The player is setted to x,y,z from SetSpawnInfo and the classes is somewhere else,
Then i called OnPlayerRequestClass with a timer,and at the end of the timer i kill the player to ForceClassSelection,but into OnGameModeInit i have classes to some coordinates but after ForceClassSelection the camera stays where i wan`t but the skins from class selection is at x,y,z from SetSpawnInfo.
Is any way to keep them there but not to delete SetSpawnInfo,if you ask why i`m doing like this..i don`t want to see the player when is that timer on and when he is killed.
Any ideas?
Re: ClassSelection -
Jonny5 - 02.06.2012
you mean the skin dont line up?
i do something similar
you may need to set the spawn info in OnPlayerClassRequest
also.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerInterior (playerid,14);
SetPlayerPos (playerid,258.4893,-41.4008,1002.0234);
SetPlayerFacingAngle (playerid,90.0);
SetPlayerCameraPos (playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt (playerid,258.4893,-41.4008,1002.0234);
SetSpawnInfo
(
playerid,
255,
classid,
gPlayerInfo[playerid][E_PLAYER_X],
gPlayerInfo[playerid][E_PLAYER_Y],
gPlayerInfo[playerid][E_PLAYER_Z],
gPlayerInfo[playerid][E_PLAYER_A],
0,
0,
0,
0,
0,
0
);
return 1;
}
hope i understood you right.
this will set the position and skin when they click the spawn button.
Re: ClassSelection -
TzAkS. - 02.06.2012
Not that,before the spawn botton appaer..thanks anyway but fixed.