UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

How to make this script work for everyone in the match?

broken avatar :(
Created 7 years ago
by Doodles_Inc
0 Members and 1 Guest are viewing this topic.
1,533 views
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 20 April 2016
Last active: 2 years ago
Posts
145
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
if I surprised you, you had underestimated me
Signature
if I surprised you, it was because you underestimated me
×
Doodles_Inc's Groups
Doodles_Inc's Contact & Social LinksdoodlescriminoserDoodles_IncDoodlesInc
I have a code made by someone I don't remember that is a shootable EE
Code Snippet
Plaintext
#using scripts\zm\_zm_perks;
#insert scripts\zm\_zm_perks.gsh;
 
function init()
{
    level.shootablesNeeded = 3;
    level.shootablesCollected = 0;
 
    level thread shootable_1();
    level thread shootable_2();
    level thread shootable_3();
}
 
function shootable_1()
{
    trig_1 = GetEnt("shootable_trig", "targetname");
    model_1 = GetEnt("shootable_model", "targetname");
 
    trig_1 SetHintString("");
    trig_1 SetCursorHint("HINT_NOICON");
 
    while(1)
    {
        trig_1 waittill("trigger", player);
 
        level.shootablesCollected++;
 
        IPrintLn("Mexican 1 shot | Mexicano 1 acertado"); // Not Needed
 
        thread shootables_done(player);
 
        break;
    }
 
    trig_1 Delete();
    model_1 Delete();
}
 
function shootable_2()
{
    trig_2 = GetEnt("shootable_trig_2", "targetname");
    model_2 = GetEnt("shootable_model_2", "targetname");
 
    trig_2 SetHintString("");
    trig_2 SetCursorHint("HINT_NOICON");
 
    while(1)
    {
        trig_2 waittill("trigger", player);
 
        level.shootablesCollected++;
 
        IPrintLn("Mexican 2 shot | Mexicano 2 acertado"); // Not Needed
 
        thread shootables_done(player);
 
        break;
    }
 
    trig_2 Delete();
    model_2 Delete();
}
 
function shootable_3()
{
    trig_3 = GetEnt("shootable_trig_3", "targetname");
    model_3 = GetEnt("shootable_model_3", "targetname");
 
    trig_3 SetHintString("");
    trig_3 SetCursorHint("HINT_NOICON");
 
    while(1)
    {
        trig_3 waittill("trigger", player);
 
        level.shootablesCollected++;
 
        IPrintLn("Mexican 3 shot | Mexicano 3 acertado"); // Not Needed
 
        thread shootables_done(player);
 
        break;
    }
 
    trig_3 Delete();
    model_3 Delete();
}
 
function shootables_done(player)
{
    while(1)
    {
        self waittill(level.shootablesCollected >= level.shootablesNeeded);
 
        if(level.shootablesCollected == level.shootablesNeeded)
        {
            // What ever code you want to execute once all shootables are collected
            IPrintLn("All zombies mexicans eliminated | Todos mexicanos zumbis eliminados");
            player zm_perks::give_perk( PERK_WIDOWS_WINE, false );
        }
 
        break;
    }
}
How could I do to this part work for everone in the match?
Code Snippet
Plaintext
player zm_perks::give_perk( PERK_WIDOWS_WINE, false );
Thanks.  :D
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 1 November 2013
Last active: 3 years ago
Posts
61
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
hajhaka's Groups
hajhaka's Contact & Social Links
Remove player like this
Code Snippet
Plaintext
player zm_perks::give_perk( PERK_WIDOWS_WINE, false );

Code Snippet
Plaintext
zm_perks::give_perk( PERK_WIDOWS_WINE, false );
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 20 April 2016
Last active: 2 years ago
Posts
145
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
if I surprised you, you had underestimated me
×
Doodles_Inc's Groups
Doodles_Inc's Contact & Social LinksdoodlescriminoserDoodles_IncDoodlesInc
Remove player like this
Code Snippet
Plaintext
player zm_perks::give_perk( PERK_WIDOWS_WINE, false );

Code Snippet
Plaintext
zm_perks::give_perk( PERK_WIDOWS_WINE, false );
I will check if it's working with my friends saturday.

 
Loading ...