Raised This Month: $ Target: $400
 0% 

[BB] Addon: Ammo-Pack System v2.2 [API Shop, nVault Saving, AP Rewards and more!]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 06-12-2017 , 12:26   Re: [BB] Addon: Ammo-Pack System v2.2 [API Shop, nVault Saving, AP Rewards and more!]
Reply With Quote #22

A small review, i can be wrong about some, so let's discuss about them:

1. I think you could add 'these' to _:ItemData enumeration:
PHP Code:
new g_szAuthID[33][35], g_AP[33
Btw, szAuthId should be 34 not 35.

2. Here
PHP Code:
public plugin_end()
{
    for( new 
Players 1Players <= get_maxplayers(); Players++ )
        
save_ap(Players)

    
nvault_close(g_Vault)

You should use get_players()

3. Your clcmd_say() function is not need , just register directly register_clcmd("say /donat .... and skip su much checks.

4. In save_ap don't use formatex() they are already strings, just use directly them.

5. In load_ap you use get_auth insteand of get_user_authid, i'm asking if is not a mistake? Also same problem, remove formatex() and use directly the string, it is pointless.
EDIT: Now i see, your get_auth() is a function typed by cvar, why is that? Why you don't save just for steam and that's all ?

6. In your register native functions, you don't have to make variables if you use just once the natives, example:
PHP Code:
public native_set_user_apIndexiAmount)
{
    new 
id get_param(1)
    
    new 
Amount get_param(2)
    
    
g_AP[id] = Amount

- >

PHP Code:
public native_set_user_apPluginParams)
{    
    
g_AP[get_param(1)] = get_param(2)

If you use them just once is pointless to insert is value in variables.

Last edited by Craxor; 06-12-2017 at 12:27.
Craxor is offline
Send a message via ICQ to Craxor
 



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 05:53.


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