Raised This Month: $ Target: $400
 0% 

Is this O.K. ? (Something like a Domination System)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
nicolazo103
Veteran Member
Join Date: Jan 2009
Location: I have no fu*** idea
Old 05-24-2010 , 22:04   Is this O.K. ? (Something like a Domination System)
Reply With Quote #1

Well, i havenīt made a plugin for a long time, so i donīt remember almost anything. I would want to know if this code will work and what could i improve?

Code:
#include <amxmodx> #include <hamsandwich> new Author [] = "Larz" new Plugin [] = "Domination System" new Domination new Kill[33][33] public plugin_init() {     register_plugin(Plugin, "0.1b", Author)         Domination = register_cvar("amx_allow_domination_system", "1")         RegisterHam(Ham_Killed, "player", "fw_HamKilled") } public fw_HamKilled(victim, attacker, shouldgib) {     if(!get_pcvar_num(Domination))         return PLUGIN_HANDLED         Kill[attacker][victim]++         new attackername[32], victimname[32]         get_user_name(attacker, attackername, 31)     get_user_name(victim, victimname, 31)         set_hudmessage(200, 100, 0, -50.0, -80.0, 1, 5.0, 12.0, 0.2, 0.3, 4)     show_hudmessage(victim, "You were killed by %s (%i)", attackername, Kill[attacker][victim])         if(Kill[attacker][victim] == 3)     {         set_hudmessage(200, 100, 0, -50.0, -80.0, 1, 5.0, 12.0, 0.2, 0.3, 4)         show_hudmessage(0, "%s is dominating %s (%i kill%w)", attackername, victimname, Kill[attacker][victim], Kill[attacker][victim]==1?"":"s")     }     if(Kill[attacker][victim] > 3)     {         set_hudmessage(200, 100, 0, -50.0, -80.0, 1, 5.0, 12.0, 0.2, 0.3, 4)         show_hudmessage(victim, "You have been killed again by %s (%i)", attackername, Kill[attacker][victim])     }     if(Kill[victim][attacker] == 3)     {         set_hudmessage(200, 100, 0, -50.0, -80.0, 1, 5.0, 12.0, 0.2, 0.3, 4)         show_hudmessage(0, "%s got revenge on %s after %i kill%w)", attackername, victimname, Kill[attacker][victim], Kill[attacker][victim]==1?"":"s")     }             Kill[victim][attacker] = 0         return HAM_IGNORED }
__________________
Why do they send babies to fight me? -Heavy

nicolazo103 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 05:22.


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