Quote:
Originally Posted by Kia
If you're trying to make a shop which saves the items in SQL look at the SQL Version from hats, it has been released on Suggestions forum a while ago.
|
I already got the save in vault that works
Code:
public SaveData( id )
{
new szData[ 64 ], szKey[ 32 ];
get_user_authid( id, szKey, charsmax( szKey ) );
format( szKey, charsmax( szKey ), "%s-BOUGHTSKINS", szKey );
for( new i ; i < MAX_SKINS ; i ++ )
if( g_bBoughtSkin[ id ][ i ] )
format( szData, charsmax( szData ), "%s%i-", szData, i );
set_vaultdata( szKey, szData );
}
public LoadData( id )
{
new szData[ 64 ], szKey[ 32 ], szPiece[ 32 ];
get_user_authid( id, szKey, charsmax( szKey ) );
format( szKey, charsmax( szKey ), "%s-BOUGHTSKINS", szKey );
get_vaultdata( szKey, szData, charsmax( szData ) );
while( contain( szData, "-" ) >= 0 )
{
strtok( szData, szPiece, charsmax( szPiece ), szData, charsmax( szData ), '-' );
g_bBoughtSkin[ id ][ str_to_num( szPiece ) ] = true;
}
}
But i need for sql to
__________________