Raised This Month: $51 Target: $400
 12% 

[L4D] Stripping CHEAT Flag of 'respawn'?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 07-03-2009 , 16:25   [L4D] Stripping CHEAT Flag of 'respawn'?
Reply With Quote #1

For the sm_respawn plugin...

Code:
            new String:command[] = "respawn";
            new flags = GetCommandFlags(command);
            SetCommandFlags(command, flags & ~FCVAR_CHEAT);
            FakeClientCommand(player_id,"respawn");
I tried stripping the CHEAT flag from respawn momentarily instead of setting sv_cheats silently to 1 (since that screws with so many things).

But it doesnt work. Why? In the Infected Bots Plugin its used just like this for z_spawn and "give health" ...


EDIT:

Well in this thread theres the exact same issue with no solution, so ... stuck with sv_cheats i suppose

Last edited by AtomicStryker; 07-03-2009 at 16:34.
AtomicStryker is offline
doku
Member
Join Date: May 2009
Old 07-03-2009 , 17:15   Re: [L4D] Stripping CHEAT Flag of 'respawn'?
Reply With Quote #2

don't know if this is what you're trying to do but I wrote this script which will respawn a player, maybe it will help :


prep sdk call for Round Respawn :


PHP Code:
new Handle:hGameConf INVALID_HANDLE
new Handle:hRoundRespawn INVALID_HANDLE


public OnPluginStart()
{

    
hGameConf LoadGameConfigFile("l4d")
    
StartPrepSDKCall(SDKCall_Player)
    
PrepSDKCall_SetFromConf(hGameConfSDKConf_Virtual"RoundRespawn")
    
hRoundRespawn EndPrepSDKCall()
    

then call it when ever you need :

PHP Code:
SDKCall(hRoundRespawnclient
you will need to set up the l4d offset in the 'gamedata' folder by creating l4d.txt with the following :

PHP Code:
"Games"
{
    
"left4dead"
    
{
        
"Offsets"
        
{
            
"RoundRespawn"
            
{
                
"windows"    "488"
                "linux"        "489"
            
}
        }
    }

doku is offline
wgooch
Member
Join Date: Dec 2008
Old 07-03-2009 , 21:11   Re: [L4D] Stripping CHEAT Flag of 'respawn'?
Reply With Quote #3

Quote:
Originally Posted by doku View Post
don't know if this is what you're trying to do but I wrote this script which will respawn a player, maybe it will help :


prep sdk call for Round Respawn :


PHP Code:
new Handle:hGameConf INVALID_HANDLE
new Handle:hRoundRespawn INVALID_HANDLE


public OnPluginStart()
{

    
hGameConf LoadGameConfigFile("l4d")
    
StartPrepSDKCall(SDKCall_Player)
    
PrepSDKCall_SetFromConf(hGameConfSDKConf_Virtual"RoundRespawn")
    
hRoundRespawn EndPrepSDKCall()
    

then call it when ever you need :

PHP Code:
SDKCall(hRoundRespawnclient
you will need to set up the l4d offset in the 'gamedata' folder by creating l4d.txt with the following :

PHP Code:
"Games"
{
    
"left4dead"
    
{
        
"Offsets"
        
{
            
"RoundRespawn"
            
{
                
"windows"    "488"
                "linux"        "489"
            
}
        }
    }

That's pretty awesome, is there by any chance a way to force the player into a ghost state? (Infected spawning state)
The ghost command and respawn command cannot be stripped of cheat flags.
wgooch 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 22:12.


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