Raised This Month: $ Target: $400
 0% 

Solved [REQ]Can someone edit this plugin?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sajmooooon
Senior Member
Join Date: Nov 2018
Location: Slovakia
Old 06-08-2019 , 11:59   [REQ]Can someone edit this plugin?
Reply With Quote #1

Hi, can someone edit this, please.

Here is that plugin: https://forums.alliedmods.net/showthread.php?t=265268

Last edited by Sajmooooon; 06-08-2019 at 17:22.
Sajmooooon is offline
Nexd
BANNED
Join Date: Dec 2013
Location: Hungary
Old 06-08-2019 , 14:26   Re: [REQ]Can someone edit this plugin?
Reply With Quote #2

PHP Code:
#include <sourcemod>
#include <store>

#define PLUGIN_NEV    "Store top25 player"
#define PLUGIN_LERIAS    "https://forums.alliedmods.net/showthread.php?t=316749"
#define PLUGIN_AUTHOR    "Nexd"
#define PLUGIN_VERSION    "1.0"
#pragma tabsize 0

Database g_DB;
ConVar g_adatbazis;

public 
Plugin myinfo 
{
    
name PLUGIN_NEV,
    
author PLUGIN_AUTHOR,
    
description PLUGIN_LERIAS,
    
version PLUGIN_VERSION
};

public 
void OnPluginStart()
{
    
g_adatbazis CreateConVar("sm_store_db""store""Database for the plugin");

    
RegConsoleCmd("sm_storetop"Command_StoreTop);
}

public 
void OnConfigsExecuted() {
    
char error[255];
    
char database[32];
    
GetConVarString(g_adatbazisdatabasesizeof(database));
    
g_DB SQL_Connect(databasetrueerrorsizeof(error));
}

public 
Action Command_StoreTop(int clientint args)
{
    
GetStoreTopPlayers(client);
}

public 
Action GetStoreTopPlayers(int client) {
    
char Query[1024];
    
Format(Querysizeof(Query), "SELECT name, credits FROM store_players ORDER BY credits DESC limit 25;");
        
    
SQL_TQuery(g_DBCreateTopListQueryclient);
    return 
Plugin_Handled;
}

public 
void CreateTopList(Handle ownerHandle hndl, const char[] errorany data) {
    
int client data;
    
char name[128];
    
int credits;
    
Menu topcredits CreateMenu(Nullmenuhandler);
    
SetMenuTitle(topcredits"Top 25 credits");
    while (
SQL_FetchRow(hndl)) {
        
SQL_FetchString(hndl0namesizeof(name));
        
credits SQL_FetchInt(hndl1);
        
Format(namesizeof(name), "%s - %i"namecredits);
        
AddMenuItem(topcredits""nameITEMDRAW_DISABLED);
    }

    
DisplayMenu(topcreditsclient60);
}

public 
int Nullmenuhandler(Handle menuMenuAction actionint clientint item)
{

Nexd is offline
Sajmooooon
Senior Member
Join Date: Nov 2018
Location: Slovakia
Old 06-08-2019 , 17:20   Re: [REQ]Can someone edit this plugin?
Reply With Quote #3

Quote:
Originally Posted by Nexd View Post
PHP Code:
#include <sourcemod>
#include <store>

#define PLUGIN_NEV    "Store top25 player"
#define PLUGIN_LERIAS    "https://forums.alliedmods.net/showthread.php?t=316749"
#define PLUGIN_AUTHOR    "Nexd"
#define PLUGIN_VERSION    "1.0"
#pragma tabsize 0

Database g_DB;
ConVar g_adatbazis;

public 
Plugin myinfo 
{
    
name PLUGIN_NEV,
    
author PLUGIN_AUTHOR,
    
description PLUGIN_LERIAS,
    
version PLUGIN_VERSION
};

public 
void OnPluginStart()
{
    
g_adatbazis CreateConVar("sm_store_db""store""Database for the plugin");

    
RegConsoleCmd("sm_storetop"Command_StoreTop);
}

public 
void OnConfigsExecuted() {
    
char error[255];
    
char database[32];
    
GetConVarString(g_adatbazisdatabasesizeof(database));
    
g_DB SQL_Connect(databasetrueerrorsizeof(error));
}

public 
Action Command_StoreTop(int clientint args)
{
    
GetStoreTopPlayers(client);
}

public 
Action GetStoreTopPlayers(int client) {
    
char Query[1024];
    
Format(Querysizeof(Query), "SELECT name, credits FROM store_players ORDER BY credits DESC limit 25;");
        
    
SQL_TQuery(g_DBCreateTopListQueryclient);
    return 
Plugin_Handled;
}

public 
void CreateTopList(Handle ownerHandle hndl, const char[] errorany data) {
    
int client data;
    
char name[128];
    
int credits;
    
Menu topcredits CreateMenu(Nullmenuhandler);
    
SetMenuTitle(topcredits"Top 25 credits");
    while (
SQL_FetchRow(hndl)) {
        
SQL_FetchString(hndl0namesizeof(name));
        
credits SQL_FetchInt(hndl1);
        
Format(namesizeof(name), "%s - %i"namecredits);
        
AddMenuItem(topcredits""nameITEMDRAW_DISABLED);
    }

    
DisplayMenu(topcreditsclient60);
}

public 
int Nullmenuhandler(Handle menuMenuAction actionint clientint item)
{

Thanks
Sajmooooon 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 06:29.


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