Raised This Month: $ Target: $400
 0% 

First Blood


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 02-05-2007 , 02:35   Re: First Blood
Reply With Quote #1

Code:
#include <amxmodx> #include <csx> new bool:g_death, bool:g_damage public new_round() {     if ((get_cvar_num("mp_roundtime") * 60) == read_data(1)) {         new fbmode[8]         get_cvar_string("amx_fb_mode",fbmode,7)         new fbmode_bit = read_flags(fbmode)         if (fbmode_bit & 16) {             g_death = true         }         else             g_damage = true     } } public death_msg() {     if ( !g_death )         return PLUGIN_CONTINUE     new aIndex = read_data(1)     new vIndex = read_data(2)     if ( !aIndex || aIndex==vIndex || get_user_team(aIndex)==get_user_team(vIndex))         return PLUGIN_CONTINUE     fb_event(aIndex,vIndex)     g_death_msg = false     return PLUGIN_CONTINUE } public client_damage(attacker, victim, damage, wpnindex, hitplace, TA) {     if ( !g_damage )         return PLUGIN_CONTINUE         if ( !attacker || attacker==victim || TA )         return PLUGIN_CONTINUE     fb_event(attacker,victim)     g_damage_msg = false     return PLUGIN_CONTINUE } public fb_event(aIndex,vIndex) {     new msg[128], fbmode[8]     get_cvar_string("amx_fb_mode",fbmode,7)     new fbmode_bit = read_flags(fbmode)         if (fbmode_bit & 8) {         new aName[32]         get_user_name(aIndex,aName,31)         format(msg,127,"%s: First Blood!",aName)     }     else         format(msg,127,"First Blood!")         if (fbmode_bit & 1) {         set_hudmessage(220,80,100,-1.0,0.30,0, 6.0, 5.0, 1.0, 2.0, 2)         show_hudmessage(0,msg)     }     if (fbmode_bit & 2)   client_print(0,print_chat,"[AMXX] %s",msg)     if (fbmode_bit & 4)   client_cmd(0,"spk misc/firstblood2_ultimate")     return PLUGIN_CONTINUE } public plugin_init() {     register_plugin("FirstBlood","0.9.3","Sonic ([email protected])")     register_event("RoundTime", "new_round", "bc")     register_event("DeathMsg","death_msg","a")     register_cvar("amx_fb_mode","ac") }

Last edited by [ --<-@ ] Black Rose; 02-05-2007 at 07:15.
[ --<-@ ] Black Rose is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 02-05-2007 , 05:26   Re: First Blood
Reply With Quote #2

Nope Doesn't work! Thanks a lot for help,anyway
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 02-05-2007 , 06:18   Re: First Blood
Reply With Quote #3

is it for cs?
[ --<-@ ] Black Rose is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 02-05-2007 , 06:47   Re: First Blood
Reply With Quote #4

yep...but i don't know why is doesn't work?? When i put the original plugin for amx it say =>>
Code:
02/05/2007 - 13:06:11: This usage of the native pause() has been deprecated!
If u don't know how to fix this...can make one?? Thanks again!
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 02-05-2007 at 07:07.
Alka is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 02-05-2007 , 07:14   Re: First Blood
Reply With Quote #5

You can't pause a function any longer.
Does the new plugin print anything?

EDIT: Really stupid error, forgot public in front of client_damage
[ --<-@ ] Black Rose is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 02-05-2007 , 07:36   Re: First Blood
Reply With Quote #6

wich version should i use now?? lol
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 02-05-2007 , 07:56   Re: First Blood
Reply With Quote #7

This one.
Code:
#include <amxmodx> #include <csx> new bool:g_death, bool:g_damage public new_round() {     new fbmode[8]     get_cvar_string("amx_fb_mode",fbmode,7)     new fbmode_bit = read_flags(fbmode)     if (fbmode_bit & 16)         g_death = true     else         g_damage = true } public death_msg() {     if ( !g_death )         return PLUGIN_CONTINUE     new aIndex = read_data(1)     new vIndex = read_data(2)     if ( !aIndex || aIndex==vIndex || get_user_team(aIndex)==get_user_team(vIndex))         return PLUGIN_CONTINUE     fb_event(aIndex,vIndex)     g_death = false     return PLUGIN_CONTINUE } public client_damage(attacker, victim, damage, wpnindex, hitplace, TA) {     if ( !g_damage )         return PLUGIN_CONTINUE         if ( !attacker || attacker==victim || TA )         return PLUGIN_CONTINUE     fb_event(attacker,victim)     g_damage = false     return PLUGIN_CONTINUE } public fb_event(aIndex,vIndex) {     new msg[128], fbmode[8]     get_cvar_string("amx_fb_mode",fbmode,7)     new fbmode_bit = read_flags(fbmode)         if (fbmode_bit & 8) {         new aName[32]         get_user_name(aIndex,aName,31)         format(msg,127,"%s: First Blood!",aName)     }     else         format(msg,127,"First Blood!")         if (fbmode_bit & 1) {         set_hudmessage(220,80,100,-1.0,0.30,0, 6.0, 5.0, 1.0, 2.0, 2)         show_hudmessage(0,msg)     }     if (fbmode_bit & 2)   client_print(0,print_chat,"[AMXX] %s",msg)     if (fbmode_bit & 4)   client_cmd(0,"spk misc/firstblood2_ultimate")     return PLUGIN_CONTINUE } public plugin_init() {     register_plugin("FirstBlood","0.9.3","Sonic ([email protected])")     register_event("HLTV", "new_round", "a", "1=0", "2=0")     register_event("DeathMsg","death_msg","a")     register_cvar("amx_fb_mode","ac") }

Last edited by [ --<-@ ] Black Rose; 02-05-2007 at 08:59.
[ --<-@ ] Black Rose is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 02-05-2007 , 08:14   Re: First Blood
Reply With Quote #8

not worknig!
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 02-05-2007 , 08:24   Re: First Blood
Reply With Quote #9

Try that one then.
[ --<-@ ] Black Rose is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 02-05-2007 , 08:29   Re: First Blood
Reply With Quote #10

this=> new bool:g_death, bool:g_damage should be =>> new bool:g_death_msg, bool:g_damage_msg ?//?
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 02-05-2007 at 08:45.
Alka 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 00:42.


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