Skin selector when connecting -
brandypol - 22.08.2014
My question is simple. I have a skin selector when someone connects to my server (as many servers do) but the problem is that the skins are invisible. What can I do to make them be visible ??

Re: Skin selector when connecting -
BuLLeT[LTU] - 22.08.2014
On OnGameModeInit you need to use AddPlayerClass(info..).
and then
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, same coordinates);
TogglePlayerControllable(playerid,false);
SetPlayerFacingAngle(playerid,from addplayerclass);
SetPlayerCameraPos(playerid, set camera nearby addplayerclass coordinates);
SetPlayerCameraLookAt(playerid, addplayerclass coordinates);
}
Re: Skin selector when connecting -
brandypol - 22.08.2014
Quote:
Originally Posted by BuLLeT[LTU]
On OnGameModeInit you need to use AddPlayerClass(info..).
and then
pawn Код:
public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, same coordinates); TogglePlayerControllable(playerid,false); SetPlayerFacingAngle(playerid,from addplayerclass); SetPlayerCameraPos(playerid, set camera nearby addplayerclass coordinates); SetPlayerCameraLookAt(playerid, addplayerclass coordinates); }
|
How do I set the camera nearby addplayerclass coordinates in the SetPlayerCameraPos function ?
Re: Skin selector when connecting -
BuLLeT[LTU] - 22.08.2014
You just need to use /save command to get coordinates. It's stored in My Documents\GTA San Andreas User Files\SAMP\savedpositions.txt
Re: Skin selector when connecting -
brandypol - 22.08.2014
Quote:
Originally Posted by BuLLeT[LTU]
You just need to use /save command to get coordinates. It's stored in My Documents\GTA San Andreas User Files\SAMP\savedpositions.txt
|
Yeah but the problem is that my savedpositions arent in my .txt file because its been a really long time since I scripted my gamemode :/
Re: Skin selector when connecting -
BuLLeT[LTU] - 22.08.2014
So use like this:
pawn Код:
SetPlayerCameraPos(playerid,X+5 (coordinate X from addplayerclass + 5 to be it nearby), Y, Z);
Re: Skin selector when connecting -
brandypol - 22.08.2014
Quote:
Originally Posted by BuLLeT[LTU]
So use like this:
pawn Код:
SetPlayerCameraPos(playerid,X+5 (coordinate X from addplayerclass + 5 to be it nearby), Y, Z);
|
Thanks a lot dude

and if I have 5 skins i guess i repeat all that stuff 5 times ?
SetPlayerPos(playerid, 2495.3455, -1687.9534, 13.5165);
TogglePlayerControllable(playerid,false);
SetPlayerFacingAngle(playerid,269.1425);
SetPlayerCameraPos(playerid,X+5 (2495.3455 + 5), -1687.9534, 13.5165)
SetPlayerCameraLookAt(playerid, 2495.3455, -1687.9534, 13.5165);
Re: Skin selector when connecting -
Mzake - 22.08.2014
after u do /save (text to seperat cordinations) goto san andreas user files folder/samp/savedpositions.txt
if this is wht u asking for..
Re: Skin selector when connecting -
BuLLeT[LTU] - 23.08.2014
Quote:
Originally Posted by brandypol
Thanks a lot dude  and if I have 5 skins i guess i repeat all that stuff 5 times ?
SetPlayerPos(playerid, 2495.3455, -1687.9534, 13.5165);
TogglePlayerControllable(playerid,false);
SetPlayerFacingAngle(playerid,269.1425);
SetPlayerCameraPos(playerid,X+5 (2495.3455 + 5), -1687.9534, 13.5165)
SetPlayerCameraLookAt(playerid, 2495.3455, -1687.9534, 13.5165);
|
You do not repeat everything 5 times because all AddPlayerClass has to be at the same coordinates.
Re: Skin selector when connecting -
iFarbod - 23.08.2014
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetCameraBehindPlayer(playerid);
}