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
DeathRun tasku issaugojimas ant IP
-
- Gana aktyvus vartotojas
- Posts: 445
- Joined: 2011 Aug 27 09:29
-
- Gana aktyvus vartotojas
- Posts: 445
- Joined: 2011 Aug 27 09:29
Re: DeathRun tasku issaugojimas ant IP
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:
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 );}
Last edited by Pukuotukas951 on 2011 Sep 20 18:53, edited 1 time in total.
- aaarnas
- Vyr. diskusijų administratorius
- Posts: 3891
- Joined: 2010 Aug 31 13:21
- Skype: fiarno
- Contact:
Re: DeathRun tasku issaugojimas ant IP
Kintamojo pavadinimas jokio skirtumo nesudaro.
Tik kur get_user_ip, pridėk visur ketvirtą parametrą - 1
get_user_ip( index, gSteamID, charsmax( gSteamID ), 1 );
Tik kur get_user_ip, pridėk visur ketvirtą parametrą - 1
get_user_ip( index, gSteamID, charsmax( gSteamID ), 1 );
Palikau CS pasaulį ;/ . Nebepasiekiamas.
-
- Gana aktyvus vartotojas
- Posts: 445
- Joined: 2011 Aug 27 09:29
Re: DeathRun tasku issaugojimas ant IP
Gerai padariau? O su tais formatex nieko nereik darasyt? Jai gali aarnai pataisyk
.
-- 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?


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 );}
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?
Who is online
Users browsing this forum: No registered users and 1 guest