Raised This Month: $ Target: $400
 0% 

Solved Menu question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 05-07-2018 , 16:56   Menu question
Reply With Quote #1

How can I show the menu only to the opposing team?

PHP Code:
if(SurrenderTr >= 3)
    
g_SurrenderTr true
else if(SurrenderCt >= 3}
    
g_SurrenderCt true 
in the example above, when the team reaches the limit defined by the var, it should open a menu for the opposing team to decide whether to accept the surrender, however I have no idea how to control this menu.

Last edited by iceeedr; 05-07-2018 at 23:29.
iceeedr is offline
Send a message via Skype™ to iceeedr
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 05-07-2018 , 17:44   Re: Menu question
Reply With Quote #2

Code:
stock call_menu(iVariable, iVariable2, iNum, CsTeams:LeEquipe, CsTeams:LeEquipe2){      if ((iVariable >= iNum)          && (cs_get_user_team(id) == LeEquipe)){              load_menu(id);              return 1;         }     else if ((iVariable2 >= iNum)          && (cs_get_user_team(id) == LeEquipe2)){              load_menu(id);              return 1;         } } public clcmd_menu(id)     call_menu(CTVotes, TVotes, 3, CS_TEAM_T, CS_TEAM_CT);
There's better ways but this is the first thing that came in mind.
Relaxing is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 05-07-2018 , 19:11   Re: Menu question
Reply With Quote #3

Quote:
Originally Posted by Relaxing View Post
Code:
stock call_menu(iVariable, iVariable2, iNum, CsTeams:LeEquipe, CsTeams:LeEquipe2){      if ((iVariable >= iNum)          && (cs_get_user_team(id) == LeEquipe)){              load_menu(id);              return 1;         }     else if ((iVariable2 >= iNum)          && (cs_get_user_team(id) == LeEquipe2)){              load_menu(id);              return 1;         } } public clcmd_menu(id)     call_menu(CTVotes, TVotes, 3, CS_TEAM_T, CS_TEAM_CT);
There's better ways but this is the first thing that came in mind.
I did not follow your reasoning, can you exemplify me better?

Last edited by iceeedr; 05-07-2018 at 19:11.
iceeedr is offline
Send a message via Skype™ to iceeedr
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 05-07-2018 , 23:29   Re: Menu question
Reply With Quote #4

Solved, with a more relaxed mind read the amxx tutorial again and I got it.
iceeedr is offline
Send a message via Skype™ to iceeedr
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 04:32.


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