Raised This Month: $ Target: $400
 0% 

respawn players where is the entity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 09-06-2009 , 13:07   Re: respawn players where is the entity
Reply With Quote #10

Here's an example.
Code:
#include <engine>   new Float:g_vecLocation[3];   public fnSaveLocation(iClient) {         // Let's save Client's location to g_vecLocation         entity_get_vector(iClient, EV_VEC_origin, g_vecLocation);         // g_vecLocation now holds the origin of Client }   public fnSpawnAndTeleport() {         // Let's create and spawn the Entity         new iEntity = create_entity("whatever_classname");           DispatchSpawn(iEntity);           // We can also check if created Entity is valid         if (!is_valid_ent(iEntity))                 return;           // Now we can teleport the Entity to the location         // that is saved in g_vecLocation         entity_set_origin(iEntity, g_vecLocation);         // Done }
__________________

Last edited by hleV; 09-06-2009 at 13:12.
hleV 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 15:14.


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