AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   how can i fix this code (https://forums.alliedmods.net/showthread.php?t=113448)

Hasler 12-26-2009 22:49

how can i fix this code
 
how can i 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)



fysiks 12-26-2009 23:06

Re: how can i fix this code
 
Well . . . what'w wrong with it? Never just say "fix it." Always explain what you are having trouble with.

Mxnn 12-27-2009 00:30

Re: how can i fix this code
 
Yes, he is right. We don't know what you want the plugin do..

Hasler 12-27-2009 04:26

Re: how can i fix this code
 
the plugin is working but as I can summarize, that is, using less code

fysiks 12-27-2009 18:10

Re: how can i fix this code
 
Quote:

Originally Posted by Hasler (Post 1032574)
the plugin is working but as I can summarize, that is, using less code

summarize?? Are you asking us to optimize the plugin?

I believe there are a few plugins that already do this. Look at them.

ConnorMcLeod 12-27-2009 21:53

Re: how can i fix this code
 
You took my working code and added some stuff.
Why god do you try to respawn a spectator ?
If you really want to spawn a spectator, don't use my code, it's useless.

kikifrh 12-28-2009 18:59

Re: how can i fix this code
 
Why dont put godmode on spec? Oo

fysiks 12-28-2009 19:08

Re: how can i fix this code
 
Quote:

Originally Posted by kikifrh (Post 1034510)
Why dont put godmode on spec? Oo

He didn't say anything about godmode.


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

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