Raised This Month: $ Target: $400
 0% 

My First Attempt to make a menu! part2


Post New Thread Reply   
 
Thread Tools Display Modes
RollerBlades
Senior Member
Join Date: Feb 2011
Location: Sweden
Old 06-12-2011 , 02:47   Re: My First Attempt to make a menu! part2
Reply With Quote #31

i bumped beacuse i posted in this thread then in another one so no one would notice this thread so i bumped... but it was like 1 poistion under i dont think i will get banned for that
RollerBlades is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 06-12-2011 , 10:19   Re: My First Attempt to make a menu! part2
Reply With Quote #32

Are you sure that client_putinserver is not too soon to be displaying the message? You should show the message once the player connected has joined a team.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
RollerBlades
Senior Member
Join Date: Feb 2011
Location: Sweden
Old 06-12-2011 , 11:19   Re: My First Attempt to make a menu! part2
Reply With Quote #33

what if he choose to be a spectator? i dunno that stuff
RollerBlades is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 06-12-2011 , 11:44   Re: My First Attempt to make a menu! part2
Reply With Quote #34

If he choose to be spectator then he still changes team. When a player connects he is automatically assigned to CS_TEAM_UNASSIGNET, then when a team is chosen it is changed to either CS_TEAM_T, CS_TEAM_CT or CS_TEAM_SPECTATOR.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
RollerBlades
Senior Member
Join Date: Feb 2011
Location: Sweden
Old 06-12-2011 , 14:09   Re: My First Attempt to make a menu! part2
Reply With Quote #35

something like this or what do you mean?

PHP Code:
public client_putinserver(id)
{    
    new 
CsTeams:iTeam cs_get_user_team(id);
    
    if ( 
iTeam != CS_TEAM_UNASSIGNED 
    {
        new 
name[32];
        
get_user_name(idnamesizeof(name));
        
set_hudmessage(227968, -0.00.000.00.00.00.00);
        
show_hudmessage(id"[AMXX] Hello %s! Type /Buy <Weapon Menu>"name); 
    }

RollerBlades is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 06-12-2011 , 14:20   Re: My First Attempt to make a menu! part2
Reply With Quote #36

You can catch when a player changes team. Then display the message once, make a global variable which is set to true if the message has been displayed, and then don't show the message if that is true.

A thread which can help you how to catch when a player changes team:
https://forums.alliedmods.net/showth...register_event

EDIT:
This thread might help you even more:
https://forums.alliedmods.net/showth...register_event
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
RollerBlades
Senior Member
Join Date: Feb 2011
Location: Sweden
Old 06-12-2011 , 14:51   Re: My First Attempt to make a menu! part2
Reply With Quote #37

its the same thread lmao

Edit:
PHP Code:
new gTrailgBowTrailgCatchTeam;

public 
client_putinserver(id)
{        
    if ( 
bool:gCatchTeam == true) return;
    
    if ( 
Something _:cs_get_user_team(id) ) 
    {        
        new 
name[32];
        
get_user_name(idnamesizeof(name));
        
set_hudmessage(227968, -0.00.000.00.00.00.00);
        
show_hudmessage(id"[AMXX] Hello %s! Type /Buy <Weapon Menu>"name); 
        
gCatchTeam true;
    }

WTF am i doing??

isnt there a better way? cant i do like i did before?

Last edited by RollerBlades; 06-12-2011 at 15:33.
RollerBlades is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 06-12-2011 , 16:04   Re: My First Attempt to make a menu! part2
Reply With Quote #38

https://forums.alliedmods.net/showth...register_event

You could also have done the search yourself, you know.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
RollerBlades
Senior Member
Join Date: Feb 2011
Location: Sweden
Old 06-12-2011 , 16:13   Re: My First Attempt to make a menu! part2
Reply With Quote #39

tried to but failed as always

i dont get the update_team shit... explain to me abit

Last edited by RollerBlades; 06-12-2011 at 16:25.
RollerBlades is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 06-12-2011 , 16:20   Re: My First Attempt to make a menu! part2
Reply With Quote #40

Show the code.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
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 12:27.


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