Page 1 of 1
DeathRun tasku issaugojimas ant IP
Posted: 2011 Sep 20 14:20
by Pukuotukas951
Gal galite padeti paaiskinti ar padaryti, sioje sistemoje taskai issisaugotu ne ant SteamID o ant IP?
Atsisiuntimo nuoroda shopo .sma :
http://forums.alliedmods.net/attachment ... 1253106683
Re: DeathRun tasku issaugojimas ant IP
Posted: 2011 Sep 20 18:17
by morka
get_user_authid replace get_user_ip
Re: DeathRun tasku issaugojimas ant IP
Posted: 2011 Sep 20 18:51
by Pukuotukas951
Aišku, o ką daryt su SteamID? nes tenais yra toksai žodelis parašytas (gSteamID , SteamID)
Nes norėčiau, kad taškai išsisaugotų tik ant IP:
Code: Select all
new gSteamID[ 32 ]; /* --| Saving player points */stock save_client_points( index ){ /* --| Open the vault file */ gVault = nvault_open( "DeathrunShop_SavedPoints" ); /* --| If vault return -1, lets stop this shit */ if( gVault == INVALID_HANDLE ) { set_fail_state( "[DrShop] nValut ERROR: =-> Invalid-Handle" ); } /* --| Get the player steamid */ get_user_ip( index, gSteamID, charsmax( gSteamID ) ); /* --| Setting stuff on vault file, and close the file */ formatex( vKey, charsmax( vKey ), "%sPOINTS", gSteamID ); formatex( vData, charsmax( vData ), "%d", gKillerPoints[ index ] ); nvault_set( gVault, vKey, vData ); nvault_close( gVault );} /* --| Loading client points */stock load_client_points( index ){ /* --| Open the vault file */ gVault = nvault_open( "DeathrunShop_SavedPoints" ); /* --| If vault return -1, lets stop this shit */ if( gVault == INVALID_HANDLE ) { set_fail_state( "[DrShop] nValut ERROR: =-> Invalid-Handle" ); } /* --| Get the player steamid */ get_user_ip( index, gSteamID, charsmax( gSteamID ) ); /* --| Get the player points, then, close the nvault vile */ formatex( vKey, charsmax( vKey ), "%sPOINTS", gSteamID ); gKillerPoints[ index ] = nvault_get( gVault, vKey ); nvault_close( gVault );}
Re: DeathRun tasku issaugojimas ant IP
Posted: 2011 Sep 20 22:51
by aaarnas
Kintamojo pavadinimas jokio skirtumo nesudaro.
Tik kur get_user_ip, pridėk visur ketvirtą parametrą - 1
get_user_ip( index, gSteamID, charsmax( gSteamID ), 1 );
Re: DeathRun tasku issaugojimas ant IP
Posted: 2011 Sep 25 14:08
by Pukuotukas951
Gerai padariau? O su tais formatex nieko nereik darasyt? Jai gali aarnai pataisyk

.
Code: Select all
new gSteamID[ 32 ]; /* --| Saving player points */stock save_client_points( index ){ /* --| Open the vault file */ gVault = nvault_open( "DeathrunShop_SavedPoints" ); /* --| If vault return -1, lets stop this shit */ if( gVault == INVALID_HANDLE ) { set_fail_state( "[DrShop] nValut ERROR: =-> Invalid-Handle" ); } /* --| Get the player steamid */ get_user_ip( index, gSteamID, charsmax( gSteamID ), 1 ); /* --| Setting stuff on vault file, and close the file */ formatex( vKey, charsmax( vKey ), "%sPOINTS", gSteamID ); formatex( vData, charsmax( vData ), "%d", gKillerPoints[ index ] ); nvault_set( gVault, vKey, vData ); nvault_close( gVault );} /* --| Loading client points */stock load_client_points( index ){ /* --| Open the vault file */ gVault = nvault_open( "DeathrunShop_SavedPoints" ); /* --| If vault return -1, lets stop this shit */ if( gVault == INVALID_HANDLE ) { set_fail_state( "[DrShop] nValut ERROR: =-> Invalid-Handle" ); } /* --| Get the player steamid */ get_user_ip( index, gSteamID, charsmax( gSteamID ), 1 ); /* --| Get the player points, then, close the nvault vile */ formatex( vKey, charsmax( vKey ), "%sPOINTS", gSteamID ); gKillerPoints[ index ] = nvault_get( gVault, vKey ); nvault_close( gVault );}
-- 2011 Rgs 27 16:58 --
Dar viena beda. Kai pakaieciau kad issaugotu taskus ant IP, tai man uzsibugina taskai /drshop meniu.
Stai nuotrauka, ten kur raudonai apvesta matote turetu buti taskai rodomi, o kai pakeiciau kad saugotu ant IP, ten tie taskai uzsibugina ir rodo visada viena skaiciu, tarkim 108. Ir visalaika nesvarbu ar tu turi daugiau tasku ar maziau, ar isvis neturi ir rodo tuos 108. O kai padarau auhid, kad saugotu ant SteamID, tuomet viska rodo normaliai. Kame beda?

Re: DeathRun tasku issaugojimas ant IP
Posted: 2011 Oct 27 18:29
by Kanape
Pas mane tas pac ir nieks nesugeba sito shopo sutvarkyt
