Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Plugin nie łąćzy się z baza danych


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
5 odpowiedzi w tym temacie

#1 Ps^chol ?!

    Zaawansowany

  • Użytkownik

Reputacja: 17
Początkujący

  • Postów:105
  • GG:
  • Imię:Kamil
  • Lokalizacja:Amxx.pl
Offline

Napisano 22.04.2016 22:57

Witam,posiadam plugin,lecz on nie łączy się zz baza tzn wyskakuje taki log:

L 04/22/2016 - 23:46:28: [plugin.amxx] Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Ponizej daje SMA pluginu i czy któś bby pomogl mi o naprawic? by się łączyl ?

/* Plugin generated by AMXX-Studio */
 
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <hamsandwich>
#include <colorchat>
#include <sqlx>
#include <csx>
 
#define PLUGIN "Plugin"
#define VERSION "1.0"
#define AUTHOR "Zaden"
 
 
#define TASK_SAVEME 768
#define SPRAWDZ 3431
 
new weapon, year, month, day, hour, minute, second;
new g_hudmsg, runda;
new bool:Loaded[33];
//new nazwa_gracza[33][32];
//new vaultAK47, vaultM4A1, vaultAWP, vaultDGL, vaultFamas, vaultKnife, vaultCase;
new g_MaxPlayers;
new Handle:gTuple, bool:gConnected;
 
#include "csgo/knives.inl"
#include "csgo/awp.inl"
#include "csgo/ak47.inl"
#include "csgo/m4a1.inl"
#include "csgo/deagle.inl"
#include "csgo/famas.inl"
#include "csgo/cases.inl"
#include "csgo/menu.inl"
#include "csgo/reward.inl"
#include "csgo/admin.inl"
 
 
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
 
new classname[32]
for(new i=1;i<31;++i)
if(i!=2) {
get_weaponname(i,classname,31)
 
RegisterHam(Ham_Item_Deploy, classname, "fwItemDeploy",1);
}
 
register_event("30","Message_Intermission","a");
register_event("DeathMsg", "DeathMsg", "a")
register_event("HLTV", "NowaRunda", "a", "1=0", "2=0");
 
register_clcmd("say /menu", "Menu");
register_clcmd("say_team /menu", "Menu");
register_clcmd("say /skin", "SelectSkin");
register_clcmd("say_team /skin", "SelectSkin");
register_clcmd("say /skiny", "SkinInfo");
register_clcmd("say_team /skiny", "SkinInfo");
register_clcmd("say /pomoc", "SkinInfo");
register_clcmd("say_team /pomoc", "SkinInfo");
register_clcmd("say /case", "CaseMenu");
register_clcmd("say_team /case", "CaseMenu");
 
register_clcmd("say /debug", "DebugMode", ADMIN_IMMUNITY);
 
g_hudmsg = CreateHudSyncObj()
 
/*vaultAK47=nvault_open("AK47")
vaultM4A1=nvault_open("M4A1")
vaultAWP=nvault_open("AWP")
vaultDGL=nvault_open("Deagle")
vaultFamas=nvault_open("Famas")
vaultKnife=nvault_open("Knife")
vaultCase=nvault_open("Case")*/
}
 
public plugin_cfg() {
gTuple = SQL_MakeDbTuple("sss", "ssso" , "haslo", "db",0)
 
new error, szError[128];
new Handle:qConn = SQL_Connect(gTuple, error, szError, 127);
if(error){
log_amx("Error: %s", szError);
return;
}
else gConnected = true;
 
SQL_FreeHandle(qConn);
 
g_MaxPlayers = get_maxplayers();
}
 
/*public SaveData(id) {
if(!gConnected || !Loaded[id]) return
 
new Data[1]
Data[0] = id
new qCommand[768], szName[64]
get_user_name(id, szName, charsmax(szName))
 
format(qCommand, charsmax(qCommand), "UPDATE Noze SET Bayonet='%d', Butterfly='%d', Flip='%d', Gut='%d', Huntsman='%d', Karambit='%d', M9='%d' WHERE nick='%s'", pKnife[id][1], pKnife[id][2], pKnife[id][3], pKnife[id][4], pKnife[id][5], pKnife[id][6], pKnife[id][7], szName);
SQL_ThreadQuery(gTuple, "SaveHandler", qCommand, Data, 1)
 
format(qCommand, charsmax(qCommand), "UPDATE AK47 SET Vulcan='%d', Redline='%d', Assimov='%d', FireSerpent='%d' WHERE nick='%s'", pAK47[id][1], pAK47[id][2], pAK47[id][3], pAK47[id][4], szName);
SQL_ThreadQuery(gTuple, "SaveHandler", qCommand, Data, 1)
 
format(qCommand, charsmax(qCommand), "UPDATE M4A1 SET Cyrex='%d', DragonKing='%d', Assimov='%d', Nuclear='%d' WHERE nick='%s'", pM4A1[id][1], pM4A1[id][2], pM4A1[id][3], pM4A1[id][4], szName);
SQL_ThreadQuery(gTuple, "SaveHandler", qCommand, Data, 1)
 
format(qCommand, charsmax(qCommand), "UPDATE AWP SET Hawking='%d', Redline='%d', Assimov='%d', DragonLore='%d' WHERE nick='%s'", pAWP[id][1], pAWP[id][2], pAWP[id][3], pAWP[id][4], szName);
SQL_ThreadQuery(gTuple, "SaveHandler", qCommand, Data, 1)
 
format(qCommand, charsmax(qCommand), "UPDATE DGL SET Asking='%d', Engraved='%d', Conspiracy='%d', Skrillex='%d' WHERE nick='%s'", pDGL[id][1], pDGL[id][2], pDGL[id][3], pDGL[id][4], szName);
SQL_ThreadQuery(gTuple, "SaveHandler", qCommand, Data, 1)
 
format(qCommand, charsmax(qCommand), "UPDATE Skrzynie SET Klucz='%d', CaseAK47='%d', CaseM4A1='%d', CaseAWP='%d', CaseDGL='%d' WHERE nick='%s'", pKey[id], pCaseAK47[id], pCaseM4A1[id], pCaseAWP[id], pCaseDGL[id], szName);
SQL_ThreadQuery(gTuple, "SaveHandler", qCommand, Data, 1)
}*/
 
public SaveData(id) {
if(!gConnected || !Loaded[id]) return
 
new Data[1]
Data[0] = id
new qCommand[3192], iLen, szName[64]
get_user_name(id, szName, charsmax(szName))
 
/*iLen = formatex(qCommand, sizeof qCommand -1, "UPDATE CSGOMOD SET VulcanAK47='%d', RedlineAK47='%d', AssimovAK47='%d', FSAK47='%d',", pAK47[id][1], pAK47[id][2], pAK47[id][3], pAK47[id][4], szName);
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "CyrexM4A1='%d', DKM4A1='%d', AssimovM4A1='%d', NuclearM4A1='%d',", pM4A1[id][1], pM4A1[id][2], pM4A1[id][3], pM4A1[id][4], szName);
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "HawkingAWP='%d', RedlineAWP='%d', AssimovAWP='%d', DLAWP='%d',", pAWP[id][1], pAWP[id][2], pAWP[id][3], pAWP[id][4], szName);
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "AskingDGL='%d', EngravedDGL='%d', ConspiracyDGL='%d', SkrillexDGL='%d',", pDGL[id][1], pDGL[id][2], pDGL[id][3], pDGL[id][4], szName);
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "Bayonet='%d', Butterfly='%d', Flip='%d', Gut='%d', Huntsman='%d', Karambit='%d', M9='%d',", pKnife[id][1], pKnife[id][2], pKnife[id][3], pKnife[id][4], pKnife[id][5], pKnife[id][6], pKnife[id][7], szName);
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "Klucz='%d', CaseAK47='%d', CaseM4A1='%d', CaseAWP='%d', CaseDGL='%d' WHERE nick='%s'", pKey[id], pCaseAK47[id], pCaseM4A1[id], pCaseAWP[id], pCaseDGL[id], szName);
SQL_ThreadQuery(gTuple, "SaveHandler", qCommand, Data, 1)*/
 
iLen = formatex(qCommand, sizeof qCommand -1, "INSERT INTO CSGOMOD (`nick`, `VulcanAK47`, `RedlineAK47`, `AssimovAK47`, `FSAK47`,`CyrexM4A1`, `DKM4A1`, `AssimovM4A1`, `NuclearM4A1`, `HawkingAWP`, `RedlineAWP`, `AssimovAWP`, `DLAWP`,");
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "`AskingDGL`, `EngravedDGL`, `ConspiracyDGL`, `SkrillexDGL`, `Bayonet`, `Butterfly`, `Flip`, `Gut`, `Huntsman`, `Karambit`, `M9`,");
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "`Klucz`, `CaseAK47`, `CaseM4A1`, `CaseAWP`, `CaseDGL`, `CaseFamas`, `PulseFamas`, `DKFamas`, `PixelFamas`, `SkullFamas`) ");
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "VALUES ('%s', %d, %d, %d, %d,%d, %d, %d, %d,", szName, pAK47[id][1], pAK47[id][2], pAK47[id][3], pAK47[id][4], pM4A1[id][1], pM4A1[id][2], pM4A1[id][3], pM4A1[id][4]);
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "%d, %d, %d, %d,%d, %d, %d, %d,", pAWP[id][1], pAWP[id][2], pAWP[id][3], pAWP[id][4], pDGL[id][1], pDGL[id][2], pDGL[id][3], pDGL[id][4]);
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "%d, %d, %d, %d, %d, %d, %d,", pKnife[id][1], pKnife[id][2], pKnife[id][3], pKnife[id][4], pKnife[id][5], pKnife[id][6], pKnife[id][7]);
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "%d, %d, %d, %d, %d, %d,%d, %d, %d, %d)", pKey[id], pCaseAK47[id], pCaseM4A1[id], pCaseAWP[id], pCaseDGL[id], pCaseFamas[id], pFamas[id][1], pFamas[id][2], pFamas[id][3], pFamas[id][4]);
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "ON DUPLICATE KEY UPDATE `nick`=VALUES(`nick`),`VulcanAK47`=VALUES(`VulcanAK47`), `RedlineAK47`=VALUES(`RedlineAK47`), `AssimovAK47`=VALUES(`AssimovAK47`), `FSAK47`=VALUES(`FSAK47`),");
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "`CyrexM4A1`=VALUES(`CyrexM4A1`), `DKM4A1`=VALUES(`DKM4A1`), `AssimovM4A1`=VALUES(`AssimovM4A1`), `NuclearM4A1`=VALUES(`NuclearM4A1`),");
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "`HawkingAWP`=VALUES(`HawkingAWP`), `RedlineAWP`=VALUES(`RedlineAWP`), `AssimovAWP`=VALUES(`AssimovAWP`), `DLAWP`=VALUES(`DLAWP`),");
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "`AskingDGL`=VALUES(`AskingDGL`), `EngravedDGL`=VALUES(`EngravedDGL`), `ConspiracyDGL`=VALUES(`ConspiracyDGL`), `SkrillexDGL`=VALUES(`SkrillexDGL`),");
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "`Bayonet`=VALUES(`Bayonet`), `Butterfly`=VALUES(`Butterfly`), `Flip`=VALUES(`Flip`), `Gut`=VALUES(`Gut`), `Huntsman`=VALUES(`Huntsman`),`Karambit`=VALUES(`Karambit`), `M9`=VALUES(`M9`),");
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "`Klucz`=VALUES(`Klucz`), `CaseAK47`=VALUES(`CaseAK47`), `CaseM4A1`=VALUES(`CaseM4A1`), `CaseAWP`=VALUES(`CaseAWP`), `CaseDGL`=VALUES(`CaseDGL`), `CaseFamas`=VALUES(`CaseFamas`),");
iLen += formatex(qCommand[iLen], (sizeof qCommand - 1) - iLen, "`PulseFamas`=VALUES(`PulseFamas`), `DKFamas`=VALUES(`DKFamas`), `PixelFamas`=VALUES(`PixelFamas`), `SkullFamas`=VALUES(`SkullFamas`);");
 
/*
iLen = formatex(qCommand, sizeof(qCommand), "INSERT INTO CSGOMOD (`nick`, `VulcanAK47`, `RedlineAK47`, `AssimovAK47`, `FSAK47`,`CyrexM4A1`, `DKM4A1`, `AssimovM4A1`, `NuclearM4A1`, `HawkingAWP`, `RedlineAWP`, `AssimovAWP`, `DLAWP`,");
iLen += formatex(qCommand[iLen], sizeof(qCommand) - iLen, "`AskingDGL`, `EngravedDGL`, `ConspiracyDGL`, `SkrillexDGL`, `Bayonet`, `Butterfly`, `Flip`, `Gut`, `Huntsman`, `Karambit`, `M9`,");
iLen += formatex(qCommand[iLen], sizeof(qCommand) - iLen, "`Klucz`, `CaseAK47`, `CaseM4A1`, `CaseAWP`, `CaseDGL`, `CaseFamas`, `PulseFamas`, `DKFamas`, `PixelFamas`, `SkullFamas`) ");
iLen += formatex(qCommand[iLen], sizeof(qCommand) - iLen, "VALUES ('%s', %d, %d, %d, %d,%d, %d, %d, %d,", szName, pAK47[id][1], pAK47[id][2], pAK47[id][3], pAK47[id][4], pM4A1[id][1], pM4A1[id][2], pM4A1[id][3], pM4A1[id][4]);
iLen += formatex(qCommand[iLen], sizeof(qCommand) - iLen, "%d, %d, %d, %d,%d, %d, %d, %d,", pAWP[id][1], pAWP[id][2], pAWP[id][3], pAWP[id][4], pDGL[id][1], pDGL[id][2], pDGL[id][3], pDGL[id][4]);
iLen += formatex(qCommand[iLen], sizeof(qCommand) - iLen, "%d, %d, %d, %d, %d, %d, %d,", pKnife[id][1], pKnife[id][2], pKnife[id][3], pKnife[id][4], pKnife[id][5], pKnife[id][6], pKnife[id][7]);
iLen += formatex(qCommand[iLen], sizeof(qCommand) - iLen, "%d, %d, %d, %d, %d, %d,%d, %d, %d, %d)", pKey[id], pCaseAK47[id], pCaseM4A1[id], pCaseAWP[id], pCaseDGL[id], pCaseFamas[id], pFamas[id][1], pFamas[id][2], pFamas[id][3], pFamas[id][4]);
iLen2 = formatex(Two, sizeof(Two), "ON DUPLICATE KEY UPDATE `nick`=VALUES(`nick`),`VulcanAK47`=VALUES(`VulcanAK47`), `RedlineAK47`=VALUES(`RedlineAK47`), `AssimovAK47`=VALUES(`AssimovAK47`), `FSAK47`=VALUES(`FSAK47`),");
iLen2 += formatex(Two[iLen2], sizeof(Two) - iLen2, "`CyrexM4A1`=VALUES(`CyrexM4A1`),`DKM4A1`=VALUES(`DKM4A1`),`AssimovM4A1`=VALUES(`AssimovM4A1`),`NuclearM4A1`=VALUES(`NuclearM4A1`),`HawkingAWP`=VALUES(`HawkingAWP`),`RedlineAWP`=VALUES(`RedlineAWP`),");
iLen2 += formatex(Two[iLen2], sizeof(Two) - iLen2, "`AssimovAWP`=VALUES(`AssimovAWP`),`DLAWP`=VALUES(`DLAWP`),`AskingDGL`=VALUES(`AskingDGL`), `EngravedDGL`=VALUES(`EngravedDGL`),`ConspiracyDGL`=VALUES(`ConspiracyDGL`), `SkrillexDGL`=VALUES(`SkrillexDGL`),");
iLen2 += formatex(Two[iLen2], sizeof(Two) - iLen2, "`Bayonet`=VALUES(`Bayonet`),`Butterfly`=VALUES(`Butterfly`),`Flip`=VALUES(`Flip`),`Gut`=VALUES(`Gut`),`Huntsman`=VALUES(`Huntsman`),`Karambit`=VALUES(`Karambit`),`M9`=VALUES(`M9`),");
iLen2 += formatex(Two[iLen2], sizeof(Two) - iLen2, "`Klucz`=VALUES(`Klucz`),`CaseAK47`=VALUES(`CaseAK47`),`CaseM4A1`=VALUES(`CaseM4A1`),`CaseAWP`=VALUES(`CaseAWP`),`CaseDGL`=VALUES(`CaseDGL`),`CaseFamas`=VALUES(`CaseFamas`),");
iLen2 += formatex(Two[iLen2], sizeof(Two) - iLen2, "`PulseFamas`=VALUES(`PulseFamas`), `DKFamas`=VALUES(`DKFamas`), `PixelFamas`=VALUES(`PixelFamas`), `SkullFamas`=VALUES(`SkullFamas`);");
*/
//add(qCommand, sizeof(qCommand), Two, sizeof(Two));
 
SQL_ThreadQuery(gTuple, "SaveHandler", qCommand, Data, 1)
 
//iLen = 0;
//iLen2 = 0;
}
 
public SaveHandler(FailState, Handle:Query, Error[], Errorcode, Data[], DataSize)
{
//new id = Data[0] //Not using
if(Errorcode)
log_amx("Blad w zapytaniu: %s [SaveData]", Error)
 
if(FailState == TQUERY_CONNECT_FAILED) {
log_amx("Nie mozna podlaczyc sie do bazy danych.")
return PLUGIN_CONTINUE
}
else if(FailState == TQUERY_QUERY_FAILED) {
log_amx("Zapytanie anulowane [SaveData]")
return PLUGIN_CONTINUE
}
 
return PLUGIN_CONTINUE
}
 
/*public LoadData(id) {
if(!gConnected) return
 
new Data[1]
Data[0] = id;
 
new qCommand[512], szName[64]
get_user_name(id, szName, charsmax(szName))
 
format(qCommand, charsmax(qCommand), "INSERT INTO Noze (`nick`) VALUES ('%s') ON DUPLICATE KEY UPDATE `nick`='%s';", szName, szName)
SQL_ThreadQuery(gTuple, "LoadHandler", qCommand, Data, 1)
 
format(qCommand, charsmax(qCommand), "INSERT INTO AK47 (`nick`) VALUES ('%s') ON DUPLICATE KEY UPDATE `nick`='%s';", szName, szName)
SQL_ThreadQuery(gTuple, "LoadHandler", qCommand, Data, 1)
 
format(qCommand, charsmax(qCommand), "INSERT INTO M4A1 (`nick`) VALUES ('%s') ON DUPLICATE KEY UPDATE `nick`='%s';", szName, szName)
SQL_ThreadQuery(gTuple, "LoadHandler", qCommand, Data, 1)
 
format(qCommand, charsmax(qCommand), "INSERT INTO AWP (`nick`) VALUES ('%s') ON DUPLICATE KEY UPDATE `nick`='%s';", szName, szName)
SQL_ThreadQuery(gTuple, "LoadHandler", qCommand, Data, 1)
 
format(qCommand, charsmax(qCommand), "INSERT INTO DGL (`nick`) VALUES ('%s') ON DUPLICATE KEY UPDATE `nick`='%s';", szName, szName)
SQL_ThreadQuery(gTuple, "LoadHandler", qCommand, Data, 1)
 
format(qCommand, charsmax(qCommand), "INSERT INTO Skrzynie (`nick`) VALUES ('%s') ON DUPLICATE KEY UPDATE `nick`='%s';", szName, szName)
SQL_ThreadQuery(gTuple, "LoadHandler", qCommand, Data, 1)
}*/
 
public LoadData(id) {
if(!gConnected) return
 
new Data[1]
Data[0] = id;
 
new qCommand[512], szName[64]
get_user_name(id, szName, charsmax(szName))
 
format(qCommand, charsmax(qCommand), "INSERT INTO CSGOMOD (`nick`) VALUES ('%s') ON DUPLICATE KEY UPDATE `nick`='%s';", szName, szName)
SQL_ThreadQuery(gTuple, "LoadHandler", qCommand, Data, 1)
}
 
public LoadHandler(FailState, Handle:Query, Error[], Errorcode, Data[], DataSize)
{
//new id = Data[0] //Not using
if(Errorcode)
log_amx("Blad w zapytaniu: %s [LoadData]", Error)
 
if(FailState == TQUERY_CONNECT_FAILED) {
log_amx("Nie mozna podlaczyc sie do bazy danych.")
return PLUGIN_CONTINUE
}
else if(FailState == TQUERY_QUERY_FAILED) {
log_amx("Zapytanie anulowane [LoadData]")
return PLUGIN_CONTINUE
}
 
return PLUGIN_CONTINUE
}
 
/*public CheckData(id) {
if(!gConnected) return
 
new Data[1]
Data[0] = id
new qCommand[512], szName[64]
get_user_name(id, szName, charsmax(szName))
 
format(qCommand, charsmax(qCommand), "SELECT * FROM `Noze` WHERE `nick` = '%s'", szName)
SQL_ThreadQuery(gTuple, "CheckHandlerKnives", qCommand, Data, 1)
 
format(qCommand, charsmax(qCommand), "SELECT * FROM `AK47` WHERE `nick` = '%s'", szName)
SQL_ThreadQuery(gTuple, "CheckHandlerAK47", qCommand, Data, 1)
 
format(qCommand, charsmax(qCommand), "SELECT * FROM `M4A1` WHERE `nick` = '%s'", szName)
SQL_ThreadQuery(gTuple, "CheckHandlerM4A1", qCommand, Data, 1)
 
format(qCommand, charsmax(qCommand), "SELECT * FROM `AWP` WHERE `nick` = '%s'", szName)
SQL_ThreadQuery(gTuple, "CheckHandlerAWP", qCommand, Data, 1)
 
format(qCommand, charsmax(qCommand), "SELECT * FROM `DGL` WHERE `nick` = '%s'", szName)
SQL_ThreadQuery(gTuple, "CheckHandlerDGL", qCommand, Data, 1)
 
format(qCommand, charsmax(qCommand), "SELECT * FROM `Skrzynie` WHERE `nick` = '%s'", szName)
SQL_ThreadQuery(gTuple, "CheckHandlerCases", qCommand, Data, 1)
}*/
 
public CheckData(id) {
if(!gConnected) return
 
new Data[1]
Data[0] = id
new qCommand[512], szName[64]
get_user_name(id, szName, charsmax(szName))
 
format(qCommand, charsmax(qCommand), "SELECT * FROM `CSGOMOD` WHERE `nick` = '%s'", szName)
SQL_ThreadQuery(gTuple, "CheckHandler", qCommand, Data, 1)
}
 
public CheckHandler(FailState, Handle:Query, Error[], Errorcode, Data[], DataSize)
{
new id = Data[0]
if(Errorcode)
log_amx("Blad w zapytaniu: %s [CheckData]", Error)
 
if(FailState == TQUERY_CONNECT_FAILED) {
log_amx("Nie mozna podlaczyc sie do bazy danych.")
return PLUGIN_CONTINUE
}
else if(FailState == TQUERY_QUERY_FAILED) {
log_amx("Zapytanie anulowane [CheckData]")
return PLUGIN_CONTINUE
}
 
client_print(id, print_center, "Skiny Zaladowane!");
 
if(SQL_MoreResults(Query)){
pAK47[id][1] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "VulcanAK47"))
pAK47[id][2] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "RedlineAK47"))
pAK47[id][3] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "AssimovAK47"))
pAK47[id][4] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "FSAK47"))
 
pM4A1[id][1] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "CyrexM4A1"))
pM4A1[id][2] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "DKM4A1"))
pM4A1[id][3] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "AssimovM4A1"))
pM4A1[id][4] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "NuclearM4A1"))
 
pAWP[id][1] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "HawkingAWP"))
pAWP[id][2] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "RedlineAWP"))
pAWP[id][3] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "AssimovAWP"))
pAWP[id][4] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "DLAWP"))
 
pDGL[id][1] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "AskingDGL"))
pDGL[id][2] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "EngravedDGL"))
pDGL[id][3] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "ConspiracyDGL"))
pDGL[id][4] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "SkrillexDGL"))
 
pKnife[id][1] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Bayonet"))
pKnife[id][2] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Butterfly"))
pKnife[id][3] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Flip"))
pKnife[id][4] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Gut"))
pKnife[id][5] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Huntsman"))
pKnife[id][6] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Karambit"))
pKnife[id][7] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "M9"))
 
pKey[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Klucz"))
pCaseAK47[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "CaseAK47"))
pCaseM4A1[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "CaseM4A1"))
pCaseAWP[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "CaseAWP"))
pCaseDGL[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "CaseDGL"))
pCaseFamas[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "CaseFamas"))
 
pFamas[id][1] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "PulseFamas"))
pFamas[id][2] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "DKFamas"))
pFamas[id][3] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "PixelFamas"))
pFamas[id][4] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "SkullFamas"))
 
Loaded[id] = true;
}
 
return PLUGIN_CONTINUE;
}
 
/*public CheckHandlerKnives(FailState, Handle:Query, Error[], Errorcode, Data[], DataSize)
{
new id = Data[0]
if(Errorcode)
log_amx("Blad w zapytaniu: %s [CheckDataKnives]", Error)
 
if(FailState == TQUERY_CONNECT_FAILED) {
log_amx("Nie mozna podlaczyc sie do bazy danych.")
return PLUGIN_CONTINUE
}
else if(FailState == TQUERY_QUERY_FAILED) {
log_amx("Zapytanie anulowane [CheckDataKnives]")
return PLUGIN_CONTINUE
}
 
if(SQL_MoreResults(Query)){
pKnife[id][1] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Bayonet"))
pKnife[id][2] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Butterfly"))
pKnife[id][3] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Flip"))
pKnife[id][4] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Gut"))
pKnife[id][5] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Huntsman"))
pKnife[id][6] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Karambit"))
pKnife[id][7] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "M9"))
}
 
return PLUGIN_CONTINUE;
}
 
public CheckHandlerAK47(FailState, Handle:Query, Error[], Errorcode, Data[], DataSize)
{
new id = Data[0]
if(Errorcode)
log_amx("Blad w zapytaniu: %s [CheckDataAK47]", Error)
 
if(FailState == TQUERY_CONNECT_FAILED) {
log_amx("Nie mozna podlaczyc sie do bazy danych.")
return PLUGIN_CONTINUE
}
else if(FailState == TQUERY_QUERY_FAILED) {
log_amx("Zapytanie anulowane [CheckDataAK47]")
return PLUGIN_CONTINUE
}
 
if(SQL_MoreResults(Query)){
pAK47[id][1] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Vulcan"))
pAK47[id][2] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Redline"))
pAK47[id][3] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Assimov"))
pAK47[id][4] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "FireSerpent"))
}
 
return PLUGIN_CONTINUE;
}
 
public CheckHandlerM4A1(FailState, Handle:Query, Error[], Errorcode, Data[], DataSize)
{
new id = Data[0]
if(Errorcode)
log_amx("Blad w zapytaniu: %s [CheckDataM4A1]", Error)
 
if(FailState == TQUERY_CONNECT_FAILED) {
log_amx("Nie mozna podlaczyc sie do bazy danych.")
return PLUGIN_CONTINUE
}
else if(FailState == TQUERY_QUERY_FAILED) {
log_amx("Zapytanie anulowane [CheckDataM4A1]")
return PLUGIN_CONTINUE
}
 
if(SQL_MoreResults(Query)){
pM4A1[id][1] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Cyrex"))
pM4A1[id][2] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "DragonKing"))
pM4A1[id][3] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Assimov"))
pM4A1[id][4] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Nuclear"))
}
 
return PLUGIN_CONTINUE;
}
 
public CheckHandlerAWP(FailState, Handle:Query, Error[], Errorcode, Data[], DataSize)
{
new id = Data[0]
if(Errorcode)
log_amx("Blad w zapytaniu: %s [CheckDataAWP]", Error)
 
if(FailState == TQUERY_CONNECT_FAILED) {
log_amx("Nie mozna podlaczyc sie do bazy danych.")
return PLUGIN_CONTINUE
}
else if(FailState == TQUERY_QUERY_FAILED) {
log_amx("Zapytanie anulowane [CheckDataAWP]")
return PLUGIN_CONTINUE
}
 
if(SQL_MoreResults(Query)){
pAWP[id][1] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Hawking"))
pAWP[id][2] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Redline"))
pAWP[id][3] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Assimov"))
pAWP[id][4] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "DragonLore"))
}
 
return PLUGIN_CONTINUE;
}
 
public CheckHandlerDGL(FailState, Handle:Query, Error[], Errorcode, Data[], DataSize)
{
new id = Data[0]
if(Errorcode)
log_amx("Blad w zapytaniu: %s [CheckDataAWP]", Error)
 
if(FailState == TQUERY_CONNECT_FAILED) {
log_amx("Nie mozna podlaczyc sie do bazy danych.")
return PLUGIN_CONTINUE
}
else if(FailState == TQUERY_QUERY_FAILED) {
log_amx("Zapytanie anulowane [CheckDataAWP]")
return PLUGIN_CONTINUE
}
 
if(SQL_MoreResults(Query)){
pDGL[id][1] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Asking"))
pDGL[id][2] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Engraved"))
pDGL[id][3] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Conspiracy"))
pDGL[id][4] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Skrillex"))
}
 
return PLUGIN_CONTINUE;
}
 
public CheckHandlerCases(FailState, Handle:Query, Error[], Errorcode, Data[], DataSize)
{
new id = Data[0]
if(Errorcode)
log_amx("Blad w zapytaniu: %s [CheckDataCases]", Error)
 
if(FailState == TQUERY_CONNECT_FAILED) {
log_amx("Nie mozna podlaczyc sie do bazy danych.")
return PLUGIN_CONTINUE
}
else if(FailState == TQUERY_QUERY_FAILED) {
log_amx("Zapytanie anulowane [CheckDataCases]")
return PLUGIN_CONTINUE
}
 
if(SQL_MoreResults(Query)){
pKey[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "Klucz"))
pCaseAK47[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "CaseAK47"))
pCaseM4A1[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "CaseM4A1"))
pCaseAWP[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "CaseAWP"))
pCaseDGL[id] = SQL_ReadResult(Query, SQL_FieldNameToNum(Query, "CaseDGL"))
 
Loaded[id] = true;
}
 
return PLUGIN_CONTINUE;
}*/
 
public plugin_natives() {
register_native("set_player_case_ak47", "SetCaseAK47", 1);
register_native("get_player_case_ak47", "GetCaseAK47", 1);
register_native("set_player_case_m4a1", "SetCaseM4A1", 1);
register_native("get_player_case_m4a1", "GetCaseM4A1", 1);
register_native("set_player_case_awp", "SetCaseAWP", 1);
register_native("get_player_case_awp", "GetCaseAWP", 1);
register_native("set_player_case_dgl", "SetCaseDGL", 1);
register_native("get_player_case_dgl", "GetCaseDGL", 1);
register_native("set_player_case_famas", "SetCaseFamas", 1);
register_native("get_player_case_famas", "GetCaseFamas", 1);
register_native("set_player_key", "SetKey", 1);
register_native("get_player_key", "GetKey", 1);
}
 
public plugin_precache() {
PrecacheKnives();
PrecacheM4A1();
PrecacheAWP();
PrecacheAK47();
PrecacheDGL();
PrecacheFamas();
precache_sound("csgo/yay.mp3");
precache_sound("csgo/gotkey2.mp3");
}
 
public client_connect(id) {
TakeAK47(id);
TakeAWP(id);
TakeDGL(id);
TakeFamas(id);
TakeKnives(id);
TakeM4A1(id);
 
pKey[id] = 0
pCaseAK47[id] = 0
pCaseM4A1[id] = 0
pCaseAWP[id] = 0
pCaseDGL[id] = 0
pCaseFamas[id] = 0
Loaded[id] = false;
 
/*get_user_name(id, nazwa_gracza[id], 31);
LoadDataAK47(id)
LoadDataM4A1(id)
LoadDataAWP(id)
LoadDataDGL(id)
LoadDataFamas(id)
LoadDataKnife(id)
LoadDataCase(id)*/
LoadData(id);
set_task(25.0, "CheckData", id);
}
 
public client_disconnect(id) {
/*SaveDataAK47(id);
SaveDataM4A1(id);
SaveDataAWP(id);
SaveDataDGL(id);
SaveDataFamas(id);
SaveDataKnife(id);
SaveDataCase(id);*/
if(Loaded[id]) SaveData(id);
 
/*TakeAK47(id);
TakeAWP(id);
TakeDGL(id);
TakeFamas(id);
TakeKnives(id);
TakeM4A1(id);
pKey[id] = 0
pCaseAK47[id] = 0
pCaseM4A1[id] = 0
pCaseAWP[id] = 0
pCaseDGL[id] = 0
pCaseFamas[id] = 0*/
}
 
public SkinInfo(id)
show_motd(id, "skiny.txt", "Info Skiny");
 
public fwItemDeploy(wpn){
static id;
id = entity_get_edict(wpn, EV_ENT_owner)
weapon = cs_get_weapon_id(wpn)
 
if (id > 32 || id < 1)
return HAM_IGNORED;
 
SetKnifeSkin(id);
SetM4A1Skin(id);
SetAK47Skin(id);
SetAWPSkin(id);
SetDGLSkin(id);
SetFamasSkin(id);
 
return HAM_HANDLED;
}
 
public DeathMsg()
{
new kid = read_data(1);
new vid = read_data(2);
 
if(!is_user_alive(kid) || !is_user_connected(vid) || !is_user_connected(kid))
return PLUGIN_HANDLED;
 
if(random(100) < 3) {
pKey[kid]++;
set_hudmessage(0, 255, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
ShowSyncHudMsg(kid, g_hudmsg, "KLUCZ!")
client_cmd(kid, "mp3 play sound/csgo/gotkey2.mp3");
}
 
return PLUGIN_CONTINUE;
}
 
public bomb_planted(planter) 
{ 
if(random(100) < 20) {
pKey[planter]++;
set_hudmessage(0, 255, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
ShowSyncHudMsg(planter, g_hudmsg, "KLUCZ!")
client_cmd(planter, "mp3 play sound/csgo/gotkey2.mp3");
}
}
 
public bomb_defused(defuser)
{
if(random(100) < 20) {
pKey[defuser]++;
set_hudmessage(0, 255, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
ShowSyncHudMsg(defuser, g_hudmsg, "KLUCZ!")
client_cmd(defuser, "mp3 play sound/csgo/gotkey2.mp3");
}
}
 
public NowaRunda()
{
runda++;
if(runda % 2){
for(new id=1;id<=g_MaxPlayers;id++) {
if(!is_user_connected(id)) continue;
SaveData(id);
}
}
}
 
public SetCaseAK47(id, amount){
pCaseAK47[id] = amount;
}
 
public GetCaseAK47(id)
return pCaseAK47[id];
 
public SetCaseM4A1(id, amount){
pCaseM4A1[id] = amount;
}
 
public GetCaseM4A1(id)
return pCaseM4A1[id];
 
public SetCaseAWP(id, amount){
pCaseAWP[id] = amount;
}
 
public GetCaseAWP(id)
return pCaseAWP[id];
 
public SetCaseDGL(id, amount){
pCaseDGL[id] = amount;
}
 
public GetCaseDGL(id)
return pCaseDGL[id];
 
public SetCaseFamas(id, amount){
pCaseFamas[id] = amount;
}
 
public GetCaseFamas(id)
return pCaseFamas[id];
 
public SetKey(id, amount){
pKey[id] = amount;
}
 
public GetKey(id)
return pKey[id];
 
stock RandomPlayer(){
new g_PlayersIndex[33], g_Value;
 
for(new i = 1; i <= g_MaxPlayers; i++){
 
if(!is_user_connected(i)) continue;
if(cs_get_user_team(i) == CS_TEAM_SPECTATOR) continue;
if(Choosen[i]) continue;
 
g_PlayersIndex[g_Value] = i;
g_Value++;
}
 
return g_PlayersIndex[random(g_Value)];
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
 

Użytkownik Ps^chol ?! edytował ten post 22.04.2016 22:59

  • +
  • -
  • 0

Zachostuje komus serwery TS3. 51012506.

 

 

 

Pomogłem? Daj Lubie to ! Ciebie to nic nie kosztuje a mnie motywuje do dalszej pomocy


#2 Ps^chol ?!

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: 17
Początkujący

  • Postów:105
  • GG:
  • Imię:Kamil
  • Lokalizacja:Amxx.pl
Offline

Napisano 22.04.2016 23:24

A już doszlem jak to zrobić tyko teraz pytanie czy ktoś by podał komende na zapytanie zeby zrobić te Tabele potrzebne do podłączenia ? :/


  • +
  • -
  • 0

Zachostuje komus serwery TS3. 51012506.

 

 

 

Pomogłem? Daj Lubie to ! Ciebie to nic nie kosztuje a mnie motywuje do dalszej pomocy


#3 mayday245

    Najwiekszy krol c++

  • Zbanowany

Reputacja: 5
Nowy

  • Postów:292
  • Imię:Bartosz
  • Lokalizacja:Dzialdowo
Offline

Napisano 28.04.2016 05:55

Chory ***** jesteś za przeproszeniem? To jest silnik Darka a nie ***** podajesz autor żaden. Gdyby nie to że dark ma już na to wyjebane to bys miał ostre problemy.

Witam. Znam sie glownie na amxx, sourcemod, PHP, C++.   Masz zlecenie? Potrzebujesz czegos do szkoly? Pisz smialo kolego !

Ps. sygnature zmieniam, iz nijakiemu gówniarzowi zachcialo sie hejtowac :)

 


#4 tytusek

    Wszechmogący

  • Power User

Reputacja: 126
Zaawansowany

  • Postów:648
Online

Napisano 30.04.2016 22:31

Chory ***** jesteś za przeproszeniem? To jest silnik Darka a nie ***** podajesz autor żaden. Gdyby nie to że dark ma już na to wyjebane to bys miał ostre problemy.

a plugin jest gdzieś opublikowany że to jego silnik ?


  • +
  • -
  • 0

Dodatek do [Metamod] - AntyCheat (wykrywanie plików z cheatami)

 

Sprzedam WPLN na Pukawce, duże ilości jak i małe odnawialne co miesiąc, prawie zawsze coś mam na sprzedaż zainteresowany pisz PW

download.png

 

 


#5 mayday245

    Najwiekszy krol c++

  • Zbanowany

Reputacja: 5
Nowy

  • Postów:292
  • Imię:Bartosz
  • Lokalizacja:Dzialdowo
Offline

Napisano 01.05.2016 11:20

 

Chory ***** jesteś za przeproszeniem? To jest silnik Darka a nie ***** podajesz autor żaden. Gdyby nie to że dark ma już na to wyjebane to bys miał ostre problemy.

a plugin jest gdzieś opublikowany że to jego silnik ?

 

Ja zakupilem wczesniej ta cala paczke. Ale jest juz udostepnione na webmasteruj przez jakiegos j**anego gowniarza...


Witam. Znam sie glownie na amxx, sourcemod, PHP, C++.   Masz zlecenie? Potrzebujesz czegos do szkoly? Pisz smialo kolego !

Ps. sygnature zmieniam, iz nijakiemu gówniarzowi zachcialo sie hejtowac :)

 


#6 Linux'

    Pan Pomocny

  • Power User

Reputacja: 489
Wszechobecny

  • Postów:1426
  • Steam:steam
  • Imię:Sebastian
  • Lokalizacja:AmxMod i SourceMod
Online

Napisano 01.05.2016 11:34

Pamietam, ze modyfikowalem juz zapis tego pluginu na zlecenie poniewaz sa z nim problemy. Jezeli napiszesz zlecenie platne z prosba o naprawe zapisu, moge ci pomoc.


  • +
  • -
  • 0

Posiadam na sprzedaż w pełni odwzorowaną paczkę nowego coda do csgo. Kliknij by dowiedzieć się więcej!

 

- PISZE MODYFIKACJE.

- NAPRAWIAM POPSUTE PLUGINY.

- DZIALAM W DZIALACH AMXX/SOURCEMOD. MASZ ZLECENIE? PISZ.





Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych