Raised This Month: $ Target: $400
 0% 

First Blood


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 02-04-2007 , 07:40   First Blood
Reply With Quote #1

Hi This a plugin from AMX And i want to make it for AMXX I change #include <amxmodx> but give me an error =>>
Code:
 
L 02/04/2007 - 13:47:56: [AMXX] Displaying debug trace (plugin "firstblood.amxx")
L 02/04/2007 - 13:47:56: [AMXX] Run time error 10: native error (native "pause")
L 02/04/2007 - 13:47:56: [AMXX]    [0] php4HxP1M.sma::plugin_init (line 95)
This is the plugin =>>


PHP Code:
/* AMX Mod script. 

* AMX Firstblood Plugin 

* (c) Copyright 2002-2003, sonic '[email protected]'
* This file is provided as is (no warranties). 

*/ 
/*  Put in server.cfg: 

*   amx_fb_mode < flags > 
*   "a" - show firstblood msg in hud 
*   "b" - show firstblood msg in chat 
*   "c" - play firstblood sound 
*   "d" - show attacker @ fistblood msg 
*   "e" - set firstblood msg to damage_event (default death_event)

*   Set amx_fb_mode "" to disable fistblood plugin 
*   Default amx_fb_mode is "ac" 
*/ 
#include <amxmodx> 
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) {
         
unpause("b","damage_msg"
      }
      else
         
unpause("b","death_msg"
   }
   return 
PLUGIN_CONTINUE 

public 
death_msg() { 
   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)
   
pause("b","death_msg")
   return 
PLUGIN_CONTINUE 

public 
damage_msg() {
   new 
vIndex read_data(0)
   new 
aIndex get_user_attacker(vIndex)
   
   if ( !
aIndex || aIndex==vIndex || get_user_team(aIndex)==get_user_team(vIndex)) 
      return 
PLUGIN_CONTINUE 
   fb_event
(aIndex,vIndex)
   
pause("b","damage_msg")
   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,06.05.01.02.02
      
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_event("Damage""damage_msg","b","2!0","4!0")
   
register_cvar("amx_fb_mode","ace"
   
pause("b","death_msg"
   
pause("b","damage_msg")
   return 
PLUGIN_CONTINUE 

Thanks in advanced
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
 


Thread Tools
Display Modes

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