Approved VIP System

Plug-ins compatibility with Zombie Escape 1.x only!


johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#21

Post by johnnysins2000 » 6 years ago

Spir0x wrote: 6 years ago i installed it with para and missing parachute model.
Johnny please read this and repond me it's nice ?
http://escapers-zone.xyz/viewtopic.php?f=11&t=1938
It is not missing bro the Person who posted The Parachute Plugin dd not included parachute model...

ZE DEV TEAM will add it Later

So just be Patient And wait for their New VIP system Release

Just suggest them ideas
Nobody Is That Busy If They Make Time :roll:

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#22

Post by Raheem » 6 years ago

Yeah johnny this what will happen exactly.
He who fails to plan is planning to fail

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#23

Post by Raheem » 6 years ago

New version: 1.1 out.
He who fails to plan is planning to fail

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#24

Post by johnnysins2000 » 6 years ago

Yes Now the VIP system Looks Perfect ;)

Nice Hard Work Raheem

Just 1 more suggestion for the new mod version release

U said about VIP extra Items will appear in Menu?

I was going to suggest it that the Menu should Be Like This

Say /vm

[ZE] V.I.P Menu

1- Weapons
2- Test
3- Test

In Number 2 and 3 they can add Anything

And All the VIP extra Items Will appear In Weapons Menu

And One More Suggestion

U will have to make a new flag

Flag E access to open VIP menu Or not
Nobody Is That Busy If They Make Time :roll:

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#25

Post by Spir0x » 6 years ago

Perfect but still missing parachute model.

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#26

Post by Spir0x » 6 years ago

why i cant compile this again fix it please.

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#27

Post by johnnysins2000 » 6 years ago

Spir0x wrote: 6 years ago why i cant compile this again fix it please.
Show the Compilation error?
Nobody Is That Busy If They Make Time :roll:

User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#28

Post by Night Fury » 6 years ago

Spir0x wrote: 6 years ago why i cant compile this again fix it please.
LEARN HOW TO COMPILE FROM HERE!!
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#29

Post by Raheem » 6 years ago

Fix what just give us the compiling error so we can tell you where you fails.
He who fails to plan is planning to fail

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#30

Post by Spir0x » 6 years ago

I just modified VIP *** Has connected to the server to
VIP ** Connected. like the old

Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#31

Post by Raheem » 6 years ago

Upload the file you try to compile.
He who fails to plan is planning to fail

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#32

Post by Spir0x » 6 years ago

how ? you mean the code?

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#33

Post by Spir0x » 6 years ago

that is the code:
  • Code: Select all

    #include <ze_vip>
    
    // Variables
    new g_szPasswordKey[65], g_szPassword[65]
    new bool:g_bIsUserVIP[33], bool:g_bSetVIP[33], g_iFlags[33], bool:g_bIsHappyHour
    
    // Const.
    static const COLOR[] = "^x04"
    static const g_szLocalFile[] = "addons/amxmodx/configs/ze_vips.ini"
    
    new const szCommands[][] =
    {
    	"say /vip",
    	"say /vips",
    	"say_team /vip",
    	"say_team /vips"
    }
    
    // Cvars
    new Cvar_Show_VIP_Scoreboard, Cvar_Give_Multijump, Cvar_Connect_Message, Cvar_Admin_Contact,
    Cvar_Give_Parachute, Cvar_Enable_Happy_Hours, Cvar_Happy_Hour_Start, Cvar_Happy_Hour_End,
    Cvar_VIP_Flag
    
    public plugin_natives()
    {
    	register_native("ze_get_vip_flags", "native_ze_get_vip_flags", 1)
    	register_native("ze_set_vip_flags", "native_ze_set_vip_flags", 1)
    }
    
    public plugin_init()
    {
    	register_plugin("[ZE] Zombie Escape VIP", VIP_VERSION, AUTHORS)
    	
    	// Hook Chains
    	RegisterHookChain(RG_CBasePlayer_Spawn, "Fw_PlayerSpawn_Post", 1)
    	
    	// Cvars
    	Cvar_Connect_Message = register_cvar("ze_connect_message", "1")
    	Cvar_Admin_Contact = register_cvar("ze_admin_contact", "Admin Name")
    	Cvar_Give_Multijump = register_cvar("ze_give_vip_multijump", "1")
    	Cvar_Show_VIP_Scoreboard = register_cvar("ze_show_vip_scoreboard", "1")
    	Cvar_Give_Parachute = register_cvar("ze_give_vip_parachute", "1")
    	Cvar_Enable_Happy_Hours = register_cvar("ze_enable_happy_hours", "1")
    	Cvar_Happy_Hour_Start = register_cvar("ze_happy_hours_start", "9")
    	Cvar_Happy_Hour_End = register_cvar("ze_happy_hours_end", "12")
    	Cvar_VIP_Flag = register_cvar("ze_happy_hours_vip_flags", "abcd")
    	
    	register_cvar("ze_vip_version", VIP_VERSION, FCVAR_SERVER|FCVAR_SPONLY)
    	set_cvar_string("ze_vip_version", VIP_VERSION)
    	
    	// Commands
    	for (new i = 0; i < charsmax(szCommands); i++)
    		register_clcmd(szCommands[i], "CmdVIP")
    
    	register_clcmd("say /getvip", "CmdMotd")
    	register_clcmd("say_team /getvip", "CmdMotd")
    	
    	// Get Password Key
    	get_cvar_string("amx_password_field", g_szPasswordKey, charsmax(g_szPasswordKey))
    	
    	// Initialize Arrays
    	arrayset(g_bIsUserVIP, false, 32)
    	arrayset(g_bSetVIP, false, 32)
    }
    
    public plugin_cfg()
    {
    	// Get our configiration file and Execute it
    	new szCfgDir[64]
    	get_localinfo("amxx_configsdir", szCfgDir, charsmax(szCfgDir))
    	server_cmd("exec %s/ze_vip.cfg", szCfgDir)
    }
    
    public client_authorized(id)
    {
    	// Get password from Setinfo
    	new szPassword[65]
    	get_user_info(id, g_szPasswordKey, szPassword, charsmax(szPassword))
    	
    	// Player VIP?
    	ze_get_vip_flags(id)
    	
    	if (g_bIsUserVIP[id])
    	{
    		if (!equal(szPassword, g_szPassword))
    		{
    			// VIP and wrong Password? Kick him
    			client_cmd(id, "echo ^"* VIP Invalid Password!^"")
    			server_cmd("kick #%d ^"You have no entry to the server...^"", get_user_userid(id))
    		}
    		else
    		{
    			client_cmd(id, "echo ^"* VIP Password Accepted!^"")
    		}
    	}
    }
    
    public client_putinserver(id)
    {
    	if (ze_get_vip_flags(id) & VIP_A)
    	{
    		if (get_pcvar_num(Cvar_Connect_Message) != 0)
    		{
    			new szName[32]
    			get_user_name(id, szName, charsmax(szName))
    			ze_colored_print(0, "!tVIP !g%s !tConnected!y.", szName)
    		}
    	}
    }
    
    public CmdMotd(id)
    {
    	show_motd(id, "ze_vip.txt", "Zombie Escape VIP")
    }
    
    public CmdVIP(id)
    {
    	set_task(0.1, "Print_VIP_Names", id)
    }
    
    public Print_VIP_Names(id)
    {
    	new szAdminName[33][32], szMessage[256]
    	new szContactInfo[256], szContact[112]
    	new id, iCount, x, iLen
    	
    	for (id = 1 ; id <= get_member_game(m_nMaxPlayers) ; id++)
    	{
    		if (is_user_connected(id) && (ze_get_vip_flags(id) & VIP_A))
    		{
    			get_user_name(id, szAdminName[iCount++], charsmax(szAdminName))
    		}
    
    		iLen = format(szMessage, charsmax(szMessage), "%sVIPs ONLINE: ", COLOR)
    		
    		if (iCount > 0)
    		{
    			for (x = 0 ; x < iCount ; x++)
    			{
    				iLen += format(szMessage[iLen], charsmax(szMessage) - iLen, "%s%s ", szAdminName[x], x < (iCount - 1) ? ", " : "")
    				
    				if (iLen > 96 )
    				{
    					print_message(id, szMessage)
    					iLen = format(szMessage, charsmax(szMessage), "%s ", COLOR)
    				}
    			}
    			
    			print_message(id, szMessage)
    		}
    		else
    		{
    			iLen += format(szMessage[iLen], charsmax(szMessage) - iLen, "No VIPs online.")
    			print_message(id, szMessage)
    		}
    		
    		get_pcvar_string(Cvar_Admin_Contact, szContact, charsmax(szContact))
    		
    		if (szContact[0])
    		{
    			format(szContactInfo, charsmax(szContactInfo), "%s- Contact Server Admin -- %s", COLOR, szContact)
    			print_message(id, szContactInfo)
    		}
    	}
    }
    
    public Fw_PlayerSpawn_Post(id)
    {
    	if (!is_user_alive(id))
    		return
    	
    	Happy_Hours()
    	
    	if (g_bIsHappyHour == true && get_pcvar_num(Cvar_Enable_Happy_Hours) != 0)
    	{
    		new szFlags[VIP_MAX_FLAGS]
    		get_pcvar_string(Cvar_VIP_Flag, szFlags, charsmax(szFlags))
    		ze_set_vip_flags(id, read_flags(szFlags))
    	}
    	
    	// Get password from Setinfo
    	new szPassword[65]
    	get_user_info(id, g_szPasswordKey, szPassword, charsmax(szPassword))
    	
    	ze_get_vip_flags(id)
    	
    	if (g_bIsUserVIP[id])
    	{
    		if (!equal(szPassword, g_szPassword))
    		{
    			// VIP and wrong Password? Kick him
    			client_cmd(id, "echo ^"* VIP Invalid Password!^"")
    			server_cmd("kick #%d ^"You have no entry to the server...^"", get_user_userid(id))
    		}
    		else
    		{
    			client_cmd(id, "echo ^"* VIP Password Accepted!^"")
    		}
    	}
    	
    	if (ze_get_vip_flags(id) & VIP_B)
    	{
    		if (get_pcvar_num(Cvar_Give_Multijump) != 0)
    		{
    			ze_give_user_multijump(id)
    		}
    	}
    	
    	if (ze_get_vip_flags(id) & VIP_C)
    	{
    		if (get_pcvar_num(Cvar_Give_Parachute) != 0)
    		{
    			ze_give_user_parachute(id)
    		}
    	}
    
    	set_task(0.1, "Update_Attribute", id, _, _, "a", 10)
    }
    
    public ze_roundend(WinTeam)
    {
    	for (new i = 0; i < get_member_game(m_nMaxPlayers); i++)
    	{
    		g_bSetVIP[i] = false
    	}
    }
    
    public Update_Attribute(id)
    {
    	if ((ze_get_vip_flags(id) & VIP_D) && get_pcvar_num(Cvar_Show_VIP_Scoreboard) != 0)
    	{
    		message_begin(MSG_ALL, get_user_msgid("ScoreAttrib"), {0, 0, 0}, id)
    		write_byte(id)
    		write_byte(4)
    		message_end()
    	}
    }
    
    public native_ze_get_vip_flags(id)
    {
    	if (file_exists(g_szLocalFile))
    	{
    		new iMaxLines = file_size(g_szLocalFile, 1)
    		new szLineToRead[129]
    		new szSteamID[35], szName[32]
    		new szParse[3][65]
    		
    		get_user_authid(id, szSteamID, charsmax(szSteamID))
    		get_user_name(id, szName, charsmax(szName))
    		
    		for (new iLineToRead = 0; iLineToRead < iMaxLines; iLineToRead++)
    		{
    			read_file(g_szLocalFile, iLineToRead, szLineToRead, charsmax(szLineToRead))
    			parse(szLineToRead, szParse[0], 64, szParse[1], 64, szParse[2], 64)
    			
    			remove_quotes(szParse[0])
    			remove_quotes(szParse[1])
    			remove_quotes(szParse[2])
    			
    			if (!szParse[0][0] || szParse[0][0] == ';' || (szParse[0][0] == '/' && szParse[0][1] == '/'))
    				continue
    			
    			if ((equali(szSteamID, szParse[0]) && szParse[0][0] == 'S') || equali(szName, szParse[0]))
    			{
    				g_bIsUserVIP[id] = true
    				copy(g_szPassword, charsmax(g_szPassword), szParse[1])
    
    				return read_flags(szParse[2])
    			}
    		}
    	}
    	else
    	{
    		write_file(g_szLocalFile, "; Zombie Escape VIP^n^n;Flags:^n")
    		write_file(g_szLocalFile, "; a -- Connect Message and VIP List")
    		write_file(g_szLocalFile, "; b -- Multi-Jump")
    		write_file(g_szLocalFile, "; c -- Parachute")
    		write_file(g_szLocalFile, "; d -- Scoreboard Attrib.^n^n;Examples:^n")
    		write_file(g_szLocalFile, "; ^"Steam/Nick^" ^"Password^" ^"Flags^"")
    	}
    	
    	g_bIsUserVIP[id] = false
    	
    	if (g_bSetVIP[id] == true)
    	{
    		return g_iFlags[id]
    	}
    	else
    	{
    		return VIP_Z
    	}
    }
    
    public native_ze_set_vip_flags(id, Flags)
    {
    	g_bSetVIP[id] = true
    	g_iFlags[id] = Flags
    	ze_get_vip_flags(id)
    }
    
    stock Happy_Hours()
    {
    	new szTime[3]
    	get_time("%H", szTime, charsmax(szTime))
    
    	if(get_pcvar_num(Cvar_Happy_Hour_End) > str_to_num(szTime) >= get_pcvar_num(Cvar_Happy_Hour_Start))
    	{
            g_bIsHappyHour = true
    	}
    	else
    	{
    		g_bIsHappyHour = false
    	}
    }
    
    stock print_message(id, msg[])
    {
    	message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)
    	write_byte(id)
    	write_string(msg)
    	message_end()
    }
    /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
    *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par }
    */
    
That is the file:
https://www.mediafire.com/?gulahelqt5hbpu2
Last edited by Raheem 6 years ago, edited 1 time in total.
Reason: Added code tag

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#34

Post by Raheem » 6 years ago

It compile. Fix your compiler.
  • Image
He who fails to plan is planning to fail

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#35

Post by Spir0x » 6 years ago

you mean i download latest compiler?

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#36

Post by johnnysins2000 » 6 years ago

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Number of arguments does not match definition on line 253
Warning: Function "native_ze_get_vip_flags" should return a value on line 292

1 Error.
Could not locate output file E:\My old windows 8 things\amxmodx\AMX Mod X\amxxstudio\ZE_SMA\ze_vip_system.amx (compile failed).


sorry this sma is not compiling raheem :P
Nobody Is That Busy If They Make Time :roll:

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#37

Post by Spir0x » 6 years ago

Yes :/

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#38

Post by Raheem » 6 years ago

This error and warning will appear if you using 1.8.2 compiler as this compiler is old and can't understand good what i need to say :lol: :lol:
If you using 1.8.3 compiler you will not find error or warning. The file updated, now you can compile with 1.8.2 compiler.
He who fails to plan is planning to fail

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#39

Post by Raheem » 6 years ago

Trail plugin for VIP for our new VIP system:
He who fails to plan is planning to fail

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#40

Post by Spir0x » 6 years ago

Raheem if you can update vip system and i have idea actually not new :V
so u update this and when round starts server give m249 automatically to vip's wish u understand it.

Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Who is online

Users browsing this forum: No registered users and 0 guests