AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   grab client info (https://forums.alliedmods.net/showthread.php?t=195746)

illusionalp 09-11-2012 02:53

grab client info
 
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?

simanovich 09-11-2012 04:43

Re: grab client info
 
get_user_info

jimaway 09-11-2012 04:56

Re: grab client info
 
get_user_name get_user_health

shavit 09-11-2012 14:18

Re: grab client info
 
PHP Code:

grab_client_info 


guipatinador 09-11-2012 16:07

Re: grab client info
 
Cool native.

Alka 09-11-2012 16:34

Re: grab client info
 
I wonder if that's a troll or he really meant that...

illusionalp 09-12-2012 03:26

Re: grab client info
 
Quote:

Originally Posted by Alka (Post 1796921)
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!

YamiKaitou 09-12-2012 03:50

Re: grab client info
 
get_user_name

get_user_health


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

floatman 09-12-2012 17:13

Re: grab client info
 
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.


All times are GMT -4. The time now is 08:15.

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