Raised This Month: $ Target: $400
 0% 

Correct the code pls


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 10-26-2009 , 14:10   Correct the code pls
Reply With Quote #1

When compile:

Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// Unstoppable.sma
// D:\Dovydo\Counter - strike Failai\Addonai\L4DPlague\L4DPlague\addons\amxmodx\
scripting\Unstoppable.sma(98) : warning 213: tag mismatch
// D:\Dovydo\Counter - strike Failai\Addonai\L4DPlague\L4DPlague\addons\amxmodx\
scripting\Unstoppable.sma(99) : warning 213: tag mismatch
// D:\Dovydo\Counter - strike Failai\Addonai\L4DPlague\L4DPlague\addons\amxmodx\
scripting\Unstoppable.sma(105) : error 035: argument type mismatch (argument 2)
// D:\Dovydo\Counter - strike Failai\Addonai\L4DPlague\L4DPlague\addons\amxmodx\
scripting\Unstoppable.sma(106) : error 035: argument type mismatch (argument 2)
// D:\Dovydo\Counter - strike Failai\Addonai\L4DPlague\L4DPlague\addons\amxmodx\
scripting\Unstoppable.sma(112) : warning 209: function "Unstoppable" should retu
rn a value
//
// 2 Errors.
// Could not locate output file D:\Dovydo\Counter - strike Failai\Addonai\L4DPla
gue\L4DPlague\addons\amxmodx\scripting\compiled\Unstoppable.amx (compile failed)
.
//
// Compilation Time: 0,22 sec
// ----------------------------------------

Press enter to exit ...
Full Code:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <amxmisc> 
#include <fun>
#include <cstrike>

#define PLUGIN "Unstoppable"
#define VERSION "1.0"
#define AUTHOR "DoviuX"

/*================================================================================
 [Customization]
=================================================================================*/
new const gIsUnstoppable[][] = { 
    
"sound/Unstoppable1.wav",
    
"sound/Unstoppable2.wav",
    
"sound/Unstoppable3.wav"
}

new const 
gNoMoney[] = "sound/NoMoney.wav"

new const Model[] = { "model/player/Unstoppable/Unstoppable.mdl" }
/*================================================================================
 [New Variables]
=================================================================================*/
//Unstoppable stuff...
new price
new health
new speed
new gravity
new armor

/*================================================================================
 [Init and Precache]
=================================================================================*/

public plugin_init()
{
      
register_pluginPLUGINVERSIONAUTHOR );


      
register_clcmd("say /unstoppable""Unstoppable")
      
register_clcmd("say_team /unstoppable""Unstoppable")

    
price register_cvar("un_unstoppable""16000")

    
health register_cvar("un_health""1000");
    
speed register_cvar("un_speed""295");
    
gravity register_cvar("un_gravity""0.6");
    
armor register_cvar("un_armor""300");
}

public 
plugin_cfg()
{
    
// Get configs dir
    
new cfgdir[32]
    
get_configsdir(cfgdircharsmax(cfgdir))

    
// Execute config file (Unstoppable.cfg)
    
server_cmd("exec %s/Unstoppable.cfg"cfgdir)
}

/*================================================================================
 [Plugin Start]
=================================================================================*/

public plugin_precache()
{    
        for(new 
0sizeof gIsUnstoppablei++)
            
precache_genericgIsUnstoppable] )

    
precache_sound(gNoMoney)

        
precache_modelModel);
}

public 
Unstoppable(id)
{
    new 
Cost get_pcvar_num(price);
    new 
Money cs_get_user_money(id);
            
    if (
Money Cost)
    {
                
set_hudmessage225225225, -1.00.2926.012.0 );
                
show_hudmessage0"You don't have enough money!" );
        
client_cmd0"spk %s"gNoMoney);
        return 
PLUGIN_HANDLED;
    } 
    else 
    {
            new 
name[32];
            
get_user_name(id,name,31);
                
set_hudmessage225225225, -1.00.2926.012.0 );
                
show_hudmessage0"%s is now unstoppable!"name);
            
cs_set_user_modelid"Model")
            
set_user_healthidget_pcvar_numhealth ) )
            
set_user_maxspeedidget_pcvar_numspeed ) )
            
set_user_gravityidget_pcvar_numgravity ) )
            
set_user_armoridget_pcvar_numarmor ) )
        
client_cmdid"spk %s"gIsUnstoppable[random_num(0sizeof gIsUnstoppable 1)])
        
strip_user_weapons(id)
        
give_itemid"weapon_m4a1")
        
give_itemid"weapon_deagle")
        
cs_set_user_bpammoid"weapon_m4a1"200 )
        
cs_set_user_bpammoid"weapon_deagle"200 )

        
Money -= Cost;
    
        
cs_set_user_money(idMoney);    
    }

DoviuX is offline
Send a message via Skype™ to DoviuX
 


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 17:43.


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