Raised This Month: $ Target: $400
 0% 

A couple of questions....


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-27-2005 , 01:36   A couple of questions....
Reply With Quote #1

Ok i am in the very early proccess of creating a new mod called coin mod...i only have what you would call the "framework".

This mod is based on the coin mode on super smash brothers melee..
everytime you die or get hit coins will appear and who ever collects them will reicve an attack increase next round!

but i have some questions

1) On the damage msg....how do you get the amount of damage that was given?

2) at the bottom part of the code...i want to make it where for every 25 coins your attack increases( plz not i dont need help with the attack part...just the for the loop! )

CODE :

Code:
    #include <amxmodx> #include <engine> new coins new damage new damage_given new damage_taken new attacker new increase_attack new coin //model new collect_sound // collect sound new coin_ent new coin_origin // ent origin new player_origin new weapon // just to acheive the third argument in get_user_attacker new hitzone public plugin_init() {     register_plugin( "Coin Mod", "1.0", "Zenith77" )     register_cvar( "coinmod_debug", "1" )     register_event("Damage", "damage", "b" )     register_event( "DeathMsg", "death", "b" )     register_event( "ResetHUD", "spawm", "b" )     } public plugin_preacache() {     coins = precache_model("coin_mod/models/coin.mdl")     collect_sound = precache_sound( "coin_mod/sound/collect.wav" ) } public client_connect(id) {     coins[id] = 0     if( get_cvar_num( "coinmod_debug" ) == 1 ) {         server_print( "[COIN MOD] New player connected! Coins and increase attack set to 0!" )     } } public client_disconnect(id) {     coins[id] = 0     if( get_cvar_num( "coinmod_debug" ) == 1 ) {         server_print( "[COIN MOD] Player disconnected! Coins and increase attack set to 0!" )     } } public Damage(id) {     get_user_attacker( index, weapon, hitzone )         if( coins > 0 ) {         // this will have to wait for now....     }         if( coins <= 0 ) {         if( get_cvar_num( "coinmod_debug" ) == 1 ) {             server_print( "[COIN MOD] Player, %s, has no money! EFFECT: No coin entity spawned, and no increase to player attack added!", id )                         return PLUGIN_HANDLED         }     }         else {             return PLUGIN_HANDLED         }     } public death(id) {         get_user_attacker( id, weapon, hitzone )         if( hitzone == 3 ) {         // this will have to wait!     }     else {         //this will have to wait to :/     } } public spawm(id) {     if( get_cvar_num( "coinmod_debug" == 1 ) {         server_print( "[COIN MOD] %s Spawned! Now calculating how much attack should be increased!", id )     }     for( coins[id]>( coins[id] * 0.25) ) {         // wait again         coins[id] --         // increase_attack will have to wait :/     }         if( get_cvar_num( "coinmod_debug" == 1 ) {         server_print( " [COIN MOD] Done with all players calculations! Attack increased accroding to each players coins!" )     } }



thnx

--Zenith
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 08-27-2005 , 01:50  
Reply With Quote #2

1)
Code:
new damage = read_data(2);
And for 2, I'm not sure what you're trying to say.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-27-2005 , 01:54  
Reply With Quote #3

Ok lets say john has 50 coins...

and for every 25 coins his attack increases by 5.


like a said..disregard the attack part..i just need help witht the 25 coin part...
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 08-27-2005 , 02:04  
Reply With Quote #4

Code:
new dmgmult = floatround(coins / 25,floatround_floor);

dmgmult is how many times their damage should be increased.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-27-2005 , 02:08  
Reply With Quote #5

yay..thank you..

ok this is gay who the crap keeps lowering my karma for no good reason...
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 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:27.


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