Raised This Month: $ Target: $400
 0% 

register_event and swap players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Auronn
Junior Member
Join Date: Aug 2009
Old 06-09-2010 , 08:08   register_event and swap players
Reply With Quote #1

Hello to all.
i'm need to make plugin for b.rush game.
If u dont know what is it:

Code:
 
b.rush needs 8 players, 5T and 3 CT.
Normally it would be 4on4 and a knife round would be played to decide the teams.
The Ts need to rush bomb site B and CTs need to defend it.
If Ts win the round, the 3 who got kills go CT and the CTs go T(if CT loose the round)- then restartround. if Terrorist-player make 2 frags(kill two CT's) , he goes to CT and he choose else 1 player from T.
If CTs win the round, the teams stay the same and the game continues.
If CTs win 8 or 10 rounds in a row, a new map is chosen.
 
There are a few rules:
NO flashbangs
NO sheilds
NO nade spamming from spawn (only an issue on certain maps, E.g. the 1 i made)
Ts must NOT run mid or any other route to get to B (They must use the shortest route) (E.g. de_inferno - rush banana, de_dust2 - rush tunnels)
 
Server side settings need to be:
mp_friendlyfire 0
mp_startmoney 800
mp_roundtime 1
mp_freezetime 0
sv_gravity 800
so here is my simple code but dont know whats wrong:

PHP Code:
#include <amxmodx>
#include <cstrike>
public plugin_init()
{
 
register_event"SendAudio""e_terrorist_win""a""2&%!MRAD_terwin" );
}
 
//If terrorist win all cts will be transfered to terrorist. And those terrorist whom killed someone will be transfered to ct. 
public e_terrorist_win( ) {
 
transfer()
 
 new 
players32 ], numplayeriFrags;
 
get_playersplayersnum"ea""TERRORIST" );
 
 for( new 
0numi++ ) {
  
player players];
 
  
iFrags get_user_fragsplayer );
 
  if( 
iFrags >= ) {
   
cs_set_user_teamplayerCS_TEAM_CT );
  }
 }
}
public 
transfer() {
 new 
CsTeams:teamplayers32 ], numplayeriFrags;
 
get_playersplayersnum"ea""CT" );
 
 for( new 
0numi++ ) {
  
player players];
  
cs_set_user_teamplayerCS_TEAM_T );
 }

i know, is better will using register_logevent( "Event_RoundEnd", 2, "1=Round_End" );
and check, Terrorist have frag or not from Deathmsg_event but i dont know how.
Please help me with it.
Auronn is offline
Auronn
Junior Member
Join Date: Aug 2009
Old 07-27-2010 , 06:27   Re: register_event and swap players
Reply With Quote #2

can somebody help me please
Auronn is offline
DaxProxy
Senior Member
Join Date: Sep 2007
Old 07-28-2010 , 08:07   Re: register_event and swap players
Reply With Quote #3

Okay, first indent code...
Then paste us the error the compiler gives you...
And then ask for help again, we can't help you if you dont provide us enough information that is vital.
__________________

Want ApolloRP for Counter-Strike? Show your support: http://forums.alliedmods.net/showthr...39#post1264739
DaxProxy is offline
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 05:19.


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