Hello guys i need a plugin when the player join server he will get some AmmoPacks and didn't reset when map change or server restart like the defualt zp_starting_ammo_packs do
no i want to give everyone a amount of AmmoPacks only starting like if a player join server then he will get 1k AmmoPacks only if he is joining server for the first time
#define PLUGIN "Points Bank + Logger" #define VERSION "1.2" #define AUTHOR "Lord. Death."
// Mysql Information new Host[] = "" new User[] = "" new Pass[] = "" new Db[] = ""
new Handle:g_SqlTuple new g_Error[512] new Saved_Points[33] new bool:Loaded[33], cvar_connect_points public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) cvar_connect_points = register_cvar("zp_connect_points", "200") set_task(2.0,"MySql_Init") // set a task to activate the mysql_init } public load_points(id) { client_print(id, print_chat, "loaded points: %d", Saved_Points[id]) } public MySql_Init() { g_SqlTuple = SQL_MakeDbTuple(Host,User,Pass,Db)
new ErrorCode,Handle:SqlConnection = SQL_Connect(g_SqlTuple,ErrorCode,g_Error,charsmax(g_Error)) if(SqlConnection == Empty_Handle) set_fail_state(g_Error)
new Handle:Queries Queries = SQL_PrepareQuery(SqlConnection,"CREATE TABLE IF NOT EXISTS points (steamid varchar(32), nick varchar(32),exp INT(11))")