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

[INSURGENCY] Supply Modification Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
K4PP4
New Member
Join Date: Nov 2015
Old 11-25-2015 , 17:57   [INSURGENCY] Supply Modification Plugin
Reply With Quote #1

Is it possible to create a plugin which modified the way players use and acquired supply points.

I am trying to get my head around the idea of hardcore based supply system I wish to use on my servers which forces supply points to become a currency system.

So when players load up their kit, the supply points in which they have used are no longer available and they cannot swap out their kit to re-pick a weapon. If they were to die or their team lost the round, the supply they used would be lost and they would be left with the remaining.

For example, Starting Supply = 15, Supply Used = 7, Supply Remaining = 8

Also, there are already commands for allowing players to acquire supply points for winning rounds. However, is it possible to award players with supply points for say getting kills and completing objectives.

I just want to know if this can be done through a sm plugin as I have attempted to get it done through a theater.
K4PP4 is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 01-14-2021 , 08:45   Re: [INSURGENCY] Supply Modification Plugin
Reply With Quote #2

PHP Code:
#pragma semicolon 1
#pragma newdecls required

int
    m_nAvailableTokens
,
    
m_nRecievedTokens;

public 
void OnPluginStart()
{
    
m_nAvailableTokens FindSendPropInfo("CINSPlayer""m_nAvailableTokens");
    
m_nRecievedTokens FindSendPropInfo("CINSPlayer""m_nRecievedTokens");
}
...
stock void SomeFunction(int client)
{
    ...
    
int available GetEntData(clientm_nAvailableTokens), total GetEntData(clientm_nRecievedTokens);
    ...

__________________
Grey83 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 01:00.


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