Raised This Month: $115 Target: $400
 28% 

[ANY] Contracts


Post New Thread Reply   
 
Thread Tools Display Modes
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 09-29-2016 , 14:16   Re: [ANY?] Contracts
Reply With Quote #21

Fixed some bugs

(shame less double post)
__________________
Want to show support ?
Want to check my plugins ?
Total donation count : 310,98 ChF.- (in 3+ years)
Arkarr is offline
Mask
AlliedModders Donor
Join Date: Oct 2010
Old 09-29-2016 , 14:51   Re: [ANY?] Contracts
Reply With Quote #22

Colors doesn't work for me in cs:go. Or am i missing something?


Last edited by Mask; 09-29-2016 at 14:52.
Mask is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 09-29-2016 , 15:36   Re: [ANY?] Contracts
Reply With Quote #23

Quote:
Originally Posted by Mask View Post
Colors doesn't work for me in cs:go. Or am i missing something?

{fullred} doesn't exist in CS:GO. I'll update and fix that now.

EDIT: Fixed.
__________________
Want to show support ?
Want to check my plugins ?
Total donation count : 310,98 ChF.- (in 3+ years)

Last edited by Arkarr; 09-29-2016 at 15:39.
Arkarr is offline
krikus62
Senior Member
Join Date: Jan 2015
Old 10-03-2016 , 08:06   Re: [ANY?] Contracts
Reply With Quote #24

Does this support MYSQL DB on remote host?
__________________
My plugins:
Spoiler
krikus62 is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 10-03-2016 , 08:38   Re: [ANY?] Contracts
Reply With Quote #25

Quote:
Originally Posted by krikus62 View Post
Does this support MYSQL DB on remote host?
It could, yes. But why ?
__________________
Want to show support ?
Want to check my plugins ?
Total donation count : 310,98 ChF.- (in 3+ years)
Arkarr is offline
krikus62
Senior Member
Join Date: Jan 2015
Old 10-04-2016 , 05:06   Re: [ANY?] Contracts
Reply With Quote #26

I would like to use it to make website contractor top
__________________
My plugins:
Spoiler
krikus62 is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 10-04-2016 , 05:59   Re: [ANY?] Contracts
Reply With Quote #27

Quote:
Originally Posted by krikus62 View Post
I would like to use it to make website contractor top
Done. Check the cvar.
__________________
Want to show support ?
Want to check my plugins ?
Total donation count : 310,98 ChF.- (in 3+ years)
Arkarr is offline
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 10-06-2016 , 16:03   Re: [ANY?] Contracts
Reply With Quote #28

Arkarr, buddy, you don't need multiple versions of the same plugin for different games. Just use EngineVersion! Trust me, it works. It's the same system I'm using in my Chat-Processor Tags plugin (which I removed as I'm recoding it to use MoreColors because ColorVariables has too many nuances and bugs in it right now)

EngineVersion usage snippet inside


CSGO color codes for anyone who needs them


Also, I'd remove the [ANY] tag from the plugin filename. Keep it simple!
__________________
Don't buy plugins from [G]amerX/_GamerX or FREAK (formerly Sourcemod.shop).
Most plugins they sell are either stolen from here outright, or similar ones can be found here for free.



Last edited by 404UNF; 10-06-2016 at 16:04.
404UNF is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 10-06-2016 , 17:52   Re: [ANY?] Contracts
Reply With Quote #29

Quote:
Originally Posted by abrandnewday View Post
Arkarr, buddy, you don't need multiple versions of the same plugin for different games. Just use EngineVersion! Trust me, it works. [...]
Mate, I swear, I tried ! The problem is the includes. I can't figure a way to load all of the required includes (SM store and Zephyrus store) and still don't make the plugin depended of it. (see post #15)
Quote:
Originally Posted by abrandnewday View Post
Also, I'd remove the [ANY] tag from the plugin filename. Keep it simple!
You probably right. I'll update that later.
__________________
Want to show support ?
Want to check my plugins ?
Total donation count : 310,98 ChF.- (in 3+ years)
Arkarr is offline
404UNF
( ͡ ͜ʖ ͡)
Join Date: Dec 2011
Location: 🍁
Old 10-06-2016 , 22:01   Re: [ANY?] Contracts
Reply With Quote #30

Ohhh. Well I see you're already using EngineVersion in both store plugins ("engineName").

Why not further use that to your advantage? For example take this:

PHP Code:
#define PLUGIN_TAG                        "{green}[{red}Contract{green}]{default}"

public Action CMD_ResetContract(int clientint args)
{
    if(
client == 0)
        
PrintToServer("[Contract] Reseting database...");
    else
        
CPrintToChat(client"%s Reseting database..."PLUGIN_TAG);
        
    for (
int z 0MaxClientsz++)
    {
        
IsInContract[z] = false;
        
IsInDatabase[z] = false;
        
        
contractPoints[z] = 0;
        
contractAccomplishedCount[z] = 0;
    }
        
    
SQL_FastQuery(DATABASE_ContractQUERY_CLEAR_CONTRACTS);
    
    if(
client == 0)
        
PrintToServer("[Contract] Done !");
    else
        
CPrintToChat(client"%s Done !"PLUGIN_TAG);

And instead, do this:

PHP Code:
#define PLUGIN_TAG                        "{green}[{red}Contract{green}]{default}"
#define PLUGIN_TAG_CSGO                    "\x04[\x07Contract\x04]\x01"

public Action CMD_ResetContract(int clientint args)
{
    if(
client == 0)
        
PrintToServer("[Contract] Reseting database...");
    else
    {
        if(
engineName == Engine_CSGO)
        {
            
CPrintToChat(client"%s Reseting database..."PLUGIN_TAG_CSGO);
        }
        else
        {
            
CPrintToChat(client"%s Reseting database..."PLUGIN_TAG);
        }
    }
        
    for (
int z 0MaxClientsz++)
    {
        
IsInContract[z] = false;
        
IsInDatabase[z] = false;
        
        
contractPoints[z] = 0;
        
contractAccomplishedCount[z] = 0;
    }
        
    
SQL_FastQuery(DATABASE_ContractQUERY_CLEAR_CONTRACTS);
    
    if(
client == 0)
    {
        
PrintToServer("[Contract] Done !");
    }
    else
    {
        if(
engineName == Engine_CSGO)
        {
            
CPrintToChat(client"%s Done !"PLUGIN_TAG_CSGO);
        }
        else
        {
            
CPrintToChat(client"%s Done !"PLUGIN_TAG);
        }
    }

But I'm guessing that multicolors include handles the engine-specific color format switching for you.
__________________
Don't buy plugins from [G]amerX/_GamerX or FREAK (formerly Sourcemod.shop).
Most plugins they sell are either stolen from here outright, or similar ones can be found here for free.



Last edited by 404UNF; 10-06-2016 at 22:05.
404UNF 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 15:47.


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