Raised This Month: $ Target: $400
 0% 

Halo_Skins .5


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
FrontLine
Member
Join Date: Apr 2006
Old 04-15-2006 , 06:01   Halo_Skins .5
Reply With Quote #1

Haven't touched the juice, or scripting in a while...
Went to obtain some help, which i did from
Ye Olde Slurp , suicid3 and hopefully KingPin the man himself.

Anyway i had the idea, to replace the p90 with the MA5B,
for you halo lovers, that's the assault rifle...

Anyway, i got to the part, where i wanted to add tracers,
So i looked at KingPin's edition of X Weapons...

But because the advice below, went with the other way!
Which ended up being betta because of the redirects with damage

Anyway, here is the code as it is now.

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fakemeta> #include <engine> #include <fun> public plugin_init() {     register_plugin("Halo Skins", "0.4", "Front Line")     register_event("ResetHUD", "resetModel", "b")     register_forward(FM_EmitSound, "EmitSound")     register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")         register_forward(FM_TraceLine,"fw_traceline",1)         register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")     return PLUGIN_CONTINUE } public plugin_precache() {     precache_model("models/player/halo_t/halo_t.mdl")     precache_model("models/player/halo_ct/halo_ct.mdl")       precache_model("models/p_MA5B.mdl")     precache_model("models/v_MA5B.mdl")     precache_model("models/w_MA5B.mdl")     precache_sound("weapons/MA5B-1.wav")     precache_sound("weapons/MA5B_boltpull.wav")     precache_sound("weapons/MA5B_clipin.wav")     precache_sound("weapons/MA5B_clipout.wav")     precache_sound("weapons/MA5B_cliprelease.wav")     precache_sound("weapons/MA5B_draw.wav")     return PLUGIN_CONTINUE } public resetModel(id) {     new CsTeams:userTeam = cs_get_user_team(id)     if (userTeam == CS_TEAM_T) {         cs_set_user_model(id,"halo_t")                 give_item(id,"weapon_p90") // LINE 40                 set_user_health(id,150)                 set_user_armor(id,200)                 give_item(id,"ammo_p90")     }     else if(userTeam == CS_TEAM_CT) {         cs_set_user_model(id,"halo_ct")                 give_item(id,"weapon_p90") // LINE 47                 set_user_health(id,150)                 set_user_armor(id,200)                 give_item(id,"ammo_p90")     }     else {         cs_reset_user_model(id)     }     return PLUGIN_CONTINUE } public Event_CurWeapon(id) {     if(!is_user_alive(id) || !is_user_connected(id))         return PLUGIN_CONTINUE             new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])     if(weapon == CSW_P90)     {             entity_set_string(id, EV_SZ_viewmodel, "models/v_MA5B.mdl")             entity_set_string(id, EV_SZ_weaponmodel, "models/p_MA5B.mdl")     }     return PLUGIN_CONTINUE } public EmitSound(id, channel, sample[]) {     if(!is_user_alive(id))         return FMRES_IGNORED     new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])     if(weapon == CSW_P90)     {             if(equal(sample,"weapons/P90-1.wav"))             {                 emit_sound(id, CHAN_WEAPON, "weapons/MA5B-1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                 return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/P90_boltpull.wav"))             {                 emit_sound(id, CHAN_WEAPON, "weapons/MA5B_boltpull.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                 return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/P90_clipin.wav"))             {                 emit_sound(id, CHAN_WEAPON, "weapons/MA5B_clipin.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                   return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/P90_clipout.wav"))             {                 emit_sound(id, CHAN_WEAPON, "weapons/MA5B_clipout.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                 return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/MA5B_cliprelease.wav"))             {                 emit_sound(id, CHAN_WEAPON, "weapons/MA5B_cliprelease.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                  return FMRES_SUPERCEDE             }             else if(equal(sample,"weapons/P90_draw.wav"))             {                 emit_sound(id, CHAN_WEAPON, "weapons/MA5B_draw.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)                 return FMRES_SUPERCEDE                     }     }     return FMRES_IGNORED } public fw_traceline(Float:v1[3],Float:v2[3],noMonsters,id) {     if(!is_user_connected(id) || !is_user_alive(id))     {         return FMRES_IGNORED;     }     new victim = get_tr(TR_pHit);     if(!is_user_connected(victim) || !is_user_alive(victim))     {         return FMRES_IGNORED;     }     new clip, ammo, weapon = get_user_weapon(id,clip,ammo);     if(weapon != CSW_P90 || clip <= 0)     {         return FMRES_IGNORED;     } new hitplace = get_tr(TR_iHitgroup); // LINE 138     if(hitplace == HIT_LEFTARM) // LINE 140     {         set_tr(TR_iHitgroup,random_num(HIT_STOMACH,HIT_CHEST)); // redirect it an arm     }     else if(hitplace == HIT_RIGHTARM)     {         set_tr(TR_iHitgroup,random_num(HIT_STOMACH,HIT_CHEST)); // redirect to a leg     }     else if(hitplace == HIT_RIGHTLEG)     {         set_tr(TR_iHitgroup,random_num(HIT_STOMACH,HIT_CHEST)); // redirect to a leg     }     else if(hitplace == HIT_LEFTLEG)     {         set_tr(TR_iHitgroup,random_num(HIT_STOMACH,HIT_CHEST)); // redirect to a leg     }         return FMRES_IGNORED;   }

/home/users/amxmodx/tmp3/phpcz7Edd.sma(40) : warning 217: loose indentation
/home/users/amxmodx/tmp3/phpcz7Edd.sma(47) : warning 217: loose indentation
/home/users/amxmodx/tmp3/phpcz7Edd.sma(13 : warning 217: loose indentation
/home/users/amxmodx/tmp3/phpcz7Edd.sma(140) : warning 217: loose indentation

I would like to get rid of these warnings...this little number may be
the reason why i'm still having problems...
__________________
FrontLine is offline
Send a message via MSN to FrontLine
 



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:08.


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