Raised This Month: $ Target: $400
 0% 

[Help] EaGle's Gold System


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
frOOgy
Senior Member
Join Date: Jul 2014
Old 12-10-2014 , 13:09   [Help] EaGle's Gold System
Reply With Quote #1

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_authidindexgSteamIDcharsmaxgSteamID ) );
    
    
formatexvKeycharsmaxvKey ), "%sGOLDS"gSteamID );
    
formatexvDatacharsmaxvData ), "%d"gGoldsindex ] );
    
nvault_setgVaultvKeyvData );
    
nvault_closegVault );
}

stock load_goldsindex )
{
    
gVault nvault_open"GOLDS_SAVE" );
    
    
get_user_authidindexgSteamIDcharsmaxgSteamID ) );

    
formatexvKeycharsmaxvKey ), "%sGOLDS"gSteamID );
    
gGoldsindex ] = nvault_getgVaultvKey );
    
nvault_closegVault );

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_nameindexgNamecharsmaxgName ) );
    
    
formatexvKeycharsmaxvKey ), "%sGOLDS"gName );
    
formatexvDatacharsmaxvData ), "%d"gNameindex ] );
    
nvault_setgVaultvKeyvData );
    
nvault_closegVault );
}

stock load_goldsindex )
{
    
gVault nvault_open"GOLDS_SAVE" );
    
    
get_user_nameindexgNamecharsmaxgName ) );

    
formatexvKeycharsmaxvKey ), "%sGOLDS"gName );
    
gGoldsindex ] = nvault_getgVaultvKey );
    
nvault_closegVault );

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(pw7"%d%d%d%d%d%d%d"random_num(19), random_num(19), random_num(19), random_num(19), random_num(19), random_num(19), random_num(19))
    
    new 
File[120]; get_configsdir(Filecharsmax(File))
    
add(Filecharsmax(File), "/users.ini")
    
    if(!
file_exists(File))
    {
        
set_fail_state("File configs/users.ini Not Found")
    }
    
    
get_user_name(targetidentcharsmax(ident))
    
formatex(linnecharsmax(linne), "^n^n^"%s^" ^"%s^" ^"%s^" ^"a^""identpwSLOT_FLAGS)
    
client_print(targetprint_console"---------------- | X | ----------------")
    
client_print(targetprint_console"You have been kiked because you have buy slot!")
    
client_print(targetprint_console"Your password | setinfo is: %s"pw)
    
client_print(targetprint_console"You should put in your console: setinfo _pw %s"pw)
    
client_print(targetprint_console"---------------- | X | ----------------")
    
server_cmd("kick #%d ^"You buy SLOT successfully [See Console]^""get_user_userid(target))
    
write_file(Filelinne)
    
    
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...
frOOgy is offline
Send a message via Skype™ to frOOgy
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 12-10-2014 , 13:35   Re: [Help] EaGle's Gold System
Reply With Quote #2

First

formatex( vKey, charsmax( vKey ), "%sGOLDS", gSteamID );
=>
formatex( vKey, charsmax( vKey ), "%s", gSteamID );

because its a correct value you don't need to add things ...

secondly i don't know why you need to change it (Steam id to name ) if your server is steam right ? ( is it steam or no steam ? ) if you want to change to name your way is corret !


Edit :
WTH IS THAT ????
Code:
new gSteam,gName


Last edited by Freezo Begin; 12-10-2014 at 13:46.
Freezo Begin is offline
Old 12-10-2014, 13:41
Eagle07
This message has been deleted by Eagle07.
frOOgy
Senior Member
Join Date: Jul 2014
Old 12-10-2014 , 13:46   Re: [Help] EaGle's Gold System
Reply With Quote #3

THX But when I change "%sGOLDS" to "%s", golds are removed after first reconnecting
frOOgy is offline
Send a message via Skype™ to frOOgy
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 12-10-2014 , 13:49   Re: [Help] EaGle's Gold System
Reply With Quote #4

Quote:
Originally Posted by frOOgy View Post
THX But when I change "%sGOLDS" to "%s", golds are removed after first reconnecting
Yes because its a new value .
you don't mean you was expecting to see the same gold point !

Replace the new gName
by new gName[32] ....
Freezo Begin is offline
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 12-10-2014 , 13:50   Re: [Help] EaGle's Gold System
Reply With Quote #5

try
PHP Code:
new gSteamID 

stock save_golds
index 

    
gVault nvault_open"GOLDS_SAVE" ); 
     
    
get_user_authidindexgSteamIDcharsmaxgSteamID ) ); 
     
    
formatexvKeycharsmaxvKey ), "%sGOLDS"gSteamID ); 
    
formatexvDatacharsmaxvData ), "%d"gGoldsindex ] ); 
    
nvault_setgVaultvKeyvData ); 
    
nvault_closegVault ); 


stock load_goldsindex 

    
gVault nvault_open"GOLDS_SAVE" ); 
     
    
get_user_authidindexgSteamIDcharsmaxgSteamID ) ); 

    
formatexvKeycharsmaxvKey ), "%sGOLDS"gSteamID ); 
    
gGoldsindex ] = nvault_getgVaultvKey ); 
    
nvault_closegVault ); 


PHP Code:
new gName32 ]

stock save_goldsindex )
{
    
gVault nvault_open"GOLDS_SAVE" );
    
    
get_user_name(id,gName,charsmax(gName))
    
    
formatexvKeycharsmaxvKey ), "%s"gName );
    
formatexvDatacharsmaxvData ), "%d"gGoldsindex ] );
    
nvault_setgVaultvKeyvData );
    
nvault_closegVault );
}

stock load_goldsindex )
{
    
gVault nvault_open"GOLDS_SAVE" );
    
    
get_user_name(id,gName,charsmax(gName))

    
formatexvKeycharsmaxvKey ), "%s"gName );
    
gGoldsindex ] = nvault_getgVaultvKey );
    
nvault_closegVault );

__________________

Last edited by Eagle07; 12-10-2014 at 13:50.
Eagle07 is offline
frOOgy
Senior Member
Join Date: Jul 2014
Old 12-10-2014 , 13:57   Re: [Help] EaGle's Gold System
Reply With Quote #6

Quote:
Originally Posted by Eagle07 View Post
try
PHP Code:
new gSteamID 

stock save_golds
index 

    
gVault nvault_open"GOLDS_SAVE" ); 
     
    
get_user_authidindexgSteamIDcharsmaxgSteamID ) ); 
     
    
formatexvKeycharsmaxvKey ), "%sGOLDS"gSteamID ); 
    
formatexvDatacharsmaxvData ), "%d"gGoldsindex ] ); 
    
nvault_setgVaultvKeyvData ); 
    
nvault_closegVault ); 


stock load_goldsindex 

    
gVault nvault_open"GOLDS_SAVE" ); 
     
    
get_user_authidindexgSteamIDcharsmaxgSteamID ) ); 

    
formatexvKeycharsmaxvKey ), "%sGOLDS"gSteamID ); 
    
gGoldsindex ] = nvault_getgVaultvKey ); 
    
nvault_closegVault ); 


PHP Code:
new gName32 ]

stock save_goldsindex )
{
    
gVault nvault_open"GOLDS_SAVE" );
    
    
get_user_name(id,gName,charsmax(gName))
    
    
formatexvKeycharsmaxvKey ), "%s"gName );
    
formatexvDatacharsmaxvData ), "%d"gGoldsindex ] );
    
nvault_setgVaultvKeyvData );
    
nvault_closegVault );
}

stock load_goldsindex )
{
    
gVault nvault_open"GOLDS_SAVE" );
    
    
get_user_name(id,gName,charsmax(gName))

    
formatexvKeycharsmaxvKey ), "%s"gName );
    
gGoldsindex ] = nvault_getgVaultvKey );
    
nvault_closegVault );

THX but have errors :

Code:
error 017: undefined symbol "id"
warning 215: expression has no effect
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Errors on this line:
PHP Code:
get_user_name(id,gName,charsmax(gName)) 
frOOgy is offline
Send a message via Skype™ to frOOgy
frOOgy
Senior Member
Join Date: Jul 2014
Old 12-10-2014 , 14:15   Re: [Help] EaGle's Gold System
Reply With Quote #7

and... one more req for this code... can anyone give me part of the code ho give +4 GOLDS when player played 10 min. on one map

ex:

PHP Code:
public client_putinserver(id)
{
          
set_task(600.0"recivegolds"id)
}

public 
recivegolds(id)
{         
          (
I dont know how to finish code :))

frOOgy is offline
Send a message via Skype™ to frOOgy
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 12-10-2014 , 14:25   Re: [Help] EaGle's Gold System
Reply With Quote #8

Quote:
Originally Posted by frOOgy View Post
THX but have errors :

Code:
error 017: undefined symbol "id"
warning 215: expression has no effect
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Errors on this line:
PHP Code:
get_user_name(id,gName,charsmax(gName)) 
Just Change id to index

Code:
get_user_name(id,gName,charsmax(gName))

Code:
get_user_name(index,gName,charsmax(gName))


------
2)

Quote:
Originally Posted by frOOgy View Post
and... one more req for this code... can anyone give me part of the code ho give +4 GOLDS when player played 10 min. on one map

ex:

PHP Code:
public client_putinserver(id)
{
          
set_task(600.0"recivegolds"id)
}

public 
recivegolds(id)
{         
          (
I dont know how to finish code :))


PHP Code:
public client_putinserver(id)
{
          
set_task(600.0"recivegolds"id)
}

public 
recivegolds(id)
{         
          
gGolds[id] += 4

__________________

Last edited by Eagle07; 12-10-2014 at 14:27.
Eagle07 is offline
Old 12-10-2014, 14:27
Eagle07
This message has been deleted by Eagle07. Reason: Sry :d
frOOgy
Senior Member
Join Date: Jul 2014
Old 12-10-2014 , 14:53   Re: [Help] EaGle's Gold System
Reply With Quote #9

errors at compiling at this line:

PHP Code:
gGolds[id] += 
becouse I add ColorChat under "gGolds[id]..."

error:
Code:
error 027: invalid character constant
When I remove ColorChat, code don't have errors. How can I add ColorChat with text "You reviced 4 Golds for playing +10 min."

and EaGle, PLzz read topic at start.. I need more help (anto Remove slot...)
__________________
Help me in other requests

Change Map System [PLUGIN]

GaG System [PLUGIN] [PLUGIN]

Last edited by frOOgy; 12-10-2014 at 14:59.
frOOgy is offline
Send a message via Skype™ to frOOgy
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 12-10-2014 , 15:10   Re: [Help] EaGle's Gold System
Reply With Quote #10

Quote:
Originally Posted by frOOgy View Post
errors at compiling at this line:

PHP Code:
gGolds[id] += 
becouse I add ColorChat under "gGolds[id]..."

error:
Code:
error 027: invalid character constant
When I remove ColorChat, code don't have errors. How can I add ColorChat with text "You reviced 4 Golds for playing +10 min."

and EaGle, PLzz read topic at start.. I need more help (anto Remove slot...)
PHP Code:
public client_putinserver(id)
{
          
set_task(600.0"recivegolds"id)
}

public 
recivegolds(id)
{         
          
gGolds[id] += 4
          ColorChat
(id,NORMAL,"You reviced 4 Golds for playing +10 min.")

__________________
Eagle07 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 21:52.


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