SA-MP Forums Archive
Question Teleport problem - 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: Question Teleport problem (/showthread.php?tid=354145)



Question Teleport problem - royriky123 - 25.06.2012

Hey all, I got a question namely: Teleport question. I know how to make it, but let we do as example we do the grove street teleport. When a player type /grove he will be standard see CJ's house. How do I make that? now I use CameraBehindPlayer, but how can I fix that a player standard will look to cj's house? when he type /grove he will be automatically and standard see the cj house, But when I use SetPlayerFacingAngly, Than I will see my caracters face. And that is anoying. Anyone who can help me? Thanks Royriky123


Re: Question Teleport problem - Hawky133 - 25.06.2012

Hey there.

So you want the player's CAMERA to be teleported to grove street when the player types /grove?


Re: Question Teleport problem - mickos - 25.06.2012

He know how to make teleports,
But he mean, when a player type /grove than will the player been teleported to grove street and the player will be look to carl johnsons house.


Re: Question Teleport problem - Hawky133 - 25.06.2012

Oh right.

Well basically, you need to use "SetPlayerFacingAngle" FIRST, then use "SetCameraBehindPlayer".

So first, you need to make the player's character face towards grove street, and then move the camera behind them e.g.
pawn Код:
if(!strcmp(cmdtext,"/grove",true)){
    SetPlayerPos(playerid,....);
    SetPlayerFacingAngle(playerid,ANGLE);
    SetCameraBehindPlayer(playerid);
}