This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[BUG] plmenu.sma


  
 
 
Thread Tools Display Modes
Author Message
lantz69
AMX Mod X Beta Tester
Join Date: Mar 2004
Location: Sweden, Skåne
Old 09-07-2005 , 14:15   [BUG] plmenu.sma
#1

In the function
Code:
public actionTeamMenu(id,key)
Maybe you must add some code for cstrike servers.
The reason is that if you transfer an alive CT player to T
he will change to a T model and still run arround and kill Terror until the round has ended
It is like a mole or chameleon in UWC3

The code you could add is

Code:
#if defined CSTRIKE             if(is_user_alive(player)) {       client_print(id,print_chat,"You cant transfer alive players")       displayTeamMenu(id,g_menuPosition[id])       return PLUGIN_HANDLED       } #endif

Or maybe kill the player, but that would maybe not be popular
Code:
#if defined CSTRIKE             if(is_user_alive(player)) {       user_kill(player,1)       } #endif
Now the beginning of the function will look like this

Code:
public actionTeamMenu(id,key) {   switch (key) {     case 7:{       g_menuOption[id] = 1 - g_menuOption[id]       displayTeamMenu(id,g_menuPosition[id])     }     case 8: displayTeamMenu(id,++g_menuPosition[id])     case 9: displayTeamMenu(id,--g_menuPosition[id])     default: {       new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]       new authid[32],authid2[32], name[32], name2[32]       get_user_name(player,name2,31)       get_user_authid(id,authid,31) #if defined CSTRIKE             if(is_user_alive(player)) {       client_print(id,print_chat,"You cant transfer alive players")       displayTeamMenu(id,g_menuPosition[id])       return PLUGIN_HANDLED       } #endif       get_user_authid(player,authid2,31)       get_user_name(id,name,31)


And also the bug you fixxed with the TEam menu not updating
I feel that it should be the other way arround
The menu don't show the players current team, but the team that he can be transfered to.
In CVS Revision 1.25
The code you added in 2 places .. (the second place has a little diffrent code)
Code:
#if defined CSTRIKE            if (cs_get_user_team(i) == CS_TEAM_T)            {                    copy(team, 3, "CT") // <------- There            } else if (cs_get_user_team(i) == CS_TEAM_CT) {                    copy(team, 3, "TE")  // <------- There            } else {            get_user_team(i,team,3)            }    #else     get_user_team(i,team,3) #endif
Change to this
Code:
#if defined CSTRIKE            if (cs_get_user_team(i) == CS_TEAM_T)            {                    copy(team, 3, "TE")            } else if (cs_get_user_team(i) == CS_TEAM_CT) {                    copy(team, 3, "CT")            } else {            get_user_team(i,team,3)            }    #else     get_user_team(i,team,3) #endif

I have tested this and it seems to work perfect now.
Hope you think this is alright.

..
__________________
Using: Amxmodx 1.8.1.xxxx, cstrike
http://www.vanilla.se/
lantz69 is offline
BAILOPAN
Join Date: Jan 2004
Old 09-07-2005 , 14:38  
#2

Not being able to transfer alive players is an unnecessary restriction. The fix will probably be setting a new skin on the player.

I'll merge your other change in, as I think you've pointed out the correct usage.
__________________
egg
BAILOPAN is offline
lantz69
AMX Mod X Beta Tester
Join Date: Mar 2004
Location: Sweden, Skåne
Old 09-07-2005 , 18:40  
#3

About transfering alive players with the menu.

Well if the transfer of alive players is done right before roundend it would be ok.
If you transfer players in the middle of the round several strange situations can occour in cstrike.
1) Transfer T to CT when he has the bomb
2) Transfer a CT to T and he will be able to easily kill the other team.
And the list goes on.

So If you can delay the transfer of the player just before roundend I will be alright. Thats my opinion anyway.
__________________
Using: Amxmodx 1.8.1.xxxx, cstrike
http://www.vanilla.se/
lantz69 is offline
BAILOPAN
Join Date: Jan 2004
Old 09-11-2005 , 03:17  
#4

This has been fixed in CVS. Thanks!
__________________
egg
BAILOPAN is offline
 



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 11:58.


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