AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=43)
-   -   Superhero levels help. (https://forums.alliedmods.net/showthread.php?t=119823)

Steak243 02-25-2010 16:53

Superhero levels help.
 
I was just wondering if theres a certain code to enable admins/vip to choose more hero classes then regular players. Currently I have 25 levels and I want to make it so ppl who buy admin/vip are able to reach lvl 30 or choose more heroes

The Art of War 02-26-2010 05:54

Re: Superhero levels help.
 
Then make the heroes you want admins and VIP's to have admin/VIP only: Random admin flag or get a VIP plugin for example VIP flag (t) or whatever.

kanatzu 02-26-2010 08:56

Re: Superhero levels help.
 
This might be usefull.
http://forums.alliedmods.net/showthread.php?t=30191


Actually making a specify flag, able to level up extra levels sounds kinda hard to do.

The Art of War 02-26-2010 10:01

Re: Superhero levels help.
 
Yeah, to set a flag for heroes for admin/VIP only isnt hard, but to fix extra levels for admins/VIP's might be impossible. Though im sure the wizards Jelle, Fr33m@n and vittu knows something about it :D

Jelle 02-26-2010 13:26

Re: Superhero levels help.
 
As I see it you have to edit the core to make this possible. However, it is possible to make. Just not something that is going to be done.

I think vittu do not want to do this since it will give admins a huge advantage of everyone else witch is pretty much gay the way I see it.

Steak243 02-26-2010 19:50

Re: Superhero levels help.
 
Yea i changed it. I just made my server 40 lvls instead and made 10 heroes admin/vip only. Since that seems like a whole lot more easier. If someone can show me how to edit the code in the .sma Files to make it admin/vip only or to give me a link to where i can read and find out for myself i would really appreciate it.

Current Heroes I wanna make admin/vip only are

Invisible Woman: http://forums.alliedmods.net/showthread.php?t=30245

Phoenix: http://forums.alliedmods.net/showthread.php?t=30270

Colossus: http://forums.alliedmods.net/showthread.php?t=30093

Dr.Strange: http://forums.alliedmods.net/showthread.php?t=30290

Exodus: http://forums.alliedmods.net/showthread.php?t=30081

Goku: http://forums.alliedmods.net/showthread.php?t=62541

Master. Chief: http://forums.alliedmods.net/showthread.php?t=32034

Thor: http://forums.alliedmods.net/showthread.php?t=30298

Neo Reloaded: http://forums.alliedmods.net/showthread.php?t=30138

Steak243 02-26-2010 20:31

Re: Superhero levels help.
 
Sry for double post but I tried to do it with the Neo Hero and here's the code I did and the errors I got.

Code:

//Neo Reloaded
neor_level 9
neor_slowmotime 10                //Slow motion time in seconds
neor_cooldown 40                //Cooldown time in seconds
neor_dodge 40                        //Chance out of 100 a bullet will be stopped
neor_radius 100                        //Bullets stopped at this radius
neor_speed 100                        //Speed of neo during slow motion
neor_bulletspeed 475                //Speed of neos bullet during slow motion
neor_nospeed 75                        //Speed of non-neos during slow motion
neor_nobulletspeed 450                //Speed of non-neos bullet during slow motion
neor_adminflag a                // Admin flag required to use this hero (Default a = ADMIN_IMMUNITY)


new HeroName[] = "Neo Reloaded"
new bool:HasNeor[SH_MAXSLOTS+1]
new bool:UsingNeor[SH_MAXSLOTS+1]
new bool:gHasNeorPower[SH_MAXSLOTS+1]
new bool:gNeorSelected[SH_MAXSLOTS+1]
new LastWeap[SH_MAXSLOTS+1]
new LastClip[SH_MAXSLOTS+1]
new NeorTimer[SH_MAXSLOTS+1]
new bool:BulletTime
new bool:FirstSpawn = true
new SpriteTrail
new NumOfNeos
new NeorHudSync
new CvarSlowMoTime, CvarCooldown, CvarDodgePct, CvarRadius
new CvarNeoSpeed, CvarNeoBulletSpeed, CvarNonNeoSpeed, CvarNonNeoBulletSpeed,
#define TASKID 6789524

//----------------------------------------------------------------------------------------------
public neor_init()
{
        // First Argument is an id
        new temp[6]
        read_argv(1,temp,5)

        // 2nd Argument is 0 or 1 depending on whether the id has the hero
        new id = str_to_num(temp)
        read_argv(2,temp,5)
        new hasPowers = str_to_num(temp)

        gHasNeorPower[id] = (hasPowers != 0)
        gNeorSelected[id] = gHasNeorPower[id]

        if ( gHasNeorPower[id] && is_user_connected(id) ) {
                neor_admincheck(id)

        switch(hasPowers)
        {
                case true:
                        HasNeor[id] = true

                case false:
                {
                        if (HasNeor[id] && UsingNeor[id]) {
                                NumOfNeos -= 1
                                if (NumOfNeos == 0) {
                                        BulletTime = false
                                        neor_stopbullettime()
                                }
                        }
                        HasNeor[id] = false
                }
        }
}
        UsingNeor[id] = false
        NeorTimer[id] = -1
}
//----------------------------------------------------------------------------------------------
public neor_admincheck(id)
{
    new accessLevel[10] 

    get_cvar_string("neor_adminflag", accessLevel, 9)
   
 
    if ( gNeorSelected[id] &&  !(get_user_flags(id)&read_flags(accessLevel)) ) {
          client_print(id, print_chat, "[SH](%s) **Admin Only** You are not authorized to use this hero", gNeor)
          gHasNeorPower[id] = false
          client_cmd(id, "say drop %s", gNeor)
    }
}

Heres the errors I got.

Errors:
Quote:

D:\MoVieS\shmod\scripting\sh_neoreloaded.sma< 65> : error 020: invalid symbol name ""

D:\MoVieS\shmod\scripting\sh_neoreloaded.sma< 131> : warning 217: loose indentation

D:\MoVieS\shmod\scripting\sh_neoreloaded.sma< 607> : error 017: undefined symbol "gNeor"

D:\MoVieS\shmod\scripting\sh_neoreloaded.sma< 609> : error 017: undefined symbol "gNeor"

D:\MoVieS\shmod\scripting\sh_neoreloaded.sma< 612> : warning 203: symbol is never used: ""

D:\MoVieS\shmod\scripting\sh_neoreloaded.sma< 612> : warning 203: symbol is never used: "plugin_init"

vittu 02-26-2010 20:42

Re: Superhero levels help.
 
haha, im sorry

kanatzu 02-27-2010 05:50

Re: Superhero levels help.
 
Wow... just wow dude

The Art of War 02-27-2010 07:33

Re: Superhero levels help.
 
Well well well..... What is your admin flag??? 9????
And the most epic fail: Symbol is never used: plugin_init
...................................... The most important part, you unselect... xD

Just post a script for the normal hero and im sure people will help you to add a adminflag.


All times are GMT -4. The time now is 19:54.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.