AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   VSH / Freak Fortress (https://forums.alliedmods.net/forumdisplay.php?f=154)
-   -   VSH Versus Saxton Hale 1.55 - New Saxton Hale + Vagineer Models! (https://forums.alliedmods.net/showthread.php?t=244209)

nergal 08-09-2014 13:46

Re: Versus Saxton Hale 1.47 - Important Bug Fixes (Last updated 8/04/2014 | 1:05AM CD
 
Quote:

Originally Posted by Newbie1992 (Post 2181361)
Does this work also fine with v147?

Also you mean that https://forums.alliedmods.net/showpo...postcount=4169

Thanks!

It SHOULD, You may or may not have to change a bit of it to work.

Also, I should update that post as well since I've done changes.

EDIT:
I'll add em here.

FF2-style SetBoss for vsh servers.
Add this code anywhere in the Defines, New Handles etc.
PHP Code:

new Handle:BossCookie

add this piece of code anywhere in OnPluginStart()
PHP Code:

    BossCookie RegClientCookie("hale_bosspick""player selected boss"CookieAccess_Protected);
    
RegAdminCmd("setboss"Command_SetBossADMFLAG_RESERVATION"sets your boss");
//if you want to make so anybody can use it, use this code below then instead of RegAdminCmd
  
RegConsoleCmd("setboss"Command_SetBoss); 

put these functions anywhere
PHP Code:

GetBossCookie(client)
{
    if (!
IsValidClient(client)) return 0;
    if (
IsFakeClient(client)) return 0;
    if (!
AreClientCookiesCached(client)) return 0;
    
decl String:setboss[6];
    
GetClientCookie(clientBossCookiesetbosssizeof(setboss));
    return 
StringToInt(setboss);
}
SetBossCookie(clientboss)
{
    if (!
IsValidClient(client)) return;
    if (
IsFakeClient(client)) return;
    if (!
AreClientCookiesCached(client)) return;
    
decl String:setboss[6];
    
IntToString(bosssetbosssizeof(setboss));
    
SetClientCookie(clientBossCookiesetboss);


in the function bool:CheckNextSpecial(), put these lines of code SPECIFICALLY above "if(Incoming != VSHSpecial_None" and under "if (!bSpecials) { Special = VSHSpecial_Hale; return true }" This is so the function checks the cookies before randomly picking a boss.
PHP Code:

    new bool:find[MAXPLAYERS+1];
    new 
tHale FindNextHale(find);
    if (
NextHale && GetBossCookie(NextHale) != -1)
    {
        
Special = ( Incoming GetBossCookie(NextHale) );
        
Incoming VSHSpecial_None;
        return 
true;
    }
    if (
GetBossCookie(tHale) != -1)
    {
        
Special = ( Incoming GetBossCookie(tHale) );
        
Incoming VSHSpecial_None;
        return 
true;
    } 

Now you'll need to make a menu so players/admins will have easier access. You can put these two functions anyway in the menu as long as it doesn't interfere with anything else.
PHP Code:

public Action:Command_SetBoss(clientargs)
{
    
decl String:bossname[64];
    new 
intt;
    if (!
bSpecials)
    {
        
ReplyToCommand(client"[VSH] This server isn't set up to use special bosses! Set the cvar hale_specials 1 in the VSH config to enable on next map!");
        return 
Plugin_Handled;
    }
        if (
IsValidClient(client))
        {
        
intt GetBossCookie(client);
        switch (
intt)
        {
            case 
0bossname "Saxton Hale";
            case 
1bossname "The Vagineer";
            case 
2bossname "The Horseless Headless Horsemann Jr.";
            case 
3bossname "The Christian Brutal Sniper";
#if defined EASTER_BUNNY_ON
            
case 4bossname "The Easter Bunny";
#endif
            
default: bossname "Random Boss";
        }
        new 
Handle:setbossmenu CreateMenu(MenuHandler_SetBoss);
 
        
SetMenuTitle(setbossmenu"Set Boss - Your Current Boss is set to: %s"bossname);
        
AddMenuItem(setbossmenu"non""Random Boss");
        
AddMenuItem(setbossmenu"saxton""Saxton Hale"); 
        
AddMenuItem(setbossmenu"vag""Vagineer");
        
AddMenuItem(setbossmenu"hhh""Horseless Headless Horsmann Jr.");
        
AddMenuItem(setbossmenu"cbs""Christian Brutal Sniper");
#if defined EASTER_BUNNY_ON
        
AddMenuItem(setbossmenu"bun""Easter Bunny");
#endif
        
SetMenuExitBackButton(setbossmenutrue);
        
DisplayMenu(setbossmenuclientMENU_TIME_FOREVER);
        }
        return 
Plugin_Handled;
}
public 
MenuHandler_SetBoss(Handle:menuMenuAction:actionclientparam2)
{
    
decl String:arg[64];
    
decl String:name[64];
    
GetMenuItem(menuparam2argsizeof(arg));
    if (
action == MenuAction_Select)
        {
        
param2++;
        switch (
param2)
        {
            case 
2SetBossCookie(clientVSHSpecial_Hale);
            case 
3SetBossCookie(clientVSHSpecial_Vagineer);
            case 
4SetBossCookie(clientVSHSpecial_HHH);
            case 
5SetBossCookie(clientVSHSpecial_CBS);
            case 
6SetBossCookie(clientVSHSpecial_Bunny);
            default: 
SetBossCookie(clientVSHSpecial_None);
        }
        new 
bossint GetBossCookie(client);
        switch (
bossint)
        {
            case 
VSHSpecial_Halename "Saxton Hale";
            case 
VSHSpecial_Vagineername "The Vagineer";
            case 
VSHSpecial_HHHname "The Horseless Headless Horsemann Jr.";
            case 
VSHSpecial_CBSname "The Christian Brutal Sniper";
#if defined EASTER_BUNNY_ON
            
case VSHSpecial_Bunnyname "The Easter Bunny";
#endif
            
default: name "Random Boss";
        }
        
ReplyToCommand(client"[VSH] Your Boss is set to: %s"name);
    }
    else if (
action == MenuAction_End)
        {
                
CloseHandle(menu);
        }


Lastly, if make it so only admins/donors can have !setboss then you need this function to reset ex-donors/ex-admins
PHP Code:

public OnClientPostAdminCheck(client

    if (!
GetAdminFlag(GetUserAdmin(client), Admin_Reservation)) 
        
SetBossCookie(client, -1); 



Chdata 08-14-2014 02:56

Re: Versus Saxton Hale 1.48 - Important Bug Fixes (Last updated 8/14/2014 | 1:45AM CD
 
Updated to v1.48

SuperU 08-16-2014 00:41

Re: Versus Saxton Hale 1.48 - Important Bug Fixes (Last updated 8/14/2014 | 1:45AM CD
 
May i use the 1.48 version with sourcemod 1.6 or don't work like 1.47?

Chdata 08-16-2014 02:35

Re: Versus Saxton Hale 1.48 - Important Bug Fixes (Last updated 8/14/2014 | 1:45AM CD
 
it won't work with 1.6

Also my bad, I didn't realize sourcemod's "stable" snapshots aren't actually "official releases" of sourcemod updates?

It's kind of confusing because the downloads page on sourcemod.net says:

These are stable SourceMod packages. For unstable snapshots, see this page instead.

And calls 1.6 a "stable" branch and 1.7 unstable.

If someone can confirm that those actually are subject to being unstable then I'll work on making vsh compatible with 1.6 again.

SuperU 08-17-2014 12:43

Re: Versus Saxton Hale 1.48 - Important Bug Fixes (Last updated 8/14/2014 | 1:45AM CD
 
Yes the right side is just development branch could you make it compatible with 1.61 final please

Chdata 08-17-2014 15:06

Re: Versus Saxton Hale 1.48 - Important Bug Fixes (Last updated 8/14/2014 | 1:45AM CD
 
Quote:

Originally Posted by SuperU (Post 2185261)
Yes the right side is just development branch could you make it compatible with 1.61 final please

Ah I'm talking about the left side. It's already compatible with 1.6.1

It's not compatible with 1.6.0

rswallen 08-17-2014 15:14

Re: Versus Saxton Hale 1.48 - Important Bug Fixes (Last updated 8/14/2014 | 1:45AM CD
 
1.6.1 has now been officially released. I see no need to make it compatible with 1.6.0 now

Chdata 08-17-2014 15:27

Re: Versus Saxton Hale 1.48 - Important Bug Fixes (Last updated 8/14/2014 | 1:45AM CD
 
Oh ;p that's recent.

Edit: Going to work on 1.49 soon.

Edit: After updating to the official release of 1.6.1 and changing TF2RemoveWeaponslot and TF2RemoveAllWeapons back to the one in tf2_stocks.inc

Now botkillers are worse than ever. As soon as you spawn with a botkiller, it'll get stuck on all your non botkiller weapons, as opposed to only having them get stuck when you go from being a player with a botkiller -> being boss -> being player again.

Anyone know if it's suppose to work? What causes this bug? If it can be fixed in code? Maybe TF2RespawnPlayer / RegeneratePlayer is messing it up since that gets called a lot during the start of the round and when players spawn?

(Reverting to tf2_removeweaponslot2 fixes it at least).

Edit: cool i fixed it goodbye headache

WildCard65 08-18-2014 07:29

Re: Versus Saxton Hale 1.48 - Important Bug Fixes (Last updated 8/14/2014 | 1:45AM CD
 
Quote:

Originally Posted by Chdata (Post 2185350)
Oh ;p that's recent.

Edit: Going to work on 1.49 soon.

Edit: After updating to the official release of 1.6.1 and changing TF2RemoveWeaponslot and TF2RemoveAllWeapons back to the one in tf2_stocks.inc

Now botkillers are worse than ever. As soon as you spawn with a botkiller, it'll get stuck on all your non botkiller weapons, as opposed to only having them get stuck when you go from being a player with a botkiller -> being boss -> being player again.

Anyone know if it's suppose to work? What causes this bug? If it can be fixed in code? Maybe TF2RespawnPlayer / RegeneratePlayer is messing it up since that gets called a lot during the start of the round and when players spawn?

(Reverting to tf2_removeweaponslot2 fixes it at least).

Edit: cool i fixed it goodbye headache

tf2_stocks remove player slot thing worked fine without botkiller issues in my FF2-Alpha testing(and I know soldier rocketlauncher botkillers are ALWAYS an issue, and that was after I changed getting the values of the netprops to before the entity was killed)

Chdata 08-18-2014 07:36

Re: Versus Saxton Hale 1.48 - Important Bug Fixes (Last updated 8/14/2014 | 1:45AM CD
 
Dunno bout you but tf2_stock's removeweaponslot made things worse for me in vsh.

The problem I was having with going from being player -> the boss -> player was that I forgot to change some AcceptEntityInput "Kill" to TF2RemoveWearable... derp.


All times are GMT -4. The time now is 14:22.

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