Raised This Month: $ Target: $400
 0% 

A couple of questions....


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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