I got this code which should work.
PHP Code:
case 1:
{
if ( get_user_points ( id ) >= get_pcvar_num ( pCvarHPoints ) )
{
HasHealth1[ id ] = true
set_user_points ( id, get_user_points ( id ) - get_pcvar_num ( pCvarHPoints ) )
set_user_health ( id, get_user_health ( id ) + get_pcvar_num ( pCvarHealth ) )
client_print ( id, print_chat, "%s You got %d health more", PREFIX, get_pcvar_num ( pCvarHealth ) )
}
else
{
client_print ( id, print_chat, "%s You don't have enough points", PREFIX )
}
if ( HasHealth1[ id ] = true )
{
set_user_points ( id, get_user_points ( id ) - get_pcvar_num ( pCvarHPoints ) )
set_user_health ( id, get_user_health ( id ) + get_pcvar_num ( pCvarHealth ) + 10 )
HasHealth2[ id ] = true
}
else
{
client_print ( id, print_chat, "%s Not enough points", PREFIX )
}
But is there an easyier way?
__________________
I dislike this.
"A sneeze never comes alone!" <-- Important to remember.