AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   how i can block the letter "f"? (https://forums.alliedmods.net/showthread.php?t=113270)

Hasler 12-25-2009 00:59

how i can block the letter "f"?
 
well, I have a problem, I'm making a plugin for X person to write / spect spect fence while is alive, my problem is, for example there are 2 ct and 2 tt, tt one dies, and one of them left alive but this type "/ spect" and is transferable to bone SPECT is still alive but spect, but the continual round as the "tt" is still alive but is now spect: S I leave the code, if you please me can help.
and how can i block the flashlight for one person, and as weapons to block one person also and.. if you please me can help. Thanks Sorry for my English
Code:
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <fakemeta>

public plugin_init() {
    
register_plugin("Invisible spect""1.5""Hasler")
    
    
register_clcmd("say /spect","Spectador")
    
register_clcmd("say_team /spect","Spectador")
    
    
register_cvar("mp_flashlight""blockear")
}

public 
blockear() return PLUGIN_HANDLED

public Spectador(id){
    if(
is_user_alive(id)){
                   
    
strip_user_weapons(id)
    
set_user_godmode(id1)
    
set_user_footsteps(id1)
    
cs_set_user_team(id,CS_TEAM_SPECTATOR,CS_DONTCHANGE)
    
set_pev(idpev_effects, (pev(idpev_effects) | 128) )
    
set_pev(idpev_solid0)
    }



joropito 12-25-2009 09:01

Re: how i can block the letter "f"?
 
You should search how to block "impulse 101".
Yuo can serach for custom flashlight and adapt the code.

I don't know if it can be blocked.

ConnorMcLeod 12-25-2009 10:56

Re: how i can block the letter "f"?
 
mp_flashlight 0 in server.cfg would more efficient.


If you want to filter it by player, then use register_impulse from engine module.

worldspawn 12-25-2009 13:06

Re: how i can block the letter "f"?
 
do you want to make player alive, unkillable, invisible spectator that can only run/walk?

ConnorMcLeod 12-25-2009 13:13

Re: how i can block the letter "f"?
 
Try this :

PHP Code:

public ClientCommand_Spec(id)
{
    const 
m_fGameHUDInitialized 349
    
if( cs_get_user_team(id) != CS_TEAM_SPECTATOR )
    {
        
dllfunc(DLLFunc_ClientPutInServerid)
        
set_pdata_int(idm_fGameHUDInitialized1)
        
engclient_cmd(id"jointeam""6")
        
client_cmd(id"slot1")
    }
    return 
PLUGIN_HANDLED



Mxnn 12-25-2009 13:27

Re: how i can block the letter "f"?
 
PHP Code:

public plugin_init () register_concmd("impulse 100""block")

public 
block() return PLUGIN_HANDLED 

?

ConnorMcLeod 12-25-2009 13:48

Re: how i can block the letter "f"?
 
Quote:

Originally Posted by Mxnn (Post 1030812)
PHP Code:

public plugin_init () register_concmd("impulse 100""block")

public 
block() return PLUGIN_HANDLED 

?

Won't work.

Hasler 12-26-2009 01:18

Re: how i can block the letter "f"?
 
Quote:

Originally Posted by ConnorMcLeod (Post 1030807)
Try this :

PHP Code:

public ClientCommand_Spec(id)
{
    const 
m_fGameHUDInitialized 349
    
if( cs_get_user_team(id) != CS_TEAM_SPECTATOR )
    {
        
dllfunc(DLLFunc_ClientPutInServerid)
        
set_pdata_int(idm_fGameHUDInitialized1)
        
engclient_cmd(id"jointeam""6")
        
client_cmd(id"slot1")
    }
    return 
PLUGIN_HANDLED




thks you so much.. and.. how can fix this code?

PHP Code:

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <fakemeta>

public plugin_init() {
    
register_plugin("Invisible spect""1.5""Hasler")
    
    
register_clcmd("say /spect","Spectador")
    
register_clcmd("say_team /spect","Spectador")
}
public 
Spectador(id){
    const 
m_fGameHUDInitialized 349
    
if( cs_get_user_team(id) != CS_TEAM_SPECTATOR )
        
        {
            
dllfunc(DLLFunc_ClientPutInServerid)
            
set_pdata_int(idm_fGameHUDInitialized1)
            
engclient_cmd(id"jointeam""6")
            
client_cmd(id"slot1")
            
user_silentkill(id)
            
set_task(2.0,"respawn",id)
        }
    
}
public 
respawn(id){
    
dllfunc(DLLFunc_Spawnid)
    
strip_user_weapons(id)
    
set_user_godmode(id1)
    
set_user_footsteps(id1)
    
cs_set_user_team(id,CS_TEAM_SPECTATOR,CS_DONTCHANGE)
    
set_pev(idpev_effects, (pev(idpev_effects) | 128) )
    
set_pev(idpev_solid0)




All times are GMT -4. The time now is 04:08.

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