Making the skin visible on spawn screen
#1

^
I already saw this video :
https://www.youtube.com/watch?v=PFWn...#lq-lq2-hq-vhq

I couldn't really understand it.
I wanna use the co-ordinates from this :
pawn Код:
public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("GameMode Test");
    AddPlayerClass(230,1505.0670,-892.1097,58.7301,262.0000,0,0,0,0,0,0); // GuySpawn
    AddPlayerClass(23,1443.7703,-812.3202,74.2601,194.7188,0,0,0,0,0,0); // GuySpawn2
    AddStaticVehicle(402,1465.8987,-861.0427,55.0661,74.3095,30,30); // Buffalo
    return 1;
}
I wanna use the above co-oridantes below.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1505.0670,-892.1097,58.7301);
    SetPlayerFacingAngle(playerid,262.0000);
    SetPlayerCameraPos(playerid,1505.0670,-892.1097,58.7301);
    SetPlayerCameraLookAt(playerid, 1505.0670,-892.1097,58.7301);
    return 1;
}
Reply
#2

Its Easy bro

1.Save where the position you want Type
PHP код:
/save //position 
2.Save where you want camera position Type
PHP код:
/save //cam position 
do not remove //cam position for easy to know what position is that

then now

for ex the result is

PHP код:
//Position of spawn
 
x(1505.0670y(-892.1097z(58.7301a(262.0000)
//Position of Cam
x(1505.0670y(-892.1097z(58.7301
now on
PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerPos(playerid1505.0670,-892.1097,58.7301); //Position of spawn X , Y , Z , the A is missing right ? its angle 
     
SetPlayerFacingAngle(playerid,262.0000);  //Angle will be place here get it on Player //Position Spawn Save
    
SetPlayerCameraPos(playerid,1505.0670,-892.1097,58.7301); //Camera Position , Get the x , y , z from the Cam Position you save
    
SetPlayerCameraLookAt(playerid1505.0670,-892.1097,58.7301); // Now the Camera Look at , where the camera look ? of Course on player spawn then we gonna copy the //PositionSPawn
    
return 1;

BTW you need to change camera pos near the Player pOsition do not make it same cause you will not see the player LOL it will inside the body
Reply
#3

Anyone else?
I didn't really understand you.
Reply
#4

Do you mean skin picture?
Reply
#5

The camera's position must not be the same as the player's position, otherwise it will be IN the player, but the camera should be looking at the player's position. To find the desired camera position you can go ingame and /save a position. Or you can calculate it using trigonometry (use Windows calculator)

CameraX = PlayerPosX + sin(PlayerFacingAngle) * 5
CameraY = PlayerPosY + cos(PlayerFacingAngle) * 5
CameraZ = PlayerPosZ + 1

Where 5 is how many meter you want the camera to be from the player.
Reply
#6

Quote:
Originally Posted by Vince
Посмотреть сообщение
CameraX = PlayerPosX + sin(PlayerFacingAngle) * 5
CameraY = PlayerPosY + cos(PlayerFacingAngle) * 5
CameraZ = PlayerPosZ + 1
This really helped me out a lot! Thanks!
Its perfect now!
Thanks a lot!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)