Never tried this, so don't know how efficient it is:
PHP Code:
#include < amxmodx >
#include < hamsandwich >
#include < fakemeta >
#include < cstrike >
#pragma semicolon 1
new const Float:CT_SPAWNS[][3] = {
{ -1024.0, -704.0, 164.0 },
{ -1024.0, -896.0, 175.0 }
};
new const Float:T_SPAWNS[][3] = {
{ 256.0, 2112.0, -92.0 },
{ 63.0, 2112.0, -92.0 }
};
public plugin_init( ) {
register_plugin( "Spawn Point", "1.0", "maqi" );
RegisterHam( Ham_Spawn, "player", "Event_PlayerSpawnPost", 1 );
}
public Event_PlayerSpawnPost( iIndex ) {
if( !is_user_alive( iIndex ) )
return;
if( cs_get_user_team( iIndex ) != CS_TEAM_CT && cs_get_user_team( iIndex ) != CS_TEAM_T )
return;
engfunc( EngFunc_SetOrigin, iIndex, cs_get_user_team( iIndex ) == CS_TEAM_CT ? CT_SPAWNS[random(sizeof CT_SPAWNS)] : T_SPAWNS[random(sizeof T_SPAWNS)] );
}
__________________