Raised This Month: $ Target: $400
 0% 

Can someone fix my Plugin?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ahmadgbg
Junior Member
Join Date: Mar 2005
Old 10-21-2006 , 11:45   Re: Can someone fix my Plugin?
Reply With Quote #4

#include <amxmodx>
#include <engine>
#include <cstrike>

new PLUGIN[]="WW2"
new AUTHOR[]="Enblad"
new VERSION[]="1.0"


public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

//Checks
register_event("ResetHUD", "newSpawn","b")
register_event("CurWeapon", "weaponChange","be","1=1")
}

//----------------------------------------------------------------------------------------------
public plugin_precache()
{
precache_model("models/v_shotgunns")
precache_model("models/p_shotgunns")
precache_model("models/player/soldier/Soldier.mdl")
}
//----------------------------------------------------------------------------------------------
public init()
{
giveGun(id)
switchmodel(id)
}
//----------------------------------------------------------------------------------------------
public giveGun(id)
{
if ( is_user_alive(id) ) {
give_item(id, "weapon_m4a1")
}
}

//----------------------------------------------------------------------------------------------
public switchmodel(id)
{
new clip, ammo, wpnid = get_user_weapon(id,clip,ammo)
if (wpnid == CSW_XM1014) {
Entvars_Set_String(id, EV_SZ_viewmodel, "models/v_shotgunns")
Entvars_Set_String(id, EV_SZ_weaponmodel, "models/p_shotgunns")
}
}

//----------------------------------------------------------------------------------------------
public weaponChange(id)
{

new wpnid = read_data(2)
new clip = read_data(3)

if ( wpnid != CSW_XM1014 ) return

switchmodel(id)

if ( clip == 0 ) {
ReloadAmmo(id)
}
}

//----------------------------------------------------------------------------------------------
public changePlayer(id){
cs_set_user_model(id, "models/Soldier.mdl")
}

//----------------------------------------------------------------------------------------------

i changed soldierx how should i do in newspawn and reloadammo?
ahmadgbg is offline
 



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 04:55.


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