Raised This Month: $ Target: $400
 0% 

Cross-Plugin Communication?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Minimum
Senior Member
Join Date: Jun 2006
Old 11-04-2006 , 13:34   Re: Cross-Plugin Communication?
Reply With Quote #7

Well everything else but the actual thing works. Instead of recieving a message it just recieves a blank message. As shown here. Any suggestions?

zombiemod_global.amxx -
Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN "Zombie Mod Includes" #define VERSION "1.0 Final" #define AUTHOR "Minimum" // Hud Variables new hudmsg1[64][128]            // Hud Row 1 Information new hudmsg2[64][128]            // Hud Row 2 Information new hudmsg3[64][128]            // Hud Row 3 Information new hudmsg4[64][128]            // Hud Row 4 Information public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         // Cvars     register_cvar("zombie_statushud","Zombie Mod Console - 0.1.2 Final")         // Tasks     set_task(0.5,"zombiemodconsole",0,"",0,"b")     // Zombie Mod Console } /*      Register Fake Natives */  public plugin_natives() {     register_library("gab_zombie")     register_native("hud_display","hud_redir",1)     server_print("Natives Called") } /*      Client Join Server Code */  public client_putinserver(id) {     format(hudmsg1[id],127,"Welcome to Gabion Studios Undead Zone.")     format(hudmsg2[id],127,"Say /motd for more info on this plugin.")     set_task(1.0,"userdrop",id)     return PLUGIN_HANDLED } /*      Client Disconnect Code (Since client_disconnect doesn't seem to work) */  public userdrop(id) {     if(!is_user_connected(id)) {         format(hudmsg1[id],127," ")         format(hudmsg2[id],127," ")         format(hudmsg3[id],127," ")         format(hudmsg4[id],127," ")         return PLUGIN_HANDLED     }     set_task(1.0,"userdrop",id)     return PLUGIN_HANDLED } /*      Hud Write Code */  public hud_print(id,message[]) {     if(id == 0) {         new x, players[32]         get_players(players,x)         for( new i = 0;  i < x; i++ ) {             new playerindex = players[i]             format(hudmsg4[playerindex],127,"%s",hudmsg3[playerindex])             format(hudmsg3[playerindex],127,"%s",hudmsg2[playerindex])             format(hudmsg2[playerindex],127,"%s",hudmsg1[playerindex])             format(hudmsg1[playerindex],127,"%s",message)         }         return PLUGIN_HANDLED     }     format(hudmsg4[id],127,"%s",hudmsg3[id])     format(hudmsg3[id],127,"%s",hudmsg2[id])     format(hudmsg2[id],127,"%s",hudmsg1[id])     format(hudmsg1[id],127,"%s",message)     return PLUGIN_HANDLED } /*      Hud Native Redirect */  public hud_redir(id,message[]) {     hud_print(id,message)     return PLUGIN_HANDLED } /*      Hud Console Code */  public zombiemodconsole(id) {     new authid[32], num, players[32]     get_players(players,num)     for( new i = 0;  i < num; i++ ) {         get_user_authid( players[i], authid, 31)         if(equali(authid,"BOT") || equali(authid,"UNKNOWN")) return PLUGIN_HANDLED         // Status Console         new sc_outputstat[128], playerindex         get_user_authid( players[i], authid, 31)         get_cvar_string("zombie_statushud",sc_outputstat,127)         set_hudmessage(0, 200, 0, 0.0, 0.65,0,0.0,99.9,0.0,0.0,2)         playerindex = players[i]         show_hudmessage( players[i], " %s ^n --- ^n %s ^n %s ^n %s ^n %s",sc_outputstat,hudmsg1[playerindex],hudmsg2[playerindex],hudmsg3[playerindex],hudmsg4[playerindex])     }     return PLUGIN_HANDLED   }

zombiemod.amxx (One hud_display example) -
Code:
format(hudformat,127,"You have gained a level.")     hud_display(id,hudformat)

gab_zombie.inc -
Code:
/*      Gabion Studios Zombie Mod Include File */  #pragma reqlib gab_zombie native hud_display(id,message[]);
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
 



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 04:57.


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