Raised This Month: $ Target: $400
 0% 

get_user_money


Post New Thread Reply   
 
Thread Tools Display Modes
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 04-15-2011 , 14:48   Re: get_user_money
Reply With Quote #11

Now i have added, that the team can show each other and the enemys, but only the terrorist should see the aim info on enemys. Can someone help me? IDK how to configure it and i have no idea how to script that.

PHP Code:
#include <amxmodx>
#include <cstrike>

#define PLUGIN "Aim Info Plugin"
#define VERSION "1.0"
#define AUTHOR "@bdul!+Sn!ff3r"

new g_status_sync

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("StatusValue""showStatus""be""1=2""2!0")
    
register_event("StatusValue""hideStatus""be""1=1""2=0")
    
register_dictionary("aim_info.txt");
    
    
g_status_sync CreateHudSyncObj()
}

public 
showStatus(id)
{
    if(!
is_user_bot(id) && is_user_connected(id)) 
    {
        new 
name[32], pid read_data(2)
    
        
get_user_name(pidname31)
        new 
color1 0color2 0
    
        
new team1 get_user_team(id), team2 get_user_team(pid)
    
        if (
team2 == 1)
            
color1 255
        
else
            
color2 255
                
        
if (team1 == team2)    // friend
        
{
            
set_hudmessage(color150color2, -1.00.6010.013.00.010.01, -1)
            
ShowSyncHudMsg(idg_status_sync"%L"LANG_PLAYER"AIM_INFO"nameget_user_health(pid), get_user_armor(pid), get_user_weapon(pid), cs_get_user_money(pid))
        }
           if (
team1 != team2)  // !friend
        
{
            
set_hudmessage(color150color2, -1.00.6010.013.00.010.01, -1)
            
ShowSyncHudMsg(idg_status_sync"%L"LANG_PLAYER"AIM_INFO"nameget_user_health(pid), get_user_armor(pid), get_user_weapon(pid), cs_get_user_money(pid))
        }
    }
}

public 
hideStatus(id)
{
    
ClearSyncHud(idg_status_sync)

STr!ker is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 04-15-2011 , 14:56   Re: get_user_money
Reply With Quote #12

PHP Code:
if (team1 != team2)  // !friend 
->

PHP Code:
if (team1 != team2 && cs_get_user_team(id) == CS_TEAM_T)  // !friend and user is T 
bibu is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-15-2011 , 16:27   Re: get_user_money
Reply With Quote #13

Quote:
Originally Posted by bibu View Post
PHP Code:
if (team1 != team2)  // !friend 
->

PHP Code:
if (team1 != team2 && team1 == 1)  // !friend and user is T 
Fixed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 04-16-2011 , 18:26   Re: get_user_money
Reply With Quote #14

PHP Code:
#include <amxmodx>
#include <cstrike>

#define PLUGIN "Aim Info Plugin"
#define VERSION "1.0"
#define AUTHOR "@bdul!+Sn!ff3r"

new g_status_sync

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("StatusValue""showStatus""be""1=2""2!0")
    
register_event("StatusValue""hideStatus""be""1=1""2=0")
    
register_dictionary("aim_info.txt");
    
    
g_status_sync CreateHudSyncObj()
}

public 
showStatus(id)
{
    if(!
is_user_bot(id) && is_user_connected(id)) 
    {
        new 
name[32], pid read_data(2)
    
        
get_user_name(pidname31)
        new 
color1 0color2 0
    
        
new team1 get_user_team(id), team2 get_user_team(pid)
    
        if (
team2 == 1)
            
color1 255
        
else
            
color2 255
                
        
if (team1 != team2 && team1 == 1)  // !friend and user is T  
        
{
            
set_hudmessage(color150color2, -1.00.6010.013.00.010.01, -1)
            
ShowSyncHudMsg(idg_status_sync"%L"LANG_PLAYER"AIM_INFO"nameget_user_health(pid), get_user_armor(pid), cs_get_user_money(pid))
        }

    }
}

public 
hideStatus(id)
{
    
ClearSyncHud(idg_status_sync)

I have this now, but it donīt show the info in their teams. I only can see from t the ct infos, but that is what i wanted ;)
STr!ker is offline
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 04-30-2011 , 20:15   Re: get_user_money
Reply With Quote #15

PHP Code:
   if(!is_user_bot(id) && is_user_connected(id)) 
    {
        new 
name[32], pid read_data(2)
    
        
get_user_name(pidname31)
        new 
color1 0color2 0
    
        
new team1 get_user_team(id), team2 get_user_team(pid)
    
        if (
team2 == 1)
            
color1 255
        
else
            
color2 255
                
        
if (team1 != team2 && team1 == team1 && team2 == team2)  // !friend and user is T 
but it dont work. It works that team1 can see team2, but no teammate can see each other... How to fix it?
STr!ker is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-30-2011 , 20:50   Re: get_user_money
Reply With Quote #16

Do you want it only to be shown for teammates?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 05-01-2011 , 03:23   Re: get_user_money
Reply With Quote #17

if (team1 == team2)
__________________

SonicSonedit is offline
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 05-01-2011 , 05:41   Re: get_user_money
Reply With Quote #18

I want this:

Terrorists can see Counter-Terrorists! (works already team1 != team2)
Terrorists can see Terrorists (dont work with team1 == 1)
And Counter Terrorists can see Counter- Terrorist (donīt work)

Counter Terrorist donīt see Terrorist
STr!ker is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-01-2011 , 17:00   Re: get_user_money
Reply With Quote #19

Then you want this:

Code:
if(team1 == team2 || team1 == 1)
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 05-02-2011 , 16:13   Re: get_user_money
Reply With Quote #20

and for what is the ||?
STr!ker 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 14:30.


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