AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Pls Help Saving Rank&Exp (https://forums.alliedmods.net/showthread.php?t=168531)

codysermina 09-30-2011 13:15

Pls Help Saving Rank&Exp
 
Hello, i really want help saving the ranks and exp when disconnect, how do i do that on this plugin?:
DELETED
p.s. i tryed self, but it didnt work on public SaveData(id) & public LoadData(id)

iXP[id] is XP

RANKS[iRank[id]] is Rank, i will be very happy if someone could make it!!! :wink:

drekes 09-30-2011 14:29

Re: Pls Help Saving Rank&Exp
 
PHP Code:

    num_to_str(iRank[id], szTempRankcharsmax(szTempRank))
    
num_to_str(iXP[id], szTempXPcharsmax(szTempXP))
    
    
formatex(vaultdata255"%i %i"szTempRankszTempXP[id]) 

=>
PHP Code:

formatex(vaultdata255"%i %i"iRank[id], iXP[id]); 


codysermina 09-30-2011 17:11

Re: Pls Help Saving Rank&Exp
 
Quote:

Originally Posted by drekes (Post 1565986)
PHP Code:

    num_to_str(iRank[id], szTempRankcharsmax(szTempRank))
    
num_to_str(iXP[id], szTempXPcharsmax(szTempXP))
    
    
formatex(vaultdata255"%i %i"szTempRankszTempXP[id]) 

=>
PHP Code:

formatex(vaultdata255"%i %i"iRank[id], iXP[id]); 


It still will not save :(

Erox902 10-01-2011 16:12

Re: Pls Help Saving Rank&Exp
 
Hm... If num_to_str converts a num to a string I don't think it should be %i
So either try it with %s's... Or simply try only using:
PHP Code:

formatex(vaultdata255"%i %i"iRank[id], iXP[id]); 


codysermina 10-03-2011 11:34

Re: Pls Help Saving Rank&Exp
 
Quote:

Originally Posted by Erox902 (Post 1566685)
Hm... If num_to_str converts a num to a string I don't think it should be %i
So either try it with %s's... Or simply try only using:
PHP Code:

formatex(vaultdata255"%i %i"iRank[id], iXP[id]); 


not working :/ tryed %s and %i...i don't think it that

Erox902 10-03-2011 12:48

Re: Pls Help Saving Rank&Exp
 
Quote:

Originally Posted by codysermina (Post 1567693)
not working :/ tryed %s and %i...i don't think it that

Did you try removing the num_to_str's and temp variables and only use this?
PHP Code:

formatex(vaultdata255"%i %i"iRank[id], iXP[id]); 

Cuz' that should work :?

Otherwise try setting the functions public

codysermina 10-04-2011 12:24

Re: Pls Help Saving Rank&Exp
 
Lol, i used a another SaveData and LoadData, it now working, but anyways - thanks for the ideas and your time :)


All times are GMT -4. The time now is 19:39.

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