Raised This Month: $ Target: $400
 0% 

grab client info


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
illusionalp
Member
Join Date: Aug 2012
Old 09-11-2012 , 02:53   grab client info
Reply With Quote #1

i was wondering how can i grab the client info like his name his health etc.. and execute a command if info equal something like if his health was 1 it execute a command that add 99 hp thoughts?
illusionalp is offline
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 09-11-2012 , 04:43   Re: grab client info
Reply With Quote #2

get_user_info
__________________
simanovich is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 09-11-2012 , 04:56   Re: grab client info
Reply With Quote #3

get_user_name get_user_health
jimaway is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 09-11-2012 , 14:18   Re: grab client info
Reply With Quote #4

PHP Code:
grab_client_info 
__________________
retired
shavit is offline
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 09-11-2012 , 16:07   Re: grab client info
Reply With Quote #5

Cool native.
guipatinador is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-11-2012 , 16:34   Re: grab client info
Reply With Quote #6

I wonder if that's a troll or he really meant that...
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 09-11-2012 at 16:35.
Alka is offline
illusionalp
Member
Join Date: Aug 2012
Old 09-12-2012 , 03:26   Re: grab client info
Reply With Quote #7

Quote:
Originally Posted by Alka View Post
I wonder if that's a troll or he really meant that...
what ?
and can someone make a small script to do the function that i mentioned in my previous post it will help more than 'get_user_name get_user_health' thanks in advanced!
illusionalp is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 09-12-2012 , 03:50   Re: grab client info
Reply With Quote #8

get_user_name

get_user_health


You are in Scripting Help, go read the basics in the Wiki or search around
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
floatman
Senior Member
Join Date: Oct 2009
Location: nowhere.
Old 09-12-2012 , 17:13   Re: grab client info
Reply With Quote #9

It'd be something like this:
PHP Code:
#include < amxmodx >
#include < fun >

#define VALUE 1

public plugin_init()
    
register_clcmd"say /yay""cmdyay" );

public 
cmdyayi_Index )
{
    if( 
get_user_healthi_Index ) == VALUE )
    {
        static 
szName32 ];
        
get_user_namei_IndexszNamecharsmaxszName ) );

        
set_user_healthi_Index, (get_user_healthi_Index ) + 99) );
        
client_print0print_chat"%s 'yayed'!"szName );
    }

Anyway, as Yami said: you must read the basics in the WIKI/somewhere else if you want any help in this section. Otherwise, post here: http://forums.alliedmods.net/forumdisplay.php?f=12.
__________________


Last edited by floatman; 09-12-2012 at 17:15.
floatman 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 08:15.


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