Raised This Month: $51 Target: $400
 12% 

I need sum help with this script


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nubless
Member
Join Date: May 2010
Location: Denmark
Old 06-10-2011 , 03:42   I need sum help with this script
Reply With Quote #1

Well since im new too scripting the i really could use sum help from the pro's too see if they can find something wronge with this
__________________

Last edited by Nubless; 06-10-2011 at 09:15. Reason: made a new. used php istead
Nubless is offline
Send a message via MSN to Nubless
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 06-10-2011 , 07:47   Re: I need sum help with this script
Reply With Quote #2

The indentation is clearly wrong. If you are not going to fix that I doubt anyone would help you.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Nubless
Member
Join Date: May 2010
Location: Denmark
Old 06-10-2011 , 09:13   Re: I need sum help with this script
Reply With Quote #3

i guess i have posted it in the wrong form.

try this one
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include<superheromod>  
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
//minecrafter
minecrafter_level 23
minecrafter_health 999
minecrafter_speed 400
 
 
// Add your code here...
new gHeroID
new const gHeroName[] = "Minecrafter" //creates a string varr to hold the hero name
new bool:gHasSuperPower[SH_MAXSLOTS+1//creates a varr with an aray, with 1 slot 
public plugin_init() {
 
register_plugin(PLUGINVERSIONAUTHOR)
 {
 
    
register_plugin("SUPERHERO minecrafter""1.0""nubless")
 
 
    new 
pcvarLevel register_cvar("super_level""23"
 
 
    
gHeroID sh_create_hero(gHeroNamepcvarLevel)
 
    
sh_set_hero_info(gHeroID"short decription""long decription")
 
 
}  
public 
sh_hero_init(idheroIDmode)
{
 
    if (
gHeroID != heroID) return
 
 
    switch(
mode)
    {
 
        case 
SH_HERO_ADD:
        {
 
            
gHasSuperPower[id] = true
        
}
 
        case 
SH_HERO_DROP:
        {
 
            
gHasSuperPower[id] = false
        
}
    }
}  
//
    
gHeroID sh_create_hero(gHeroNamepcvarLevel)
 
    
sh_set_hero_info(gHeroID"short decription""long decription")
 
 
}
public 
sh_hero_init(idheroIDmode)
{
 
    if (
gHeroID != heroID) return
 
 
    switch(
mode)
    {
 
        case 
SH_HERO_ADD:
        {
 
            
gHasSuperPower[id] = true
        
}
 
        case 
SH_HERO_DROP:
        {
 
            
gHasSuperPower[id] = false
        
}
    }
}  
{
 
    new 
pcvarHealth register_cvar("minecrafter_health""999")
    new 
pcvarSpeed register_cvar("minecracter_speed""400")
 
    
sh_set_hero_hpap(gheroIDpcvarHealth0)
    
sh_set_hero_speed(gHeroIDpcvarSpeed)
}  
new const 
gSuperWeapon[] = "models/shmod/v_knife.mdl"
{
       
register_event("CurWeapon""weapon_change""be""1=1")
}
public 
sh_hero_init(idheroIDmode)
{
 
    switch (
mode)
    {
 
        case 
SH_HERO_ADD:
        {
            
gHasSuperPower[id] = true
            minecrafter_weapon
(id)
            
switch_model(id)
        }
 
        case 
SH_HERO_DROP:
        {
            
gHasSuperPower[id] = false
 
            
if (is_user_alive(id))
            {
              
sh_drop_weapon(idCSW_knifetrue)
            }
        }
    }
}
public 
sh_client_spawn(id)
{
 
    if (
gHasSuperPower[id])
    {
      
minecrafter_weapon(id)
    }
}
 
minecrafter_weapon(id)
{
 
    if (
sh_is_active() && is_user_alive(id) && gHasSuperPower[id] )
    {
       
sh_give_weapon(idCSW_knife)
    }
}
 
public 
weapon_change(id)
{
 
    if ( !
sh_is_active() || !gHasSuperPower[id] ) return
 
 
    new 
weaponID read_data(2)
 
    if (
weaponID !=CSW_knife) return
 
 
    
switch_model(id)
 
 
    if (
read_data(3) == 0)
    {
       
sh_reload_ammo(id1)
    }
}
switch_model(id)
{
 
    if (!
sh_is_active() || !is_user_alive(id) || !gHasSuperPower[id] ) return
 
 
    if (
get_user_weapon(id) == CSW_knife)
    {
                
set_pev(idpev_viewmodel2gSuperWeapon)
    }
}  
8. By request 

__________________
Nubless is offline
Send a message via MSN to Nubless
RollerBlades
Senior Member
Join Date: Feb 2011
Location: Sweden
Old 06-10-2011 , 11:18   Re: I need sum help with this script
Reply With Quote #4

Code:
#include<superheromod>  /* minecrafter minecrafter_level 23 minecrafter_health 999 minecrafter_speed 400 */ new gHeroID; new const gHeroName[] = "Minecrafter"; new bool:gHasMinePower[SH_MAXSLOTS+1]; new const gMineCraftWeapon[] = "models/shmod/v_knife.mdl"; public plugin_init() {     register_plugin("SUPERHERO Minecrafter", "1.0", "nubless");         new pcvarLevel = register_cvar("minecraft_level", "23") ;     new pcvarHealth = register_cvar("minecraft_health", "999");     new pcvarSpeed = register_cvar("minecract_speed", "400");         gHeroID = sh_create_hero(gHeroName, pcvarLevel);     sh_set_hero_info(gHeroID, "infromation shown in heromenu.", "infromation shown when picked the hero.");         sh_set_hero_hpap(gHeroID, pcvarHealth, 0);     sh_set_hero_speed(gHeroID, pcvarSpeed);         register_event("CurWeapon", "weapon_change", "be", "1=1"); }  public plugin_precache() {     precache_model(gMineCraftWeapon); } public sh_hero_init(id, heroID, mode) {     if (gHeroID != heroID) return;         switch(mode)     {         case SH_HERO_ADD:         {             gHasMinePower[id] = true;             minecrafter_weapon(id);             switch_model(id);             }                 case SH_HERO_DROP:         {             gHasMinePower[id] = false;                         if ( is_user_alive(id) )             {                 sh_drop_weapon(id, CSW_KNIFE, true);             }         }     }      }      public sh_client_spawn(id) {     if (gHasMinePower[id])     {         minecrafter_weapon(id);     } } minecrafter_weapon(id) {     if ( sh_is_active() && is_user_alive(id) && gHasMinePower[id] )     {         sh_give_weapon(id, CSW_KNIFE);     } } public weapon_change(id) {     if ( !sh_is_active() || !gHasMinePower[id] ) return;     if (read_data(2) !=CSW_KNIFE) return;     switch_model(id); } switch_model(id) {     if (!sh_is_active() || !is_user_alive(id) || !gHasMinePower[id] ) return;         if (get_user_weapon(id) == CSW_KNIFE)     {         set_pev(id, pev_viewmodel2, gMineCraftWeapon)     } }

Last edited by RollerBlades; 06-10-2011 at 11:33.
RollerBlades is offline
Nubless
Member
Join Date: May 2010
Location: Denmark
Old 06-10-2011 , 11:40   Re: I need sum help with this script
Reply With Quote #5

I gently say thank you very much!
__________________
Nubless is offline
Send a message via MSN to Nubless
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 05:16.


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