Raised This Month: $ Target: $400
 0% 

origin of players


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 06-27-2007 , 22:17   Re: origin of players
Reply With Quote #4

Using this will set a model on every spawn point. If you only want one then make a variable to check if it should spawn more or not.

PHP Code:
public pfn_keyvalue(entId)
{
    new 
ent;
    new 
className[64], keyName[64], value[64];
    
    
copy_keyvalue(className63keyName63value63);
    
    
// Check if its a start
    
if(equali(className"info_player_start") && equali(keyName"origin"))
    {
        
// Make the ct spawn model
        
ent create_entity("info_target");
        
entity_set_string(entEV_SZ_classname"my_classname");
        
entity_set_origin(entvalue); // set the entity to the origin of the spawn
        
entity_set_int(entEV_INT_solidSOLID_NOT); // setting this to bbox will cause the spawning player to get stuck
        
entity_set_int(entEV_INT_movetypeMOVETYPE_FLY);
        
entity_set_model(ent"models/barney.mdl"); // set the model here, remember to precache it
        
entity_set_size(entFloat:{-1.0,-1.0,-1.0}, Float:{1.0,1.0,1.0});
    }
    
    
// Check if its a deathmatch
    
if(equali(className"info_player_deathmatch") && equali(keyName"origin"))
    {
        
// Make the t spawn model
        
ent create_entity("info_target");
        
entity_set_string(entEV_SZ_classname"my_classname");
        
entity_set_origin(entvalue); // set the entity to the origin of the spawn
        
entity_set_int(entEV_INT_solidSOLID_NOT); // setting this to bbox will cause the spawning player to get stuck
        
entity_set_int(entEV_INT_movetypeMOVETYPE_FLY);
        
entity_set_model(ent"models/barney.mdl"); // set the model here, remember to precache it
        
entity_set_size(entFloat:{-1.0,-1.0,-1.0}, Float:{1.0,1.0,1.0});
    }
    
    return 
PLUGIN_CONTINUE;

hlstriker 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 21:34.


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