Answered Shovel and Helmet

jcal147

Veteran
Messages
63
Reaction score
12
Points
568
Does anyone know the script for the shovel, golden shovel, and golden helmet. Any help would be greatly appreciated.
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,698
Reaction score
2,807
Points
1,053
Does anyone know the script for the shovel, golden shovel, and golden helmet. Any help would be greatly appreciated.
Cheers :peace:
Code:
Give_Shovel()
{
    if((level.script == "zm_tomb") && isDefined(self.dig_vars))
    {
        self play_sound_on_ent("purchase");
        self.dig_vars["has_shovel"] = 1;
        self.dig_vars["n_spots_dug"] = 0;
        self.dig_vars["has_upgraded_shovel"] = 0;
        n_player = self getentitynumber() + 1;
        level setclientfield("shovel_player" + n_player, 1);
        self iprintln("Shovel ^2Gived");
    }
    else
        self iprintln("^1ERROR: ^7Shovel Not Supported On This Map");
}

Give_GoldenShovel()
{
    if((level.script == "zm_tomb") && isDefined(self.dig_vars))
    {
        self play_sound_on_ent("purchase");
        self.dig_vars["has_shovel"] = 1;
        self.dig_vars["n_spots_dug"] = 64;
        self.dig_vars["has_upgraded_shovel"] = 1;
        n_player = self getentitynumber() + 1;
        level setclientfield( "shovel_player" + n_player, 2);
        self playsoundtoplayer("zmb_squest_golden_anything", self);
        self iprintln("Golden Shovel ^2Gived");
    }
    else
        self iprintln("^1ERROR: ^7Golden Shovel Not Supported On This Map");
}

Give_Helmet()
{
    if((level.script == "zm_tomb") && isDefined(self.dig_vars))
    {
        self play_sound_on_ent("purchase");
        self.dig_vars["has_helmet"] = 1;
        n_player = self getentitynumber() + 1;
        level setclientfield("helmet_player" + n_player, 1);
        self playsoundtoplayer("zmb_squest_golden_anything", self);
        self iprintln("Helmet ^2Gived");
    }
    else
        self iprintln("^1ERROR: ^7Helmet Not Supported On This Map");
}
 
Top