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

hero help


Post New Thread Reply   
 
Thread Tools Display Modes
mage
Senior Member
Join Date: Sep 2005
Old 09-04-2005 , 04:43  
Reply With Quote #11

ok one questen when you are finish can you post it or pm me it?
mage is offline
Mega
Senior Member
Join Date: Aug 2005
Old 09-04-2005 , 08:40  
Reply With Quote #12

ill post it
Mega is offline
mage
Senior Member
Join Date: Sep 2005
Old 09-04-2005 , 11:55  
Reply With Quote #13

ok thenks man it sounds cool and i havent seen the model
mage is offline
Mega
Senior Member
Join Date: Aug 2005
Old 09-04-2005 , 12:01  
Reply With Quote #14

models :
Attached Images
File Type: jpg naamloos3.JPG (49.9 KB, 115 views)
File Type: jpg naamloos2.JPG (50.1 KB, 121 views)
File Type: jpg naamloos.jpg (8.8 KB, 180 views)
Mega is offline
mage
Senior Member
Join Date: Sep 2005
Old 09-04-2005 , 12:13  
Reply With Quote #15

cool that is awesom
mage is offline
Mega
Senior Member
Join Date: Aug 2005
Old 09-04-2005 , 12:20  
Reply With Quote #16

Code:
//Mafia! /* CVARS copy and paste to shconfig.cfg //Mafia mafia_level 10 // Level where this hero can be choosen mafia_galilmult 3.0 // His Galil Mult mafia_knifemult 3.0 // His Knife mafia_armor 150 // His body protection mafia_money 50000  // amout of money mafia starts with */ #include <amxmod> #include <Vexd_Utilities> #include <superheromod> //Global Variables new gHeroName[]="Mafia" new bool:gHasMafiaPower[SH_MAXSLOTS+1] //---------------------------------------------------------------------------------------------- public plugin_init() {     //Plugin Info     register_plugin("SUPERHERO Mafia","1.0","mega")         //DO NOT EDIT THESE CVARS. USE shconfig.cfg     register_cvar("mafia_level", "10")     register_cvar("mafia_galilmult", "3.0")     register_cvar("mafia_knifemult", "3.0")     register_cvar("mafia_armor","150")     register_cvar("mafia_money","50000")         //FIRE THIS EVENT TO CREATE THIS HERO     shCreateHero(gHeroName, "Mafia", "Get a tommygun, a knife, and get $50.000", false, "mafia_level")           // REGISTER EVENTS THIS HERO WILL RESPOND TO! (AND SERVER COMMANDS     register_srvcmd("mafia_init", "mafia_init")     shRegHeroInit(gHeroName, "mafia_init")    //EVENTS    register_event("ResetHUD", "newSpawn","b")    register_event("CurWeapon", "weaponChange","be","1=1")    register_event("Damage", "mafia_damage", "b","2!0")    register_event("ResetHUD","newRound","b")    //DEATH    register_event("DeathMsg", "mafia_death", "a")    // MAFIA'S VARIABLE    shSetMaxArmor(gHeroName, "mafia_armor" ) }    //---------------------------------------------------------------------------------------------- public mafia_init() {     // First Argument is an id     new temp[6]     read_argv(1,temp,5)     new id = str_to_num(temp)     // 2nd Argument is 0 or 1 depending on whether the id has Mafia     read_argv(2,temp,5)     new hasPowers = str_to_num(temp)     //Reset thier shield restrict status     //Shield restrict MUST be before weapons are given out     shResetShield(id)     //Got to remove powers from a Superman that lost his powers...     //This gets run if they had the power but don't anymore     if ( !hasPowers && gHasMafiaPower[id] && is_user_alive(id) ) {         shRemArmorPower(id)         mafia_weapons(id)         switchmodel(id)         }         else {         engclient_cmd(id,"drop","weapon_galil")     //Sets this variable to the current status     gHasMafiaPower[id] = (hasPowers != 0)         } } //---------------------------------------------------------------------------------------------- public plugin_precache() { precache_model("models/shmod/mafia_galil.mdl") precache_model("models/shmod/mafia_knife.mdl") precache_model("models/player/mafia/mafia.mdl") } //---------------------------------------------------------------------------------------------- public newSpawn(id) { if ( gHasMafiaPower[id] && is_user_alive(id) && shModActive() ) { set_task(0.1, "mafia_weapons", id) new clip, ammo, wpnid = get_user_weapon(id,clip,ammo) if (wpnid != CSW_GALIL && wpnid > 0) {  new wpn[32]  get_weaponname(wpnid,wpn,31)  engclient_cmd(id,wpn) } } } //---------------------------------------------------------------------------------------------- public newRound(id) {     new money     if ( gHasMafiaPower[id] && is_user_alive(id) && shModActive() ){         money=cs_get_user_money(id)         new addmoney=floatround(money * 0.1)         money+=addmoney         cs_set_user_money( id, money, 1 )                 cs_set_user_money(id,get_cvar_num("gates_money"))    } } //---------------------------------------------------------------------------------------------- public Money(id,num) // check money {    new userMoney = cs_get_user_money(id)    if (userMoney < 0)    {       client_print(id,print_center,"You have insufficient funds!")       return false    }    cs_set_user_money(id,userMoney)    return true } //---------------------------------------------------------------------------------------------- public mafia_weapons(id) { if ( is_user_alive(id) && shModActive() ) { shGiveWeapon(id,"weapon_galil") } } //---------------------------------------------------------------------------------------------- public switchmodel(id) { if ( !is_user_alive(id) || !gHasMafiaPower[id] ) return new clip, ammo, wpnid = get_user_weapon(id,clip,ammo) if (wpnid == CSW_GALIL) { // Weapon Model change thanks to [CCC]Taz-Devil Entvars_Set_String(id, EV_SZ_viewmodel, "models/shmod/mafia_galil.mdl") } else if (wpnid == CSW_KNIFE) { // Weapon Model change thanks to [CCC]Taz-Devil Entvars_Set_String(id, EV_SZ_viewmodel, "models/shmod/mafia_knife.mdl")           } } //---------------------------------------------------------------------------------------------- public weaponChange(id) { if ( !gHasMafiaPower[id] || !shModActive() ) return new wpnid = read_data(2) new clip = read_data(3) if ( wpnid != CSW_GALIL) return switchmodel(id) // Never Run Out of Ammo! if ( clip == 0 ) { shReloadAmmo(id)         } } //---------------------------------------------------------------------------------------------- public mafia_death() {     new id = read_data(2)     if ( !gHasMafiaPower[id] ) return } //---------------------------------------------------------------------------------------------- public mafia_damage(id) {     if (!shModActive() || !is_user_alive(id)) return     new damage = read_data(2)     new weapon, bodypart, attacker = get_user_attacker(id, weapon, bodypart)     new headshot = bodypart == 1 ? 1 : 0     if ( attacker <= 0 || attacker > SH_MAXSLOTS ) return     if ( gHasMafiaPower[attacker] && weapon == CSW_GALIL && is_user_alive(id) ) {                 // do extra damage         new extraDamage = floatround(damage * get_cvar_float("mafia_galilmult") - damage)     if (extraDamage > 0) shExtraDamage( id, attacker, extraDamage, "galil", headshot )         } else     if ( gHasMafiaPower[attacker] && weapon == CSW_KNIFE && is_user_alive(id) ) {         new extraDamage = floatround(damage * get_cvar_float("mafia_knifemult") - damage)     if (extraDamage > 0) shExtraDamage( id, attacker, extraDamage, "knife", headshot )             } } //----------------------------------------------------------------------------------------------

is this ok?
i did what u said
Mega is offline
mage
Senior Member
Join Date: Sep 2005
Old 09-04-2005 , 12:26  
Reply With Quote #17

it helped if you posted the errors and if it isent i think it is O.K
mage is offline
Mega
Senior Member
Join Date: Aug 2005
Old 09-04-2005 , 12:36  
Reply With Quote #18

i don't get errors
just my knife model and player model ain't working
and my money either
Mega is offline
mage
Senior Member
Join Date: Sep 2005
Old 09-04-2005 , 12:47  
Reply With Quote #19

ok understand

line 130 You have insufficient funds isent it You have insufficient founds?
mage is offline
Mega
Senior Member
Join Date: Aug 2005
Old 09-05-2005 , 10:43  
Reply With Quote #20

what does that have to do with it, you can put there anything you want, like "You don't have money"
Mega is offline
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 18:15.


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