PHP Code:
demon( id )
{
for( new i = 1; i <= max_clients; i++ )
{
if( ( get_user_team( id ) == 1 ) && ( get_user_team( id ) == 2 ) )
{
if( GotDemonic[ id ] >= get_pcvar_num( pCvarPlayerAmount ) )
{
client_print( id, print_chat, "Only %d players is allowed to be %s", get_pcvar_num( pCvarPlayerAmount ), get_user_team( id ) )
}
else
{
if ( get_pcvar_num ( pCvarArmorOn ) )
{
set_user_armor ( id, random_num ( 50, 255 ) )
}
if ( get_pcvar_num ( pCvarHealthOn ) )
{
set_user_health ( id, random_num ( 50, 255 ) )
}
if ( get_pcvar_num ( pCvarSpeedOn ) )
{
set_user_maxspeed ( id, random_float ( 230.0, 270.0 ) )
}
if ( get_pcvar_num ( pCvarGravityOn ) )
{
set_user_gravity ( id, random_float ( 0.8, 1.2 ) )
}
set_user_rendering(id, kRenderFxGlowShell, 234, 11, 50, kRenderTransAlpha, 255);
}
}
}
}
That's the function i do in my demon plugin. I know that it don't work properly. Can anyone help me out?
Btw. It should only be this there should be looked at:
PHP Code:
demon( id )
{
for( new i = 1; i <= max_clients; i++ )
{
if( ( get_user_team( id ) == 1 ) && ( get_user_team( id ) == 2 ) )
{
if( GotDemonic[ id ] >= get_pcvar_num( pCvarPlayerAmount ) )
{
client_print( id, print_chat, "Only %d players is allowed to be %s", get_pcvar_num( pCvarPlayerAmount ), get_user_team( id ) )
}
And it should only be *pcvar* numbers of EACH team, there should could buy the demon
__________________
I dislike this.
"A sneeze never comes alone!" <-- Important to remember.