Raised This Month: $ Target: $400
 0% 

how can i fix this code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hasler
BANNED
Join Date: Jul 2009
Location: Argentina, Rosario
Old 12-26-2009 , 22:49   how can i fix this code
Reply With Quote #1

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)

Hasler is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-26-2009 , 23:06   Re: how can i fix this code
Reply With Quote #2

Well . . . what'w wrong with it? Never just say "fix it." Always explain what you are having trouble with.
__________________
fysiks is offline
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 12-27-2009 , 00:30   Re: how can i fix this code
Reply With Quote #3

Yes, he is right. We don't know what you want the plugin do..
Mxnn is offline
Hasler
BANNED
Join Date: Jul 2009
Location: Argentina, Rosario
Old 12-27-2009 , 04:26   Re: how can i fix this code
Reply With Quote #4

the plugin is working but as I can summarize, that is, using less code
Hasler is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-27-2009 , 18:10   Re: how can i fix this code
Reply With Quote #5

Quote:
Originally Posted by Hasler View Post
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.
__________________
fysiks is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-27-2009 , 21:53   Re: how can i fix this code
Reply With Quote #6

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.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
kikifrh
Senior Member
Join Date: May 2009
Old 12-28-2009 , 18:59   Re: how can i fix this code
Reply With Quote #7

Why dont put godmode on spec? Oo
kikifrh is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-28-2009 , 19:08   Re: how can i fix this code
Reply With Quote #8

Quote:
Originally Posted by kikifrh View Post
Why dont put godmode on spec? Oo
He didn't say anything about godmode.
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

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 04:11.


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