Raised This Month: $ Target: $400
 0% 

Cycling through player views


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
dutchmeat
Senior Member
Join Date: Sep 2006
Old 12-07-2006 , 10:17   Re: Cycling through player views
Reply With Quote #2

You can use attach_view, "attach_view ( player, target ) "
The target can't be a player, so you will have to create an entity that follows the player you wish to spectate.
This is a my Proof of concept, and has not yet been tested, so try this out.

Code:
new camera[33] public FollowPlayer(id,id2){ new Float:origin[3]; entity_get_vector(id2,EV_VEC_origin,origin) ; new camera[id] = create_entity("info_target"); entity_set_string(camera[id],EV_SZ_classname,"spectatorcamera") ; entity_set_origin(camera[id],origin); entity_set_int(camera[id], EV_INT_movetype, MOVETYPE_FOLLOW ); //follow the player entity_set_edict(camera[id], EV_ent_aiment, id );  //set aim entity_set_edict(camera[id], EV_ent_owner,33); } Public Follow(id){ attach_view ( id, camera[id] ) }
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode