View Single Post
Author Message
ladaladik
BANNED
Join Date: Nov 2019
Old 11-08-2020 , 03:37   [INC/ ?ANY?] EZQL Plugin with SetValue/GetValue natives for MYSQL
Reply With Quote #1

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 clientint args)
{
    
char plusnum[10];
    
GetCmdArg(1plusnumsizeof(plusnum));
    
int value StringToInt(plusnumsizeof(plusnum));
    
L_SetClientValue(clientL_GetClientValue(client) + value);
}
public 
Action getval(int clientint args)
{
    
PrintToChatAll("%N has %i"clientL_GetClientValue(client));

Attached Files
File Type: sp Get Plugin or Get Source (database.sp - 204 views - 3.8 KB)
File Type: inc ezql.inc (178 Bytes, 89 views)

Last edited by ladaladik; 11-08-2020 at 06:40.
ladaladik is offline