Raised This Month: $ Target: $400
 0% 

Rank message fail :/


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MousePad
Junior Member
Join Date: Apr 2012
Old 04-28-2013 , 19:50   Re: Rank message fail :/
Reply With Quote #1

Can you paste your final code here?
MousePad is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 04-28-2013 , 20:04   Re: Rank message fail :/
Reply With Quote #2

Quote:
Originally Posted by MousePad View Post
Can you paste your final code here?
PHP Code:
#include <amxmodx>
#include <csx>

#define MESSAGE_PREFIX "AMXX"

public plugin_init() {
    
register_plugin("Client Connect Rank""0.0.1""Jhob94")
    
    
register_event("TeamInfo""Join_Team""b")
}
public 
Join_Team(id
{
    new 
iStats[8], Rankname[32]
    
Rank get_user_stats(idiStatsiStats)
    
get_user_name(id,name,31)
    
    if(!
is_user_bot(id))
    {
        if(
Rank <= 15)
            
client_print(0print_chat"[%s] %s joined the server. Be careful his rank is %d !"MESSAGE_PREFIXnameRank)
            
        else
            
client_print(0print_chat"[%s] %s joined the server. His rank is %d ."MESSAGE_PREFIXnameRank)
    }

__________________
Jhob94 is offline
MousePad
Junior Member
Join Date: Apr 2012
Old 04-28-2013 , 20:13   Re: Rank message fail :/
Reply With Quote #3

As far as I know, that join team will be called when the player is connected the first time as a spectator before choosing a team. If you want a dirty fix without checking if the team is T or CT, you can create a bool array of player count, make the index false at client connect and check if the index is false before displaying the message. Then you can display the message and set the index to true.

Actually forget my dirty suggestion. This should have all the info you need:
https://forums.alliedmods.net/showpo...25&postcount=3

Last edited by MousePad; 04-28-2013 at 20:16.
MousePad is offline
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 10:53.


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