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

Plugin Sourcemod to Amx


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DaRk56
Senior Member
Join Date: Jul 2009
Location: France
Old 09-21-2011 , 20:33   Plugin Sourcemod to Amx
Reply With Quote #1

Hi, I just want plugin SourceMod => Amx
Make the plugin for Amx

I thank the one who will take a look at my request

A few months will be offered on our service to that I will be the plugin ;)

-------------------------------

Code:
new Handle:g_hDB;
new bool:connection;
new String:Erreur[255];

public OnPluginStart()
{
	new Handle:hKV = INVALID_HANDLE;             
	hKV = CreateKeyValues("");
	new String:error[255];
	KvSetString(hKV,"driver","mysql");
	KvSetString(hKV,"host","localhost");
	KvSetString(hKV,"database","***");
	KvSetString(hKV,"user","***")
	KvSetString(hKV,"pass","***")
	g_hDB = SQL_ConnectCustom(hKV, error, sizeof(error), true);
	
	if (g_hDB == INVALID_HANDLE)
	{
		LogError("Could not connect: %s", error);
		connection = false;
	}
	else
	{
		PrintToServer("Database connexion success");
		connection = true;
	}
	
	Format(Erreur, sizeof(Erreur), "%s", error);
	
	HookEvent("player_spawn", Event_PlayerSpawn);
}

public Event_PlayerSpawn(Handle:event,String:name[], bool:dontBroadcast)
{
	new client = GetClientOfUserId(GetEventInt(event,"userid"));
	Insertion(client);
}

public Insertion(client)
{
	new Handle:hQuery;
	new String:szMyQuery[255];
	new bool:already = false;
	
	decl String:steamid[32];
	GetClientAuthString(client, steamid, sizeof(steamid));
	
	if (connection)
	{
		Format(szMyQuery, sizeof(szMyQuery), "SELECT steam_id FROM invite_steam WHERE steam_id = '%s'", steamid);
		hQuery = SQL_Query(g_hDB, szMyQuery);
		if (SQL_GetRowCount(hQuery) > 0) already = true;
		CloseHandle(hQuery);
		
		if (!already)
		{
			Format(szMyQuery, sizeof(szMyQuery), "INSERT INTO invite_steam VALUES ('%s', 0)", steamid);
			hQuery = SQL_Query(g_hDB, szMyQuery);
			CloseHandle(hQuery);
		}
	}
}

Last edited by DaRk56; 09-22-2011 at 00:24.
DaRk56 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-22-2011 , 00:15   Re: Plugin Sourcemod vers Amx
Reply With Quote #2

Post in the SourceMod section or post in the French section depending on what all those french words mean .
__________________
fysiks is offline
DaRk56
Senior Member
Join Date: Jul 2009
Location: France
Old 09-22-2011 , 00:17   Re: Plugin Sourcemod vers Amx
Reply With Quote #3

I just want plugin SourceMod => Amx
Make the plugin for Amx

Edit : I is not posting in the right section, excuse me

Last edited by DaRk56; 09-22-2011 at 00:28.
DaRk56 is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 09-22-2011 , 11:40   Re: Plugin Sourcemod to Amx
Reply With Quote #4

you need a scripter who knows the two languages, sorry but BAILOPAN forgot our amxx forums
__________________
ANTICHRISTUS is offline
Reply



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 17:46.


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