Raised This Month: $ Target: $400
 0% 

Round end


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JRISETH
Junior Member
Join Date: Jun 2011
Old 06-20-2012 , 06:15   Round end
Reply With Quote #1

Hello,

I'm currently doing a plugin for my public server. The idea of the plugin is that when a terrorist team wins, then all the CTs would die and vice-versa. The problem is, that when I'm alone in the server testing the plugin, it works great. When 2 or more people are in the server, then when CT defuses a bomb, all terrorists die but I've also got a message, that says 'All Terrorists have been killed' and when CT defuses a bomb, that message appears twice for some reason. When Terrorists plant a bomb and it exploads, then all players die and messages appear three or four times for some reason.

Here's my code:

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <colorchat> #include <cstrike> #include <csx> #define PLUGIN "JRISETH / Kill looser team members" #define VERSION "1.0" #define AUTHOR "JRISETH" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")     register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")   } public t_win() {         ColorChat(0, GREEN, "TERRORISTIDE^1 tiim vƵitis, kƵik ellujƤƤnud ^4COUNTER-TERRORISTID^1 tapeti.");         new         pPlayers[32],         pNum;             get_players(pPlayers, pNum, "ae", "CT");         for(new i; i < pNum; i++)         user_silentkill(pPlayers[i]);         return PLUGIN_HANDLED } public ct_win() {         ColorChat(0, GREEN, "COUNTER-TERRORISTIDE^1 tiim vƵitis, kƵik ellujƤƤnud ^4TERRORISTID^1 tapeti.");         new         pPlayers[32],         pNum;             get_players(pPlayers, pNum, "ae", "TERRORIST");         for(new i; i < pNum; i++)         user_silentkill(pPlayers[i]);         return PLUGIN_HANDLED }
JRISETH is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 06-20-2012 , 06:49   Re: Round end
Reply With Quote #2

You don't have to return anything at t_win and ct_win.. And further i can't see any problems at your code. Try disabling all other plugins, a plugin might be doubling your message or bugging your silentkill.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
JRISETH
Junior Member
Join Date: Jun 2011
Old 06-20-2012 , 07:00   Re: Round end
Reply With Quote #3

Quote:
Originally Posted by Napoleon_be View Post
You don't have to return anything at t_win and ct_win.. And further i can't see any problems at your code. Try disabling all other plugins, a plugin might be doubling your message or bugging your silentkill.
I've disabled all my plugins and infact, it got worse. Also I've deleted the return statements and nothing has changed.
JRISETH is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 06-20-2012 , 07:06   Re: Round end
Reply With Quote #4

Also, i think you have some invalid characters in your print message. Could be the reason why it is printing twice, i'm not sure. Also, if you want to print to only 1 team, get the players of a certain team and print it to them.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
JRISETH
Junior Member
Join Date: Jun 2011
Old 06-20-2012 , 07:12   Re: Round end
Reply With Quote #5

Quote:
Originally Posted by Napoleon_be View Post
Also, i think you have some invalid characters in your print message. Could be the reason why it is printing twice, i'm not sure. Also, if you want to print to only 1 team, get the players of a certain team and print it to them.
I've now removed the part from my code, where there is a loop between all the players and now the messages appear perfectly fine.
JRISETH is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 06-20-2012 , 07:15   Re: Round end
Reply With Quote #6

Give me your current code.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
JRISETH
Junior Member
Join Date: Jun 2011
Old 06-20-2012 , 07:21   Re: Round end
Reply With Quote #7

Quote:
Originally Posted by Napoleon_be View Post
Give me your current code.
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <colorchat> #include <cstrike> #include <csx> #define PLUGIN "JRISETH / Kill looser team members" #define VERSION "1.0" #define AUTHOR "JRISETH" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")     register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")   } public t_win() {         ColorChat(0, GREEN, "TERRORISTIDE^1 tiim vƵitis, kƵik ellujƤƤnud ^4COUNTER-TERRORISTID^1 tapeti.");         /*new         pPlayers[32],         pNum;             get_players(pPlayers, pNum, "ae", "CT");         for(new i; i < pNum; i++)         user_silentkill(pPlayers[i]);*/     } public ct_win() {         ColorChat(0, GREEN, "COUNTER-TERRORISTIDE^1 tiim vƵitis, kƵik ellujƤƤnud ^4TERRORISTID^1 tapeti.");         /*new         pPlayers[32],         pNum;             get_players(pPlayers, pNum, "ae", "TERRORIST");         for(new i; i < pNum; i++)         user_silentkill(pPlayers[i]);*/     }
JRISETH is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 06-20-2012 , 07:32   Re: Round end
Reply With Quote #8

I'd rather use bomb_explode and bomb_defused using csx include.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-20-2012 , 09:43   Re: Round end
Reply With Quote #9

Your code is fine.

Quote:
Originally Posted by Napoleon_be View Post
I'd rather use bomb_explode and bomb_defused using csx include.
Bomb isn't the only game mode in CS.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 06-20-2012 , 09:48   Re: Round end
Reply With Quote #10

But the only one which can keep the loosing team players alive tho? Except for the round end then.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Reply


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 06:14.


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