Skin selector when connecting
#1

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 ??
Reply
#2

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);
}
Reply
#3

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 ?
Reply
#4

You just need to use /save command to get coordinates. It's stored in My Documents\GTA San Andreas User Files\SAMP\savedpositions.txt
Reply
#5

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 :/
Reply
#6

So use like this:

pawn Код:
SetPlayerCameraPos(playerid,X+5 (coordinate X from addplayerclass + 5 to be it nearby), Y, Z);
Reply
#7

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);
Reply
#8

after u do /save (text to seperat cordinations) goto san andreas user files folder/samp/savedpositions.txt
if this is wht u asking for..
Reply
#9

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.
Reply
#10

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetCameraBehindPlayer(playerid);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)