new Float:health; GetPlayerHealth(playerid, health); if (health >= 100.0) { // Player cannot buy it } else { // Player can buy it }