This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[L4D]BUG after turning on the swith


Post New Thread Reply   
 
Thread Tools Display Modes
ZBzibing
Senior Member
Join Date: Dec 2012
Old 12-16-2022 , 04:34   Re: [L4D]BUG after turning on the swith
Reply With Quote #11

As you can see, by the time this topic was started, I had also found a solution to this bug through extensive testing. What could be done in an hour for someone who can write programs, would take me six months. There are so many obstacles in between, language, programming, runtime environment, and computer beginnings. Too many factors. But I still want to finish it because of my obsession.
__________________
Please forgive, If I'm not describing it accurately. I use google translate
Functional tests are all from L4D1, and are only keen to solve and fix various bugs of L4D1:
ZBzibing is offline
Austin
Senior Member
Join Date: Oct 2005
Old 12-16-2022 , 04:39   Re: [L4D]BUG after turning on the swith
Reply With Quote #12

Quote:
Originally Posted by ZBzibing View Post
Sometimes it will be effective, sometimes it will be invalid and an error will be reported. How to solve it?
Check to see if you have a valid client index and then only run FakeClientCommand() if you have a valid client.
PHP Code:
if (IsClientInGame(client))
    
FakeClientCommand() 
Also,
for the type of things your doing you may want to check out vscripts.
Some things are much easier with them and you can use them to change just about anything.

Tweaking the map .nut files to get the campaigns to do different things including the finals and gauntlet runs.
https://developer.valvesoftware.com/wiki/L4D2_Vscripts
https://developer.valvesoftware.com/wiki/VICE
https://developer.valvesoftware.com/...pted_mutations
Austin is offline
ZBzibing
Senior Member
Join Date: Dec 2012
Old 12-16-2022 , 04:43   Re: [L4D]BUG after turning on the swith
Reply With Quote #13

Quote:
Originally Posted by Austin View Post
Check to see if you have a valid client index and then only run FakeClientCommand() if you have a valid client.
PHP Code:
if (IsClientInGame(client))
    
FakeClientCommand() 
Also,
for the type of things your doing you may want to check out vscripts.
Some things are much easier with them and you can use them to change just about anything.

Tweaking the map .nut files to get the campaigns to do different things including the finals and gauntlet runs.
https://developer.valvesoftware.com/wiki/L4D2_Vscripts
https://developer.valvesoftware.com/wiki/VICE
https://developer.valvesoftware.com/...pted_mutations
Thank you, Austin
Vscripts, officially it is only allowed in L4D2, can we use it in L4D1 as well?
__________________
Please forgive, If I'm not describing it accurately. I use google translate
Functional tests are all from L4D1, and are only keen to solve and fix various bugs of L4D1:
ZBzibing is offline
Austin
Senior Member
Join Date: Oct 2005
Old 12-16-2022 , 05:45   Re: [L4D]BUG after turning on the swith
Reply With Quote #14

Quote:
Originally Posted by ZBzibing View Post
Thank you, Austin
Vscripts, officially it is only allowed in L4D2, can we use it in L4D1 as well?
I just noticed you are only interested in L4D1.

Vscripts is L4D2 only.
https://developer.valvesoftware.com/wiki/VScript
Austin is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 12-16-2022 , 17:17   Re: [L4D]BUG after turning on the swith
Reply With Quote #15

It is better to share the full .sp file as attachment instead of pasting the plugin code, I tried to compile your code and wasn't able because it still has missing code parts in the snippet you shared.

Anyway, try doing the following steps.

Change the part below
PHP Code:
public Action zmobfix(int args)
{
...

to:

PHP Code:
void zmobfix(int args)
{
    
char name[] = "mob";
    
char command[] = "z_spawn";
    
char iflags GetCommandFlags(command);
    
SetCommandFlags(commandiflags & ~FCVAR_CHEAT);
    for (
int i 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i))
        {
            
FakeClientCommand(i"z_spawn %s"name);
            break;
        }
    }
    
SetCommandFlags(commandiflags);
    
ShowActivity2(activatortmp"ZB""Spawned a %s"name);
    
PrintToChatAll("\x04[test]trigger:%N",activatortmp);

__________________

Last edited by Marttt; 12-16-2022 at 17:18.
Marttt is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:02.


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