View Single Post
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgium
Old 02-11-2013 , 22:21   Re: spawn objects
Reply With Quote #3

Ok, got it.
Just a lil example here:
PHP Code:
public Spawn_Object(clientidFloat:Origin[3])
{
    
EntIndex CreateEntityByName("testentity");
    
HookEntityOutput("testentity""test"TestEntCallback); 
// when will TestEntCallback be called? & only once or continues (like a think in amxx)? its depended on what output name is right?)
 
    // Some code dressing the object/ent...
    // ...
 
    // spawn it
    
    
SetEntDataVector(EntIndexoffset(position vector), const Float:Origin[3]);
// where can i find all offsets?
    
new bool:Spawnsucces DispatchSpawn(EntIndex);
    if( !
Spawnsucces )
    {
        
Spawn_Object()
    }
 
}
 
public 
EntityOutput(const String:"test"calleractivatorFloat:0.0)
{
 

I can't find anything for OnStartTouch, where can i find info on that/in what is it included?
And can i not choose coordinates to spawn the entity? like for example when a player died get his origin and spawn the entity there:

get origin vector of the player: native GetClientAbsOrigin(client, Float:vec[3]);
but how do i set that vector as the spawnpoint for the entity, with SetEntDataVector?
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]

Last edited by striker07; 02-12-2013 at 01:38. Reason: new info
striker07 is offline