Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] Addon: Bank SQL v0.9.2 (Updated 10.01.2012)


Post New Thread Reply   
 
Thread Tools Display Modes
AlpakaCZ
New Member
Join Date: Feb 2011
Old 02-17-2011 , 02:23   Re: [ZP] Bank SteamID,Nick,IP(MySQL,SQLITE) v0.5.2f
Reply With Quote #91

Hi,

I'm using last version of this plugin ( 0.5.2.f ) but if plugin start write this error:
Code:
[AMXX] Displaying debug trace (plugin "zp_bank_sql_new.amxx")
[AMXX] Run time error 10: native error (native "get_pcvar_num")
[AMXX]    [0] zp_bank_sql_new.sma::LoadClient_QueryHandler (line 368)
Can you write me where I have mistake?

Plugin create table in MySQL db correctly.

Running on server:
Code:
 
 Metamod v1.19
 [ 1] AMX Mod X        RUN   -    amxmodx_mm.dll    v1.8.1.3  ini  Start ANY
 [ 3] WinHL-Booster    RUN   -    booster_mm.dll    v1.46     ini  Chlvl Pause
 [ 4] MySQL            RUN   -    mysql_amxx.dll    v1.8.1.3  pl1  ANY   ANY
 [ 5] Fun              RUN   -    fun_amxx.dll      v1.8.1.3  pl1  ANY   ANY
 [ 6] CStrike          RUN   -    cstrike_amxx.dll  v1.8.1.3  pl1  ANY   ANY
 [ 7] CSX              RUN   -    csx_amxx.dll      v1.8.1.3  pl1  ANY   ANY
 [ 8] FakeMeta         RUN   -    fakemeta_amxx.dl  v1.8.1.3  pl1  ANY   ANY
 [ 9] Ham Sandwich     RUN   -    hamsandwich_amxx  v1.8.1.3  pl1  ANY   ANY
 [10] Engine           RUN   -    engine_amxx.dll   v1.8.1.3  pl1  ANY   ANY
Plugin settings:
Code:
zp_bank_sql	"1"
zp_bank_sql_block_name_change "0"
zp_bank_sql_save_limit "2000"
zp_bank_annonce "1"
zp_bank_sql_auto_load_on_connect "0"
zp_bank_sql_save_days "31"
zp_bank_sql_save_type "1"
zp_bank_sql_reconnect_time "30"
zp_bank_sql_host "192.168.10.86"
zp_bank_sql_user "zpbank"
zp_bank_sql_pass "******"
zp_bank_sql_db "zpbank"
// mysql or sqlite
zp_bank_sql_type "mysql"
zp_bank_sql_table "zp_bank_052"
Thanks Alpaka

And sorry for my bad English

Last edited by AlpakaCZ; 02-17-2011 at 02:26.
AlpakaCZ is offline
m7k
New Member
Join Date: Jan 2011
Old 03-21-2011 , 10:29   Re: [ZP] Bank SteamID,Nick,IP(MySQL,SQLITE) v0.5.2f
Reply With Quote #92

Find this string:
Code:
new packs = get_pcvar_num(g_cvar_startedammo);
in zp_bank_sql_new.sma file and replace it with this string
Code:
new packs = VALUE;
where VALUE is the exact value (I mean number) of the cvar zp_starting_ammo_packs from zombieplague.cfg file.
And then recompile this plugin (I hope you know how to do this )

For example, in my case, zp_starting_ammo_packs 5, so replaced string would be like this:
Code:
new packs = 5;

Last edited by m7k; 03-21-2011 at 12:44.
m7k is offline
Balgaa
Senior Member
Join Date: Mar 2010
Old 03-31-2011 , 23:15   Re: [ZP] Bank SteamID,Nick,IP(MySQL,SQLITE) v0.5.2f
Reply With Quote #93

any chance to use nvault?
Balgaa is offline
NullWarez
Member
Join Date: Aug 2010
Location: Internet
Old 04-08-2011 , 11:54   Re: [ZP] Bank SteamID,Nick,IP(MySQL,SQLITE) v0.5.2f
Reply With Quote #94

Balgaa

No, what you want it sucks. MySQL best solution that can be associated with the web site. And then make donations associated with online payments. :-) But really, it's unnecessary. In CS 1.6 not earn much.

--------
SQL_ThreadQuery - asynchronous function. Processing occurs asynchronously.

Add protective logic: g_async_loaded[id]

PHP Code:
public client_disconnect(id) {
    if (!
get_pcvar_num(g_cvar_enable) || g_Sql == Empty_Handle)
        return ;
    
    
GetAuthId(id,g_szAuth[id],31);
    
    if(
g_async_loaded[id] == true)
        
SaveClientBank(id);
    
    
g_BankSqlOpened[id] = false;

if(g_BankSqlOpened[id] == true) - not work correctly.

PHP Code:
public LoadClient_QueryHandler(iFailStateHandle:hQueryszError[], iErrnumszData[], iSizeFloat:fQueueTime) {
    if(
iFailState != TQUERY_SUCCESS) {
        
log_amx("%s SQL Error #%d - %s"PLUGIN_PREFIXiErrnumszError);
        return ;
    }
    
    new 
id szData[0];
    
    if (
szData[1] != get_user_userid(id))
        return ;
    
    new 
packs get_pcvar_num(g_cvar_startedammo);
    if(
SQL_NumResults(hQuery))
        
packs SQL_ReadResult(hQuerySQL_FieldNameToNum(hQuery"amount"));
    
    
g_BankSql[id] = packs;
    
    if(
g_BankSqlOpened[id] == true) {
        if(
get_pcvar_num(g_cvar_auto_load_on_connect)) {
            
zp_set_user_ammo_packs(idg_BankSql[id]);
            
g_async_loaded[id] = true
        
}
    }

PHP Code:
public SaveClientBank(id) {
    if (
g_Sql == Empty_Handle) return ;
    
    new 
packs;
    
    if(
get_pcvar_num(g_cvar_auto_load_on_connect)) packs zp_get_user_ammo_packs(id);
    else 
packs g_BankSql[id];
    
    new 
limit get_pcvar_num(g_cvar_save_limit);
    if(
limit && packs limit) {
        
packs limit;
    }
    
    new 
szQuery[200];
    
format(szQuery199"REPLACE INTO %s (auth,amount,timestamp) VALUES('%s', '%d', '%d');"g_SqlTableg_szAuth[id], packsget_systime());
    
    
SQL_QueryAndIgnore(g_SqlszQuery);
    
g_async_loaded[id] = false

If you're not careful with asynchronous functions, they can cause a loss of credits. As it was in earlier versions of my scripts :-)

RU: А вообще, там подводных камней предостаточно
__________________
Develop ZP 4.3 Tear Devil
NullWarez is offline
scyther55
Junior Member
Join Date: Nov 2010
Location: Turkiye
Old 06-03-2011 , 14:27   Re: [ZP] Bank SteamID,Nick,IP(MySQL,SQLITE) v0.5.2f
Reply With Quote #95

ML_NOTFOUND: DEPOSIT MAX

Who can help me?
__________________
scyther55 is offline
Send a message via MSN to scyther55
Epmak
Member
Join Date: Mar 2010
Location: Russia
Old 06-08-2011 , 02:39   Re: [ZP] Bank SQL v0.6 (Updated 08.06.2011)
Reply With Quote #96

scyther55
Copy language "zp_bank.txt" file to amxmodx/data/lang

Plugin updated.
Epmak is offline
scyther55
Junior Member
Join Date: Nov 2010
Location: Turkiye
Old 06-11-2011 , 06:21   Re: [ZP] Bank SQL v0.6 (Updated 08.06.2011)
Reply With Quote #97

Epmak, how much bank limit? and how i make 99999999?
__________________
scyther55 is offline
Send a message via MSN to scyther55
Balgaa
Senior Member
Join Date: Mar 2010
Old 06-11-2011 , 19:18   Re: [ZP] Bank SQL v0.6 (Updated 08.06.2011)
Reply With Quote #98

epmak, nullwarez suggestion on async correct?

where need to add protective logic?
Balgaa is offline
Balgaa
Senior Member
Join Date: Mar 2010
Old 06-11-2011 , 19:36   Re: [ZP] Bank SQL v0.6 (Updated 08.06.2011)
Reply With Quote #99

any chance password protect bank or register system?
Balgaa is offline
Epmak
Member
Join Date: Mar 2010
Location: Russia
Old 06-13-2011 , 07:12   Re: [ZP] Bank SQL v0.6 (Updated 08.06.2011)
Reply With Quote #100

scyther55 zp_bank_save_limit"100" - max 100 ammo packs to save in db
Balgaa Yes NullWarez rights, update the plugin from the first post

Quote:
Originally Posted by Balgaa View Post
any chance password protect bank or register system?
use Steam or save for the ip-address
Epmak 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 00:24.


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