View Single Post
GetRektByNoob
Member
Join Date: Nov 2018
Old 08-22-2019 , 09:20   Re: Zephyrus's store refresh client inventory
Reply With Quote #5

I'm kind of confused since I haven't touched all the natives thing...
I added this 2 blocks to the sp file
PHP Code:
public Native_ForceSaveClientData(Handle:pluginnumParams

    
/* Save all the data like in OnClientDisconnect, just in case? */ 
    
Store_SaveClientData(GetNativeCell(1)); 
    
Store_SaveClientInventory(GetNativeCell(1)); 
    
Store_SaveClientEquipment(GetNativeCell(1)); 
    return 
1


public 
Native_ReloadClientInventory(Handle:pluginnumParams

    
/* (Re-)load inventory stuff... */ 
    
Store_LoadClientInventory(GetNativeCell(1)); 
    return 
1

PHP Code:
    CreateNative("Store_ForceSaveClientData"Native_ForceSaveClientData); 
    
CreateNative("Store_ReloadClientInventory"Native_ReloadClientInventory); 
and compiled it, and it created smx file which is great.

now I don't understand what to include? in my plugin currently, I'm including the inc file and not the sp file... I need to include the sp file or the smx? (pretty sure it's not possible to include smx file but ima ask anyway xD)

and I have side question, doing this method means that anyone who wants to use my plugin needs to download this store version?
__________________
𝓓𝓲𝓼𝓬𝓸𝓻𝓭 » GetRektByNoob#5272
𝓢𝓽𝓮𝓪𝓶 » https://steamcommunity.com/profiles/76561198805764302/
GetRektByNoob is offline