This plugin basically gives you option to use natives
L_GetValue(int client); and L_SetValue(int client, int value);
with those natives you can set players value and get clients value, all is saved in mysql so you can use it for your shop, free vip plugins and i guess many more.
bug reports and feedback would be nice.
How to use this:
Drop the .smx in your plugins folder
and then fill this info and put it in the databases.cfg in sourcemod/addons/configs/databases.cfg
Code:
"Laff_DEV"
{
"driver" "mysql"
"host" "your host"
"database" "database"
"user" "user"
"pass" "password"
"port" "3306"
}
plugin example :
PHP Code:
public void OnPluginStart()
{
RegConsoleCmd("sm_setvalue", command_Set);
RegConsoleCmd("sm_getvalue", getval);
}
public Action command_Set(int client, int args)
{
char plusnum[10];
GetCmdArg(1, plusnum, sizeof(plusnum));
int value = StringToInt(plusnum, sizeof(plusnum));
L_SetClientValue(client, L_GetClientValue(client) + value);
}
public Action getval(int client, int args)
{
PrintToChatAll("%N has %i", client, L_GetClientValue(client));
}