Hi , I want to make an independent point system which would work totally different [ like it wont give points for kills and all ..]
I need help regarding this , have some queries
1) How can i create point.inc for it so that i would be able to use this in other plugins .. I will take the users data [ number of points he has ] to use in other plugin
Oxicrom created this for me and im working on this ..
PHP Code:
#include <amxmodx>
#include <customshop>
#include <nvault>
#define POINTS_PER_DAY 5
new g_iVault, g_szAuthId[33][35]
public plugin_init()
{
register_plugin("CSHOP Addon: 24h Login Bonus", "1.0", "OciXCrom")
g_iVault = nvault_open("CSHOPLogin")
}
public plugin_end()
nvault_close(g_iVault)
public client_putinserver(id)
{
get_user_authid(id, g_szAuthId[id], charsmax(g_szAuthId[]))
use_vault(id, 1)
}
public client_disconnect(id)
use_vault(id, 0)
use_vault(id, iType)
{
switch(iType)
{
case 0:
{
new szTime[20]
num_to_str(get_systime(), szTime, charsmax(szTime))
nvault_set(g_iVault, g_szAuthId[id], szTime)
}
case 1:
{
new iGet = nvault_get(g_iVault, g_szAuthId[id])
if(!iGet || (iGet - get_systime() >= 86400))
{
new szName[32]
get_user_name(id, szName, charsmax(szName))
cshop_give_points(id, POINTS_PER_DAY)
client_print(0, print_chat, "* %s got %i points for daily login.", szName, POINTS_PER_DAY)
}
}
}
}
I just need to use the points of user in more plugins ..
So how can i create point.inc ?