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

Adding an plugin module. Can Authors Help?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Darkwob
BANNED
Join Date: Oct 2018
Old 06-05-2021 , 15:31   Adding an plugin module. Can Authors Help?
Reply With Quote #1

Hi Guys, I know maybe I'm opening too many threads. But it's basically because I don't have any knowledge (This doesn't mean I'm not trying to learn, but unfortunately I don't have any knowledge for such an advanced module). Anyway, My Goal is a feature already available in the points system plugin, I want to be able to award points only to players with a certain flag. So basically I want to give players who have two or more flags a starting point so they can use it in the point system plugin.

My goal is to give Different Points to Players with Different Flags.
like this
ADMFLAG_CUSTOM2 : 10 points
ADMFLAG_CUSTOM3 : 20 points( I want to be able to replace these Score Values ​​with a cvar.)

Source codes that give points to all players in the plugin for initial use.
Dont this by making changes inside the Plugin. Doing this without making any changes inside the Plugin. For example: point_by_flag.sp

PHP Code:
public void OnClientAuthorized(int iClientIndex, const char[] sSteamID)
{
    if(
IsClientBot(iClientIndex))
        return;
    else
    {
        if(
PlayerData[iClientIndex].iPlayerPoints GetConVarInt(PluginSettings.hStartPoints))
            
setStartPoints(iClientIndex);
    }

CVAR
Quote:
PluginSettings.hStartPoints = CreateConVar("l4d2_points_start", "10", "Points to start each round/map with.");
PHP Code:
public void OnClientAuthorized(int iClientIndex, const char[] sSteamID)
{
    if(
IsClientBot(iClientIndex))
        return;
    else
    {
        if(
PlayerData[iClientIndex].iPlayerPoints GetConVarInt(PluginSettings.hStartPoints))
            
setStartPoints(iClientIndex);
    }

Attached Files
File Type: sp Get Plugin or Get Source (l4d2_points_system.sp - 68 views - 123.3 KB)

Last edited by Darkwob; 06-05-2021 at 23:06.
Darkwob is offline
Reply


Thread Tools
Display Modes

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:36.


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