Raised This Month: $ Target: $400
 0% 

get_user_name ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
iloverain
Junior Member
Join Date: Jun 2012
Old 06-23-2012 , 15:47   Re: get_user_name ?
Reply With Quote #7

@above Perfect! Thanks so much! I appreciate your help all!

I changed the bool to
Code:
new bool:isSimon=false
which worked perfectly.
I used the user name method Waleed suggested which worked perfectly.
I also googled how to get user team and i found the cstrike one too so yeah using that one.

Here's the working code:
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "jm0d"
#define VERSION "1.0"
#define AUTHOR "iloverain"

new bool:isSimon=false 

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_clcmd ( "say /simon", "SetSimon" )
}

public SetSimon(id) {
    (cs_get_user_team(id) == CS_TEAM_CT)
    
    new name[32];
    get_user_name( id, name, charsmax ( name ) )
    
    if ( isSimon == true ) {
        client_print( id, print_chat, "Someone is already Simon!" )
    } else {
        client_print( id, print_chat, "%s is Simon!", name )
        isSimon = true
    }    
}
Thanks all!

LOL edit;

last question. how would one reset a boolean to false after round end? o.0 I dont want to create a new thread for each question. Lmfao sorry.
__________________
Just A n00b Learning. ^-^

Last edited by iloverain; 06-23-2012 at 15:57.
iloverain 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 06:15.


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