Raised This Month: $ Target: $400
 0% 

Add HP per level in mod


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheLinx
BANNED
Join Date: Jun 2006
Location: Somewhere i belong (swe)
Old 07-27-2006 , 06:59   Add HP per level in mod
Reply With Quote #1

Hi!

Im working on an XP based mod, and i want to know how to add:
  • HP & AP
  • Run speed
  • Less gravity
  • More damage
Per level...
Can someone plz help me?!
PLZ!
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-27-2006 , 13:00   Re: Add HP per level in mod
Reply With Quote #2

1) This will set the player's HP to 100 + their level * 10, meaning level 2 = 120 HP.

Code:
set_user_health(id,100 + PlayerLevel[id] * 10)

2) This will set a player's speed to 300.0 + their level * 10.0, same as above

Code:
 set_user_maxspeed(id,300.0 + PlayerLevel[id] * 10.0)

3) This will set their gravity to 1.0 (the normal) minus 0.1 * their level (assuming max level is 9)

Code:
 set_user_gravity(id,1.0 - 0.1*PlayerLevel[id])

4) This is harder, you can use fakedamage though. If you have problems with that I'll try and answer it.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
TheLinx
BANNED
Join Date: Jun 2006
Location: Somewhere i belong (swe)
Old 07-27-2006 , 13:11   Re: Add HP per level in mod
Reply With Quote #3

Thanks man! +Karma for you ;)

Just one thing, im a newbie(this is my first mod) so i dont know a **** about fakedamage...

and will i need to have fun module enabled??

and where do i write these codes?
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-27-2006 , 13:41   Re: Add HP per level in mod
Reply With Quote #4

Umm, yes it is....hehe
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 08-01-2006 , 08:05   Re: Add HP per level in mod
Reply With Quote #5

But where do i write these things?
The speed i already have in my code, but the HP&AP, Less gravity and fakedamage, where do i write those things?
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 08-01-2006 , 09:54   Re: Add HP per level in mod
Reply With Quote #6

http://forums.alliedmods.net/showthread.php?t=42408
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
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