Raised This Month: $51 Target: $400
 12% 

[REQ] Player Kill Get Points


Post New Thread Reply   
 
Thread Tools Display Modes
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 05-01-2020 , 02:53   Re: [REQ] Player Kill Get Points
Reply With Quote #11

Not a correct implementation of the Native plugin.
attach the points plugin.
__________________
GitHub
SteamWishlist

六四天安門事件
+ARUKARI- is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-01-2020 , 02:58   Re: [REQ] Player Kill Get Points
Reply With Quote #12

Yea you need the main points plugin with the natives in it, the .inc file won't do.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 05-02-2020 , 02:56   Re: [REQ] Player Kill Get Points
Reply With Quote #13

Solved

Last edited by alferd; 05-02-2020 at 04:41.
alferd is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 05-04-2020 , 04:17   Re: [REQ] Player Kill Get Points
Reply With Quote #14

Quote:
Originally Posted by AceVentura View Post
Hm, this below is part from a plugin i use, edited few things for you.
It saves points on SteamID.

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

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

#define UPDATE_INTERVAL     1.0

new  g_BonusKillg_nVaultg_aClientPoints32 ]

new 
gHudSync;

public 
plugin_init( ) 
{
    
register_pluginPLUGINVERSIONAUTHOR )
    
    
register_event("DeathMsg""eDeath""a")
    
    
g_BonusKill register_cvar"points_per_kill""2" )
    
    
g_nVault nvault_open"Clients_Points" )
    
    
set_taskUPDATE_INTERVAL"UpdatePoints"___"b" );
    
    
gHudSync CreateHudSyncObj( ); 
}

public 
client_putinserverid )
{
    
g_aClientPointsid ] = 0
    LoadPoints
id )
}


public 
eDeath(  ) {
    
    new 
attacker read_data)
    new 
victim read_data)
    
    new 
victim_name32 ];
    
get_user_namevictimvictim_namecharsmaxvictim_name ) )
    
    if( 
cs_get_user_teamattacker ) != cs_get_user_teamvictim ) )
    {
        
g_aClientPointsattacker ] += get_pcvar_numg_BonusKill )
        
client_printattackerprint_chat"+ %d points for killing %s"get_pcvar_numg_BonusKill ), victim_name )
        
SavePointsattacker )
        
UpdatePointsattacker )
    }
    
    return 
PLUGIN_HANDLED;
}


public 
SavePointsid )
{
    new 
szAuthid32 ]
    
get_user_authididszAuthidcharsmaxszAuthid ) )
    
    new 
vaultkey[64],vaultdata[256]
    
formatvaultkeycharsmaxvaultkey ), "%s"szAuthid )
    
formatvaultdata,charsmaxvaultdata),"%i#",g_aClientPointsid ])
    
nvault_setg_nVaultvaultkeyvaultdata )
}

public 
LoadPointsid )
{
    new 
szAuthid32 ]
    
get_user_authididszAuthidcharsmaxszAuthid ) )
    
    new 
vaultkey64 ],vaultdata256 ]
    
formatvaultkeycharsmaxvaultkey ),"%s"szAuthid )
    
formatvaultdatacharsmaxvaultdata),"%i#"g_aClientPointsid ] )
    
nvault_getg_nVaultvaultkeyvaultdata,charsmaxvaultdata ) )
    
    
replace_allvaultdatacharsmaxvaultdata ), "#"" " )
    
    new 
playerpoints32 ]
    
    
parsevaultdataplayerpointscharsmaxplayerpoints ) )
    
    
g_aClientPointsid ] = str_to_numplayerpoints )
}

public 
UpdatePointsid ) {
    
    
    new 
iPlayers32 ], iNumid;
    
get_playersiPlayersiNum );
    
    
    for( new 
iiNumi++ )
    {
        
id iPlayers]
        if (
is_user_aliveid ) )
        {
            
set_hudmessage010400.010.5506.0UPDATE_INTERVAL 0.1 ); 
            
ShowSyncHudMsgidgHudSync"Points: %d "g_aClientPoints[id] ); 
        }
        
    }
    return 
PLUGIN_HANDLED;

Can the following features be added?

Team Kill = +1
Kill = +2
HeadShot = +3

And those who enter the server for the first time will receive +2000 points

Last edited by alferd; 05-04-2020 at 04:39.
alferd is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 05-05-2020 , 02:03   Re: [REQ] Player Kill Get Points
Reply With Quote #15

Is there no other solution?
alferd 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 15:12.


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