It part of the roll the dice script from White Panther. I'm trying to add the super welder to it. This is the complete roll option.
Code:
}else if ( diceroll == 21 )
{
if ( class == CLASS_MARINE || class == CLASS_JETPACK || class == CLASS_HEAVY || class == CLASS_COMMANDER )
{
if (!ns_has_weapon(id, WEAPON_WELDER))
{
give_item(id, "weapon_welder")
print_to_client("RTD >> %s has won a welder!", User)
}else {
new max_player_num, max_entities
max_player_num = get_maxplayers()
max_entities = get_global_int(GL_maxEntities)
new Float:dmg = 6000.0
new weap = max_player_num + 1; weap <= max_entities; ++weap
ns_set_weap_dmg(weap, dmg)
print_to_client("RTD >> %s has won a super welder!", User)
}
}else
{
new randnum = random(2)
if ( randnum == 0 && !ns_has_weapon(id, WEAPON_HEALINGSPRAY))
{
give_item(id, "weapon_healingspray")
}else if (!ns_has_weapon(id, WEAPON_UMBRA))
{
give_item(id, "weapon_umbra")
}else
{
// already has Healspray or Umbra
roll_the_dice(id)
return PLUGIN_HANDLED
}
}
//print_to_client("RTD >> %s has been given revitalizing weapons!", User)
}