Raised This Month: $32 Target: $400
 8% 

VIP Menu BUG [Help] !


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XxScripteRxX
Member
Join Date: Aug 2019
Old 01-14-2021 , 04:21   VIP Menu BUG [Help] !
Reply With Quote #1

This plugin is Works Perfect but Respwan chance can used 100 times of round but i want only ct's to use and 1 time of round to be can used - if used respwan form menu and hes dead to dont use again same of hp,gravity to be Thanks <3

Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cromchat>
#include <cstrike>
#include <fun>

#define PLUGIN "VipMenu"
#define VERSION "1.0"
#define AUTHOR "gadinkata"

#define VIP ADMIN_CHAT
#define ADMIN ADMIN_BAN
#define S.ADMIN ADMIN_IMMUNITY
#define VIPXP 50
#define SA.GRAVITION 0.6

new g_iVIPXP[33], g_iRespawn[33], g_iSADMIN[33]

const VipsXp = 3

const Respawn = 3

const SAdmin = 3

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)
	register_clcmd("say /vm", "glMenu")
	register_clcmd("say_team /vm", "glMenu")
	register_clcmd("say /vipmenu", "glMenu")
	register_clcmd("say_team /vipmenu", "glMenu")
	
	CC_SetPrefix("&x04[&x03VIP MENU&x04]") 
}

public OnPlayerSpawn(id)
{
	if(!is_user_connected(id))
	return;
	
	g_iVIPXP[id] = 0
	g_iSADMIN[id] = 0
	g_iRespawn[id] = 0
}

public glMenu(id)
{
	new iMenu = menu_create("\wV\yI\gP \rMENU", "glMenu_Handler");
	
	menu_additem(iMenu, "\w50HP [\rVIP \yPlayer's]", "", 0)
	menu_additem(iMenu, "\wRespwan [\rADMIN \yPlayer's]", "", 0)
	menu_additem(iMenu, "\wGravity 630 [\rS.ADMIN \yPlayer's]", "", 0)
	
	menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL)
	
	menu_display(id, iMenu, 0)
	
	return PLUGIN_HANDLED;
}

public glMenu_Handler(id, iMenu, iTem)
{
	if(iTem == MENU_EXIT)
	{
		menu_destroy(iMenu)
		return PLUGIN_HANDLED;
	}
	
	switch(iTem)
	{
		case 0:
		{	
			if(get_user_flags(id)  &  VIP &&  is_user_alive(id))
			{
			if(++g_iVIPXP[id] >= VipsXp)
			{
				CC_SendMessage(id, "&x03Try Again Next Round");
			}
			
			if(++g_iVIPXP[id] < VipsXp)
			{
				set_user_health(id, get_user_health(id) + VIPXP)
				
				CC_SendMessage(id, "&x03 You got 50HP");
			}
			}else{
				CC_SendMessage(id, "&x03 You have no access");
			}
		}
		
		case 1:
		{
			if(get_user_flags(id) & ADMIN && !is_user_alive(id))
			{
			if(++g_iRespawn[id] >= Respawn)
			{
				CC_SendMessage(id, "&x03OTry Again next Next Round");
			}
			if(++g_iRespawn[id] < Respawn)
			{
				ExecuteHamB(Ham_CS_RoundRespawn, id)
				
				CC_SendMessage(id, "&x03 You are respwaned this round");
			}
			}else{
				CC_SendMessage(id, "&x03 You have no access");
			}
		}
		
		case 2:
		{
			if(get_user_flags(id) & S.ADMIN && is_user_alive(id))
			{
			if(++g_iSADMIN[id] >= SAdmin)
			{
				CC_SendMessage(id, "&x03Try Again Next Round");
			}
			if(++g_iSADMIN[id] < SAdmin)
			{
				set_user_gravity(id, SA.GRAVITION)
				
				CC_SendMessage(id, "&x03 You Got 630 Gravity");
			}
			}else{
				CC_SendMessage(id, "&x03 You have no access");
			}
		}
	}
	
	menu_destroy(iMenu)
	return PLUGIN_HANDLED;
}

Last edited by XxScripteRxX; 01-14-2021 at 04:23.
XxScripteRxX is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 01-14-2021 , 06:35   Re: VIP Menu BUG [Help] !
Reply With Quote #2

PHP Code:
const Respawn 
->
PHP Code:
const Respawn 
and

PHP Code:
case 1:
        {
                        if(!(
cs_get_user_team(id) == CS_TEAM_CT)) return 
            
if(get_user_flags(id) & ADMIN && !is_user_alive(id))
            {
            if(++
g_iRespawn[id] >= Respawn)
            {
                
CC_SendMessage(id"&x03OTry Again next Next Round");
            }
            if(++
g_iRespawn[id] < Respawn)
            {
                
ExecuteHamB(Ham_CS_RoundRespawnid)
                
                
CC_SendMessage(id"&x03 You are respwaned this round");
            }
            }else{
                
CC_SendMessage(id"&x03 You have no access");
            }
        } 
lexzor is offline
XxScripteRxX
Member
Join Date: Aug 2019
Old 01-15-2021 , 11:50   Re: VIP Menu BUG [Help] !
Reply With Quote #3

Yes but wehen i try to bought Respwan not giving me.
XxScripteRxX is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode