Raised This Month: $ Target: $400
 0% 

2 Models in One Hero


Post New Thread Reply   
 
Thread Tools Display Modes
Xel0z
Senior Member
Join Date: Apr 2006
Location: Netherlands
Old 04-29-2006 , 10:08  
Reply With Quote #11

Doesnt it has to be:
Code:
register_event("CurWeapon","changeWeapon", "be", "1=1")
Cuz u have:
Code:
register_event("CurWeapon","changeWeapon", "be". "1=1")
Its only a small thing, but might be wrong.

EDIT* And if I put this:
Code:
public switchmodel(id)
{
	if ( !is_user_alive(id) || !gHasgundamPower[id] ) return
	new clip, ammo, wpnid = get_user_weapon(id,clip,ammo)
	if (wpnid == CSW_M4A1)
		Entvars_Set_String(id, EV_SZ_viewmodel, "models/shmod/gundam_m4a1.mdl")
	} 
}
And if I compile it, it says: unmatching closing brace, and it aborts. I looked and it has to be up here, but I cant find any wrong things, so plz someone help me?
And is it possible to play a sound when shooting with a pecific weapon? And when u switch to that weapon?
__________________
Heroes: TESS-One Working on: Grit (Fixing bugs)

Last edited by Xel0z; 06-16-2008 at 07:15.
Xel0z is offline
Send a message via MSN to Xel0z
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 04-29-2006 , 21:13  
Reply With Quote #12

Code:
   if (wpnid == CSW_M4A1) {         // Weapon Model change thanks to [CCC]Taz-Devil         Entvars_Set_String(id, EV_SZ_viewmodel, "models/shmod/gundam_m4a1.mdl")      }

You were missing an opening brace at the beginning.

Quote:
Doesnt it has to be:
Code:
register_event("CurWeapon","changeWeapon", "be", "1=1")

Cuz u have:
Code:
register_event("CurWeapon","changeWeapon", "be". "1=1")

Its only a small thing, but might be wrong
My bad, the ',' button and the '.' button are next to each other, I sometimes get those mixed up. Yes use the one with the comma.
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag 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 14:19.


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