Junior Member
Join Date: Apr 2020
Location: egypt
|
12-25-2020
, 13:03
Re: [Help] EaGle's Gold System
|
#31
|
Quote:
Originally Posted by frOOgy
Hello all,
#I'm am editing EaGle's Gold System and I need some help. Soo, player's golds are saved at player's SteamID and it's looks like this:
PHP Code:
new gSteamID
stock save_golds( index )
{
gVault = nvault_open( "GOLDS_SAVE" );
get_user_authid( index, gSteamID, charsmax( gSteamID ) );
formatex( vKey, charsmax( vKey ), "%sGOLDS", gSteamID );
formatex( vData, charsmax( vData ), "%d", gGolds[ index ] );
nvault_set( gVault, vKey, vData );
nvault_close( gVault );
}
stock load_golds( index )
{
gVault = nvault_open( "GOLDS_SAVE" );
get_user_authid( index, gSteamID, charsmax( gSteamID ) );
formatex( vKey, charsmax( vKey ), "%sGOLDS", gSteamID );
gGolds[ index ] = nvault_get( gVault, vKey );
nvault_close( gVault );
}
and I want trying to edit and save on nickname
PHP Code:
new gName
stock save_golds( index )
{
gVault = nvault_open( "GOLDS_SAVE" );
get_user_name( index, gName, charsmax( gName ) );
formatex( vKey, charsmax( vKey ), "%sGOLDS", gName );
formatex( vData, charsmax( vData ), "%d", gName[ index ] );
nvault_set( gVault, vKey, vData );
nvault_close( gVault );
}
stock load_golds( index )
{
gVault = nvault_open( "GOLDS_SAVE" );
get_user_name( index, gName, charsmax( gName ) );
formatex( vKey, charsmax( vKey ), "%sGOLDS", gName );
gGolds[ index ] = nvault_get( gVault, vKey );
nvault_close( gVault );
}
Soo... I can compile it without errors but if I have golds on this nick: BaD CopY and I change nick then I have save number of golds on all nicks... soo it's saved again on steam id :/
#How I have second problem with EaGle's Gold System:
Problem is, in eagle's gold system player can buy admin. I edit it and now player can buy SLOT and VIP... soo I have problem becouse slot flasg is (b) and VIP flags is (bt)... I have problem becouse if player have slot (first) and player get one _pw. afeter some time, player want to buy VIP too and player get second _pw... Can anyone add some lines here and add if player have slot then player buy VIP, then players slot is automaticly removed permanent... :
PHP Code:
set_user_slot(target)
{
new ident[33], pw[8], linne[150]
formatex(pw, 7, "%d%d%d%d%d%d%d", random_num(1, 9), random_num(1, 9), random_num(1, 9), random_num(1, 9), random_num(1, 9), random_num(1, 9), random_num(1, 9))
new File[120]; get_configsdir(File, charsmax(File))
add(File, charsmax(File), "/users.ini")
if(!file_exists(File))
{
set_fail_state("File configs/users.ini Not Found")
}
get_user_name(target, ident, charsmax(ident))
formatex(linne, charsmax(linne), "^n^n^"%s^" ^"%s^" ^"%s^" ^"a^"", ident, pw, SLOT_FLAGS)
client_print(target, print_console, "---------------- | X | ----------------")
client_print(target, print_console, "You have been kiked because you have buy slot!")
client_print(target, print_console, "Your password | setinfo is: %s", pw)
client_print(target, print_console, "You should put in your console: setinfo _pw %s", pw)
client_print(target, print_console, "---------------- | X | ----------------")
server_cmd("kick #%d ^"You buy SLOT successfully [See Console]^"", get_user_userid(target))
write_file(File, linne)
server_cmd("amx_reloadadmins")
}
This is a part of the code ho give player slot.... give player a VIP is same code
I hope you need more codes (MY) and I hope you can help me...
THX in advance...
|
u can give me sma
|
|