Raised This Month: $ Target: $400
 0% 

get_user_money


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 03-19-2011 , 21:10   get_user_money
Reply With Quote #1

Hey Folks i have found a plugin an coded it for me. But i am a very noob in it.

PHP Code:
/*****************************************************\
===============================
|| [ZP] Aim Info Plugin v1.0 ||
===============================

||DESCRIPTION||
    When you aim at your friend, a hud message
    appears which shows you the Name, HP, 
    Armor and Ammo Packs of your friend.

||CREDITS||
    - AMX MOD X Team ----> For most of the natives
    - MeRcyLeZZ ----> For ZP 4.3
    - Sn!ff3r ----> For the Actual Aim info Plugin

\*****************************************************/
#include <amxmodx>

#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("zp_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))
        }
    }
}

public 
hideStatus(id)
{
    
ClearSyncHud(idg_status_sync)

This is the Plugin, and i want that it shows this:

Name: name
HP: 100
Geld: money

I have tried it with get_user_money, but it donīt work. And the Hud is horizontally. How to make it perpendicular?

Original Plugin:
https://forums.alliedmods.net/showthread.php?t=119421

Then i have another question. Hot to set, that the hud is only shown your own team? Only Terrorist should be look for ctīs hud. But the Ctīs should have a look for the Tīs.

Omg awful English. I hope you understand it, because i donīt know hot to better explain it

Last edited by STr!ker; 03-19-2011 at 21:13.
STr!ker is offline
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 04-14-2011 , 12:38   Re: get_user_money
Reply With Quote #2

bumb
STr!ker is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-14-2011 , 12:41   Re: get_user_money
Reply With Quote #3

- new line : ^n
- cs_get_user_money()
__________________
Arkshine is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 04-14-2011 , 12:43   Re: get_user_money
Reply With Quote #4

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

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

Last edited by bibu; 04-14-2011 at 14:55.
bibu is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-14-2011 , 12:54   Re: get_user_money
Reply With Quote #5

=! -> !=
__________________
Arkshine is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 04-14-2011 , 14:55   Re: get_user_money
Reply With Quote #6

:/
bibu is offline
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 04-14-2011 , 15:29   Re: get_user_money
Reply With Quote #7

I have this:

PHP Code:
#include <amxmodx>

#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))
        }
    }
}

public 
hideStatus(id)
{
    
ClearSyncHud(idg_status_sync)

But i canīt compile it. The compiler shows me that:

STr!ker is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 04-14-2011 , 15:46   Re: get_user_money
Reply With Quote #8

Quote:
Originally Posted by STr!ker View Post
I have this:

...

But i canīt compile it. The compiler shows me that:

Code:
#include <cstrike>
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 04-14-2011 , 15:53   Re: get_user_money
Reply With Quote #9

if (team1 =! team2)

->

if (team1 != team2)
bibu is offline
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 04-14-2011 , 16:14   Re: get_user_money
Reply With Quote #10

Ok nice, now my problem is, that the Ctīs can see the terroristīs info, but only the terrorist should see the ctīs info.

And the weapons are shown as numbers.
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 09:57.


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