Raised This Month: $ Target: $400
 0% 

XP mod with no effect...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheLinx
BANNED
Join Date: Jun 2006
Location: Somewhere i belong (swe)
Old 07-28-2006 , 18:03   XP mod with no effect...
Reply With Quote #1

Hi!
I still got problems with my XP mod...
I have written in some code that is supposed to give special classes:
  • HP & AP
  • Run speed
  • Less gravity
but, it doesnt have any effect in-game!

Here is the code i have written:

Code:
public Event_CurWeapon(id) {    //More run speed    if(PlayerClass[id] == CLASS_RUN) {          new Float:Speed = 320.0+(PlayerLevel[id]*50)          set_user_maxspeed(id, Float:Speed)   }    //Less gravity    if(PlayerClass[id] == CLASS_JUMP) {     new Float:Gravity = 1.0-(PlayerLevel[id]*0.1)     set_user_gravity(id, Float:Gravity)  }    //More HP & AP    if(PlayerClass[id] == CLASS_STAY) {     set_user_health(id, 110+(PlayerLevel[id]*20))  set_user_armor(id, 110+(PlayerLevel[id]*20))  } }

and how to add more and more weapon damage per level?

Help will be very appreciated (Yes, +Karma ;) )

Thx in advance;
TheLinx
TheLinx is offline
Send a message via ICQ to TheLinx Send a message via AIM to TheLinx Send a message via MSN to TheLinx Send a message via Yahoo to TheLinx Send a message via Skype™ to TheLinx
TheLinx
BANNED
Join Date: Jun 2006
Location: Somewhere i belong (swe)
Old 07-28-2006 , 18:04   Re: XP mod with no effect...
Reply With Quote #2

Yes, i have fun module enabled...
TheLinx is offline
Send a message via ICQ to TheLinx Send a message via AIM to TheLinx Send a message via MSN to TheLinx Send a message via Yahoo to TheLinx Send a message via Skype™ to TheLinx
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 07-28-2006 , 19:55   Re: XP mod with no effect...
Reply With Quote #3

You either didn't hook the event CurWeapon using register_event, or you are never assigning their class.

You also should not add the HP / AP thing to CurWeapon (since it'll set their HP / AP every time they switch weapons), instead add it in whatever round start event you hook.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 23:05.


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