Raised This Month: $ Target: $400
 0% 

Mistakes , mistakes... ^.^


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bojan641
New Member
Join Date: Jun 2011
Location: :D
Old 06-20-2011 , 04:45   Mistakes , mistakes... ^.^
Reply With Quote #1

Can somebody fix my plugin it has lot of mistakes.

PHP Code:
/* eXtreme CoderS */

#include <amxmodx>
#include <amxmisc>
#include <colorchat>
#include <hamsandwich>

#define PLUGIN "Hulk"
#define VERSION "1.0"
#define AUTHOR "eXtreme CoderS"

//Nova imena timova
new TeamName[ ][ ] = {
    
    
"",
    
"Hulk",
    
"SWAT",
    
"Spectator"
};
//Slika za Hulka
new BojaSlikeime_Hulka32 ]
//Pocetak plugina
public plugin_init() {
    
    
register_concmd("hulk_power""power",ADMIN_RCON"<1/0> - Ukljuciti - Iskljuciti plugin"0)
    
register_concmd("hulk_cmd""cmd"ADMIN_ALL"Vidiite komande za Hulk mod",)
    
register_cvar("hulk_health""10000");
    
register_cvar("hulk_speed""2");
    
register_cvar("hulk_gravity","0.7");
    
    
register_messageget_user_msgid"StatusIcon" ), "Msg_StatusIcon" );
    
    
set_task(0.1"settings");
    
set_task(0.1"DoMapStrips");
    
    
BojaSlike get_user_msgid"ScreenFade" );
    
}
//Enable/disable
public power() {
    
    if (!
cmd_access(idg_access_flag[ACCESS_ENABLE_MOD], cid2))
        return 
PLUGIN_HANDLED;
    
    new 
arg[2]
    
read_argv(1argcharsmax(arg))
    
    if (
str_to_num(arg) == g_pluginenabled)
    return 
PLUGIN_HANDLED;
    
    
set_pcvar_num(cvar_togglestr_to_num(arg))
    
client_print(idprint_console"Hulk %L."idstr_to_num(arg) ? "MOTD_ENABLED" "MOTD_DISABLED")
    
    new 
mapname[32]
    
get_mapname(mapnamecharsmax(mapname))
    
    
server_cmd("changelevel %s"mapname)
    
    return 
PLUGIN_HANDLED;
    
}
//Cmd
public cmd() {
    
    
client_print(idprint_console"^n+-+-+-+-+-+-+-+-+-+-+-+- HULK -+-+-+-+-+-+-+-+-+-+-+-+");
    
client_print(idprint_console"hulk_power - <1/0> - Ukljuciti - Iskljuciti plugin");
    
client_print(idprint_console"hulk_cmd - Vidiite komande za Hulk mod")
    
client_print(idprint_console"hulk_health - Podesite HP za Hulka - Def. 10000");
    
client_print(idprint_console"hulk_speed - Podesite Speed za Hulka - Def. 2 puta brzi");
    
client_print(idprint_console"hulk_gravity - Podesite Gravity za Hulka - Def. 0,7 Gravitacije");
    
client_print(idprint_console"+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+^n");

//Podesvanja
public settings() {
    
    new 
players[32] , inum
    get_players
(playersinum)
    for(new 
0inum; ++a) {
        
        switch( 
cs_get_user_team) )
        {
            case 
CS_TEAM_Tset_user_health(a"hulk_health");
            case 
CS_TEAM_TSetEntPropFloat(clientProp_Data"m_flLaggedMovementValue""hulk_speed");
            case 
CS_TEAM_Tset_user_gravity indexFloat:gravity "hulk_gravity" ) );
            case 
CS_TEAM_Tgive_item(id"weapon_knife");
            case 
CS_TEAM_Tgive_item(id"weapon_deagle");
            case 
CS_TEAM_Tgive_item(id"weapon_he");
            case 
CS_TEAM_Tgive_item(id"weapon_flash");
            case 
CS_TEAM_Tgive_item(id"weapon_smoke");
            case 
CS_TEAM_Tprecache_model("models/player/hulk/hulk.mdl");
            case 
CS_TEAM_CTset_user_health(a100);
            case 
CS_TEAM_CTSetEntPropFloat(clientProp_Data"m_flLaggedMovementValue"1.0);
            case 
CS_TEAM_CTset_user_gravity indexFloat:gravity 1.0 ) );
            case 
CS_TEAM_CTgive_item(id"weapon_knife");
            case 
CS_TEAM_CTgive_item(id"weapon_deagle");
            case 
CS_TEAM_CTgive_item(id"weapon_ak47");
            case 
CS_TEAM_CTgive_item(id"weapon_m4a1");
                        
            return 
PLUGIN_HANDLED;
            
             }
    }
}
//No Buy
public Msg_StatusIconmsgidmsgdestid ) {
    
    static 
szMsg];
    
get_msg_arg_string2szMsg);
    
    if( 
equalszMsg"buyzone" ) && get_msg_arg_int) ) {
        
set_pdata_intid235get_pdata_intid235 ) & ~( << ) );
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
    
}
//No C4
public DoMapStrips() {
    
    
RemoveEntityAll("func_bomb_target")
    
RemoveEntityAll("info_bomb_target")
    
}
//No C4
stock RemoveEntityAll(name[]) {

    new 
ent engfunc(EngFunc_FindEntityByString0"classname"name)
    new 
temp
    
while (ent)
    {
        
temp engfunc(EngFunc_FindEntityByStringent"classname"name)
        
engfunc(EngFunc_RemoveEntityent)
        
ent temp
    
    
}
}
//Kraj runde
public Kraj_runde() {
    
        new 
p32 ], nget_playerspn"c" )
        new 
id 1name32 ], terori
        
for( id <= nid++ )
        {
            if( 
cs_get_user_teamid ) == CS_TEAM_T 
            {
                
terori++
                if( 
terori )
                {
                    
get_user_nameidnamecharsmaxname ) )
                }
                
cs_set_user_teamidCS_TEAM_CT )
            }
        }
        
ColorChat(0TEAM_COLOR"^4[Hulk] ^1Zadnji hulk je bio '%s',bira se novi! Pripremi se "ime_Hulka );
    }
}
//Nova runda
public Nova_runda() 
{
    
        new 
p32 ], nget_playerspn"ce""CT" ); new id 1
        
if( cs_get_user_teamid ) == CS_TEAM_T
        
for( id <= nid++ )
        {
            
message_beginMSG_ONE_UNRELIABLEBojaSlike_);
            
write_short15 * ( << 12 ) );
            
write_short( ( << 12 ) * );
            
write_shortFFADE_IN );
            
write_byte);
            
write_byte);
            
write_byte);
            
write_byte200 );
            
message_end( ); 
            
            
set_task0.5"Biranje_hulka")
            
set_task1.8"hulk_msg")
        }
}
//Biranje Hulka
public Biranje_hulka()
{
        new 
p32 ], nget_playerspn"c" ); new id 1
        
new cts32 ], ctget_playerstst"ce""T" )
        
        for( 
id <= nid++ )
        {
            if( 
&& cs_get_user_teamid ) == CS_TEAM_CT )
            {
                new 
rdm_igrac random_num1)
                
cs_set_user_teamrdm_igracCS_TEAM_T )
            }
            else if( 
cs_get_user_teamid ) == CS_TEAM_T )
            {
                
get_user_nameidime_Hulkacharsmaxime_Hulka ) )
            }
        }
}
//Hulk MSG
public hulk_msg()
{    
        
ColorChat(0TEAM_COLOR"^4[Hulk] ^1'=-. HULK   JE   IZABRAN .-='^n^n^nTi si sada HULK!\ Pripremi se!^n^nMosa brate, hulk je sada '%s', uzivajte !"ime_Hulka )
        return 
PLUGIN_HANDLED
 
}
 
/* eXtreme CoderS */ 
Bojan641 is offline
Send a message via Skype™ to Bojan641
Bojan641
New Member
Join Date: Jun 2011
Location: :D
Old 06-20-2011 , 04:48   Re: Mistakes , mistakes... ^.^
Reply With Quote #2

And what includes should i use?
Bojan641 is offline
Send a message via Skype™ to Bojan641
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-20-2011 , 13:59   Re: Mistakes , mistakes... ^.^
Reply With Quote #3

You use what ever includes you need.

Also, it looks like you are just copy pasting code because a lot of it is not even in there. You should learn the basics before trying to code something this elaborate.
__________________
fysiks is online now
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 23:34.


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