Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: BigcaT_ on Jan 02, 2015, 02:20 AM

Title: how to use player.SetCameraPos function?
Post by: BigcaT_ on Jan 02, 2015, 02:20 AM
yesterday my friend told me about this function, but i don't know how to use it..

 :) :'(
Title: Re: how to use player.SetCameraPos function?
Post by: Sk on Jan 02, 2015, 09:25 AM
This will help
http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/Player.SetCameraPos
Title: Re: how to use player.SetCameraPos function?
Post by: BigcaT_ on Jan 02, 2015, 10:32 AM
Quote from: Sk on Jan 02, 2015, 09:25 AMThis will help
http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/Player.SetCameraPos

Thanks:)         and can you give me an example ?
Title: Re: how to use player.SetCameraPos function?
Post by: Castagna on Jan 04, 2015, 03:18 AM
player.SetCameraPos( Vector pos, Vector look );
Vector pos/look are vectors itself. Syntax: Vector( float/integer.X, float/integer.Y, float/integer.Z)

Example:

(just defined the arguments as locals to make it look simple)

local vector1 = Vector ( 1000, -1000, 5000 ), vector2 = Vector ( 3000, -250, 1000 );

player.SetCameraPos( vector1, vector2 );

This is pretty much similar to the spawn-camera settings, as there's a position and look vector. Note that the values i put in this example  were not tested.
Title: Re: how to use player.SetCameraPos function?
Post by: BigcaT_ on Jan 11, 2015, 03:52 AM
Quote from: Castagna on Jan 04, 2015, 03:18 AMplayer.SetCameraPos( Vector pos, Vector look );
Vector pos/look are vectors itself. Syntax: Vector( float/integer.X, float/integer.Y, float/integer.Z)

Example:

(just defined the arguments as locals to make it look simple)

local vector1 = Vector ( 1000, -1000, 5000 ), vector2 = Vector ( 3000, -250, 1000 );

player.SetCameraPos( vector1, vector2 );

This is pretty much similar to the spawn-camera settings, as there's a position and look vector. Note that the values i put in this example  were not tested.
thanks.
 
Topic LOcked !