Raised This Month: $ Target: $400
 0% 

What's wrong with this?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 10-20-2005 , 21:42   What's wrong with this?
Reply With Quote #1

I can't seem to find the problem.. People have been saying they've been getting "bad loads" with it:
Code:
#include <amxmodx> #define PLUGIN  "Connect Announce" #define VERSION "0.2b" #define AUTHOR  "v3x" new g_iMsgSayText, g_szSoundFile[] = "buttons/blip1.wav"; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR);     register_cvar("announce_mode","3");     register_cvar("announce_sound","1");     g_iMsgSayText = get_user_msgid("SayText"); } /* announce_mode <0|1|2|3> 0 - Off 1 - Connect announce only 2 - Disconnect announce only 3 - Both announce_sound <0|1> 0 - No sound 1 - Sound */ public plugin_precache() {     precache_sound(g_szSoundFile); } public client_authorized(id) {     new iMode = get_cvar_num("announce_mode");         if(is_user_bot(id) || iMode == 0 || iMode == 2)         return PLUGIN_CONTINUE;     new szUserName[33];     get_user_name(id, szUserName, 32);     new iPlayers[32], iNum, i;     get_players(iPlayers, iNum);     for(i = 0; i <= iNum; i++)     {         new x = iPlayers[i];         if(!is_user_connected(x) || is_user_bot(x)) continue;         if(get_cvar_num("announce_sound") == 1)             client_cmd(x, "spk %s", g_szSoundFile);         new szMessage[164];         format(szMessage, 163, "^x04%s connected", szUserName);         message_begin( MSG_ONE, g_iMsgSayText, {0,0,0}, x );         write_byte  ( x );         write_string( szMessage );         message_end ();     }     return PLUGIN_CONTINUE; } public client_disconnect(id) {     new iMode = get_cvar_num("announce_mode");         if(is_user_bot(id) || iMode == 0 || iMode == 1)         return PLUGIN_CONTINUE;     new szUserName[33];     get_user_name(id, szUserName, 32);     new iPlayers[32], iNum, i;     get_players(iPlayers, iNum);     for(i = 0; i <= iNum; i++)     {         new x = iPlayers[i];         if(!is_user_connected(x) || is_user_bot(x)) continue;         if(get_cvar_num("connect_sound") == 1)             client_cmd(x, "spk %s", g_szSoundFile);         new szMessage[164];         format(szMessage, 163, "^x04%s disconnected", szUserName);         message_begin( MSG_ONE, g_iMsgSayText, {0,0,0}, x );         write_byte  ( x );         write_string( szMessage );         message_end ();     }     return PLUGIN_CONTINUE; }
v0.1 is in the Approved Plugins section if you need to see it.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 10-20-2005 , 23:05  
Reply With Quote #2

well I think it occurs here:
Code:
message_begin( MSG_ONE, g_iMsgSayText, {0,0,0}, x ); write_byte  ( x ); write_string( szMessage ); message_end ();
write_byte(x) isn't meant for player ID. Destination can be 1=notify, 2=console, 3=chat, or 4=center...
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 10-22-2005 , 02:18  
Reply With Quote #3

Ok, but it still gives a bad load..
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 10-22-2005 , 03:06  
Reply With Quote #4

SayTex - byte, string, string, string
1: Destination,
2: Predefined String
3: Unknown,
4: Text said

Destination can be 1=notify, 2=console, 3=chat, or 4=center
Some values of the predifined string: #Cstrike_Chat_AllDead, #Cstrike_Chat_All
Freecode is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 10-22-2005 , 03:26  
Reply With Quote #5

Ok, so what exactly should I put? As of now I have this:
Code:
new szMessage[164]; format(szMessage, 163, "^x04%s connected", szUserName); message_begin( MSG_ONE, g_iMsgSayText, {0,0,0}, x ); write_byte  ( 3 ); write_string( szMessage ); message_end ();
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 10-22-2005 , 08:14   Re: What's wrong with this?
Reply With Quote #6

Quote:
Originally Posted by v3x
I can't seem to find the problem.. People have been saying they've been getting "bad loads" with it:
Have any of them placed "debug" after the plugin name and then given you the additional information it provides?
Brad is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 10-23-2005 , 00:05  
Reply With Quote #7

I don't believe so.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 10-23-2005 , 22:27  
Reply With Quote #8

Anyone? o.O
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 10-23-2005 , 22:52  
Reply With Quote #9

comment out the message see if it still gives you bad load.
Freecode is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-23-2005 , 22:55  
Reply With Quote #10

Why are you using the saytext message and not simply client_print?
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 23:52.


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