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(className, 63, keyName, 63, value, 63);
// 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(ent, EV_SZ_classname, "my_classname");
entity_set_origin(ent, value); // set the entity to the origin of the spawn
entity_set_int(ent, EV_INT_solid, SOLID_NOT); // setting this to bbox will cause the spawning player to get stuck
entity_set_int(ent, EV_INT_movetype, MOVETYPE_FLY);
entity_set_model(ent, "models/barney.mdl"); // set the model here, remember to precache it
entity_set_size(ent, Float:{-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(ent, EV_SZ_classname, "my_classname");
entity_set_origin(ent, value); // set the entity to the origin of the spawn
entity_set_int(ent, EV_INT_solid, SOLID_NOT); // setting this to bbox will cause the spawning player to get stuck
entity_set_int(ent, EV_INT_movetype, MOVETYPE_FLY);
entity_set_model(ent, "models/barney.mdl"); // set the model here, remember to precache it
entity_set_size(ent, Float:{-1.0,-1.0,-1.0}, Float:{1.0,1.0,1.0});
}
return PLUGIN_CONTINUE;
}