DeathRun tasku issaugojimas ant IP

Forumas skirtas spręsti problemas iškilusias su CS 1.6 serveriais.
Post Reply
Pukuotukas951
Gana aktyvus vartotojas
Posts: 445
Joined: 2011 Aug 27 09:29

DeathRun tasku issaugojimas ant IP

Post 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

morka
Gana aktyvus vartotojas
Posts: 292
Joined: 2011 Jan 08 00:21

Re: DeathRun tasku issaugojimas ant IP

Post by morka »

get_user_authid replace get_user_ip
Image

Pukuotukas951
Gana aktyvus vartotojas
Posts: 445
Joined: 2011 Aug 27 09:29

Re: DeathRun tasku issaugojimas ant IP

Post 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 );}
Last edited by Pukuotukas951 on 2011 Sep 20 18:53, edited 1 time in total.

User avatar
aaarnas
Vyr. diskusijų administratorius
Posts: 3891
Joined: 2010 Aug 31 13:21
Skype: fiarno
Contact:

Re: DeathRun tasku issaugojimas ant IP

Post 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 );
Palikau CS pasaulį ;/ . Nebepasiekiamas.

Pukuotukas951
Gana aktyvus vartotojas
Posts: 445
Joined: 2011 Aug 27 09:29

Re: DeathRun tasku issaugojimas ant IP

Post 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?

Image

Kanape
Jau po truputį tampa savu
Posts: 193
Joined: 2010 Oct 23 14:26
Skype: noway_lyderis
Location: Jonava
Contact:

Re: DeathRun tasku issaugojimas ant IP

Post by Kanape »

Pas mane tas pac ir nieks nesugeba sito shopo sutvarkyt :(
Image

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests