Raised This Month: $12 Target: $400
 3% 

[INC/ ?ANY?] EZQL Plugin with SetValue/GetValue natives for MYSQL


Post New Thread Reply   
 
Thread Tools Display Modes
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 - 201 views - 3.8 KB)
File Type: inc ezql.inc (178 Bytes, 87 views)

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


Thread Tools
Display Modes

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 09:49.


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