rendered paste bodyfunction update_primary_stats ( $user_id, $strength = 0, $speed = 0, $dexterity = 0, $intelligence = 0, $leadership = 0, $communication = 0, $stamina = 0, $defense = 0, $stealth = 0, $respect = 0, $energy = 0, $happy = 0, $nerve = 0 )
{
global $db;
$sql = "UPDATE beta_users_stats
SET user_strength = user_strength + '" . $strength . "',
user_speed = user_speed + '" . $speed . "',
user_dexterity = user_dexterity + '" . $dexterity . "',
user_intelligence = user_intelligence + '" . $intelligence . "',
user_leadership = user_leadership + '" . $leadership . "',
user_communication = user_communication + '" . $communication . "',
user_stamina = user_stamina + '" . $stamina . "',
user_defense = user_defense + '" . $defense . "',
user_intelligence = user_intelligence + '" . $stealth . "',
user_respect = user_respect + '" . $respect . "',
user_max_energy = user_max_energy + '" . $energy . "',
user_max_happiness = user_max_happiness + '" . $happy . "'
user_max_nerve = user_max_nerve + '" . $nerve . "'
WHERE user_id = '" . $user_id . "'";
if ( !($db->sql_query($sql)) ) { message_die(GAME_ERROR, 'ERROR: Unable to update statistics.'); }
}