OnPlayerLogin
#1

Hello,

how do I set a Camera Position while the guy attemps to register/login
you know ex when he connects to server, the register/login dialog opens up and i want the camera be at gym

how can i do it?
Reply
#2

https://sampwiki.blast.hk/wiki/SetPlayerCameraPos
Reply
#3

example:
pawn Код:
SetPlayerPos(playerid, 2239.9063,-1641.9432,15.5267);
        SetPlayerFacingAngle(playerid, 151.7758);
        SetPlayerCameraPos(playerid, 2237.3972,-1646.6178,16.3376);
        SetPlayerCameraLookAt(playerid, 2239.9063,-1641.9432,15.5267);
Reply
#4

SetPlayerCameraPos & OnPlayerRequestSpawn / OnPlayerConnect
Reply
#5

i actually put it on OnPlayerLogin/OnPlayerConnect but it doesnt work
Reply
#6

Quote:
Originally Posted by rinori
Посмотреть сообщение
i actually put it on OnPlayerLogin/OnPlayerConnect but it doesnt work
becose you must put in OnPlayerSpawn
PHP код:

public OnPlayerSpawn(playerid)
{
    
SetPlayerPos(playerid2239.9063,-1641.9432,15.5267);
    
SetPlayerFacingAngle(playerid151.7758);
    
SetPlayerCameraPos(playerid2237.3972,-1646.6178,16.3376);
    
SetPlayerCameraLookAt(playerid2239.9063,-1641.9432,15.5267);
    return 
1;

Reply
#7

Quote:
Originally Posted by doreto
Посмотреть сообщение
becose you must put in OnPlayerSpawn
PHP код:

public OnPlayerSpawn(playerid)
{
    
SetPlayerPos(playerid2239.9063,-1641.9432,15.5267);
    
SetPlayerFacingAngle(playerid151.7758);
    
SetPlayerCameraPos(playerid2237.3972,-1646.6178,16.3376);
    
SetPlayerCameraLookAt(playerid2239.9063,-1641.9432,15.5267);
    return 
1;

Mhmm..
I put this code on my GM just for test, but still doesnt work until I press ESC key to re-type my password.
Any solution?
Reply
#8

add the code to OnPlayerRequestClass
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)