Quote:
Originally Posted by Striker black
The plugin shows the gifts but still does not show advertisement and no sounds are heard
#define PLUGIN_VERSION "1.3.2"
#define TAG_GIFT "{G}[{L}GIFTS{G}]\x01"
#define SND_REWARD1 "level/loud/climber.wav"
#define SND_REWARD2 "level/gnomeftw.wav"
The version 1.3.3 is already released?
The plugin can work without the need for database?
PHP Code:
#define DATABASE_CONFIG "l4dstats"
public OnConfigsExecuted() { GetCvars(); if (!ConnectDB()) { LogError("Connecting to database failed. Read error log for further details."); } }
bool:ConnectDB() { if (db != INVALID_HANDLE) return true;
if (SQL_CheckConfig(DATABASE_CONFIG)) { new String:Error[256]; db = SQL_Connect(DATABASE_CONFIG, true, Error, sizeof(Error));
if (db == INVALID_HANDLE) { LogError("Failed to connect to database: %s", Error); return false; }
if (!CheckDatabaseValidity()) { LogError("Database is missing required table or tables."); return false; } } else { LogError("Databases.cfg missing '%s' entry!", DATABASE_CONFIG); return false; }
return true; }
bool:CheckDatabaseValidity() { if (!SQL_FastQuery(db, "SELECT * FROM players WHERE 1 = 2")) { return false; }
return true; }
_____________________________________________ ______________________
|
This plugin was first intended for coop servers where they manage a player statistics system and earn points for each collected gift. Now the dependence on the database has been removed, but it would be advisable to work with a database and it may be the same one that you use for your player stats if you have one.
I attach the new version of the plugin (v1.3.4)