Raised This Month: $32 Target: $400
 8% 

[help] With plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
popilas
Senior Member
Join Date: Apr 2017
Location: lituanica
Old 01-19-2018 , 10:36   [help] With plugin
Reply With Quote #1

Hello, i have errors when i compile plugin
Attached Thumbnails
Click image for larger version

Name:	ddREWARD.png
Views:	127
Size:	12.2 KB
ID:	168033  

Last edited by popilas; 01-19-2018 at 14:58.
popilas is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 01-19-2018 , 11:59   Re: [help] With plugin
Reply With Quote #2

That's not the full code.
__________________
Relaxing is offline
popilas
Senior Member
Join Date: Apr 2017
Location: lituanica
Old 01-19-2018 , 13:38   Re: [help] With plugin
Reply With Quote #3

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

#define PLUGIN "Reward"
#define VERSION "1.0"
#define AUTHOR "!Tr1ckst3r`"

new yearmonthday//kintamieji kuriuose talpinama data
new iDay[33]; //žaidėjų kintamieji kuriuose talpinama diena po atlygio atsiėmimo

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /reward""reward")

    
date(year,month,day//Gaunama data
}

public 
client_putinserver(id) {
    
iDay[id] = 0//tam kad prisijungus su nauju nicku nebūtų problemų
}

public 
client_disconnected(id) {
    
iDay[id] = 0//tam kad prisijungus su nauju nicku nebūtų problemų
}

public 
reward(id)
{     
    if(!
Loged[id]) {
        
client_print_color(idprint_team_default"^4%s ^1Prisijunkite"Prefix)
    }
    else if(
iDay[id] != day) {
        
//Give reward
        //Points[id] += random_num(1000, 3000)
        //ir kt.
        
iDay[id] = day;
        
SaveDay(id);
    }
    else {
        
//msg jei pasieme jau snd
        
client_print_color(idprint_team_default"^4%s ^1Siandien jau atsiemete savo atlygi"Prefix)
    }
    return 
PLUGIN_HANDLED//kad nerodytu jog chate parasai /reward, jeigu bus viskas tvarkoj gali istrint sita
}

//MySQL naują column sukurt, day INT(2)
stock SaveDay(id)
{
    if(
Loged[id] && gRegistered[id] && gCanSave)
    {
        new 
szQuery[1024];
        
        
formatex(szQuerysizeof(szQuery), "UPDATE `%s` SET `day` = '%d' WHERE `username` = '%s';"TABLE_NAMEiDay[id], get_user_name_ex(id));
        
SQL_ThreadQuery(g_hTuple"QuerySetData"szQuery);
        
        
log_errors("[SAVE DAY] %s"szQuery);
    }

or who can post .amxx

Last edited by popilas; 01-19-2018 at 13:39.
popilas is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-19-2018 , 14:03   Re: [help] With plugin
Reply With Quote #4

That's a totally different code.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Airkish
AlliedModders Donor
Join Date: Apr 2016
Location: Lithuania
Old 01-19-2018 , 14:13   Re: [help] With plugin
Reply With Quote #5

No one can help you cause this plugin must be implemented to another one (csgo.sma).

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

#define PLUGIN "Reward"
#define VERSION "1.0"
#define AUTHOR "!Tr1ckst3r`"

new yearmonthday//kintamieji kuriuose talpinama data
new iDay[33]; //žaidėjų kintamieji kuriuose talpinama diena po atlygio atsiėmimo

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /reward""reward")

    
date(year,month,day//Gaunama data
}

public 
client_putinserver(id) {
    
iDay[id] = 0//tam kad prisijungus su nauju nicku nebūtų problemų
}

public 
client_disconnected(id) {
    
iDay[id] = 0//tam kad prisijungus su nauju nicku nebūtų problemų
}

public 
reward(id)
{     
    if(!
Loged[id]) {
        
client_print_color(idprint_team_default"^4%s ^1Prisijunkite"Prefix)
    }
    else if(
iDay[id] != day) {
        
//Give reward
        //Points[id] += random_num(1000, 3000)
        //ir kt.
        
iDay[id] = day;
        
SaveDay(id);
    }
    else {
        
//msg jei pasieme jau snd
        
client_print_color(idprint_team_default"^4%s ^1Siandien jau atsiemete savo atlygi"Prefix)
    }
    return 
PLUGIN_HANDLED//kad nerodytu jog chate parasai /reward, jeigu bus viskas tvarkoj gali istrint sita
}

//MySQL naują column sukurt, day INT(2)
stock SaveDay(id)
{
    if(
Loged[id] && gRegistered[id] && gCanSave)
    {
        new 
szQuery[1024];
        
        
formatex(szQuerysizeof(szQuery), "UPDATE `%s` SET `day` = '%d' WHERE `username` = '%s';"TABLE_NAMEiDay[id], get_user_name_ex(id));
        
SQL_ThreadQuery(g_hTuple"QuerySetData"szQuery);
        
        
log_errors("[SAVE DAY] %s"szQuery);
    }

To clarify: THIS PLUGIN CANNOT BE COMPILED.
__________________
Airkish is offline
popilas
Senior Member
Join Date: Apr 2017
Location: lituanica
Old 02-08-2018 , 12:09   Re: [help] With plugin
Reply With Quote #6

how implemented to the main plugin?
popilas is offline
Airkish
AlliedModders Donor
Join Date: Apr 2016
Location: Lithuania
Old 02-08-2018 , 13:58   Re: [help] With plugin
Reply With Quote #7

Quote:
Originally Posted by popilas View Post
how implemented to the main plugin?
pats laikas pačiam pasimokint, aš atsakau tu net nebandei, nes realiai čia nėra ko veikt. Tinginys.
__________________
Airkish 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 08:40.


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