V.I.P System
Description Code: Select all
VIP system, basically you can create flags and assign to each flag some functions, abilities these abilities and functions are not limited.
Code: Select all
* This VIP System is associated with the AmxBans WEB Frame.
* API Support.
* MySql & File Saving methods.
* Has Expiration date auto remove.
* This mostly is very helpful for scripters/coders...
Code: Select all
*Cvars
vip_save_type (Default: 0 = File) / 1 = MySql.
vip_sql_table_prefix (Default: vips)
*Console Commands
amx_reloadvips
amx_available_vip_flags
amx_addvip
*Client Commands
amx_modifievips_menu
Code: Select all
PHP Code:
/* Header Generated by Natsheh */
#if defined _vip_core_included
#endinput
#endif
#define _vip_core_included
#if AMXX_VERSION_NUM >= 175
#pragma reqlib vip_core
#if !defined AMXMODX_NOAUTOLOAD
#pragma loadlib vip_core
#endif
#else
#pragma library vip_core
#endif
enum _:VIP_LOGIN_STATUS (<<= 1)
{
VLOGIN_PASS = 1, // a
VLOGIN_NAME, // b
VLOGIN_STEAMID, // c
VLOGIN_IP // d
}
/*
@Param NoParams
@Return NoReturns
@Info "this forward is used for creating vip flags using this native (register_vip_flag)"
*/
forward vip_flag_creation()
/*
@Param iFlag (Alphabets chars Only)
@Return iFlagID
@Info "iFlag must be one chars & alphabet only, use this function in vip_flag_creation forward"
*/
native register_vip_flag(const iFlag, const szFlag_info[])
/*
@Param id "user-id"
@Return "return user vip flags if user is a vip 0 otherwise"
*/
native get_user_vip(index)
/*
@Param authid "authid registered as VIP could be steamid, ip, name"
@Param bLog "if true log removing"
@Param bPermanent "if true remove vip from the file or database"
*/
native remove_user_vip(const authid[], const bool:bLog=false, const bool:bPermanent=false)
/*
@Param index "user index must be connected otherwise it will throw an error"
@Param password "vip password"
@Param method "login method via steamid or ip or name + password"
@Param bSaveInFile "if true it will save in file or database"
@Param szExpireDate "if its 0 or empty vip membership will never expire otherwise it take this format only ("month/day/year - hour:minute:second) "
*/
native set_user_vip(index, const vflags[], const password[]="", const method=VLOGIN_STEAMID, const bool:bSaveInFile=false, szExpireDate[])
Link Download: