Raised This Month: $ Target: $400
 0% 

Jb vip


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
deadbunny
Member
Join Date: Apr 2013
Old 05-23-2013 , 05:50   Jb vip
Reply With Quote #1

I made other plugin VIP for jailbreak, but I give some warnings. Can you fix for me the warnings and to put the vip on ADMIN_LEVEL_H ?
Code:
#pragma semicolon 1

#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fun>
#include <hamsandwich>
///
#define ADMIN_LEVE_H ADMIN_LEVEL_H

// Define the Plugin Version
new const VERSION[] = { "2.0" };

// PREFIX
new const PREFIX[] = { "!g[VIP]!n" };

new VipUsed[33];
new HasSpeed;

new Float:fast_speed = 450.0;
new Float:normal_speed = 250.0;

public plugin_init()
{
	register_plugin("JailBreak: VIP Menu", VERSION, "zBANG !!");

	RegisterHam(Ham_Spawn, "player", "FwdHamSpawn_Post", 1);
	RegisterHam( Ham_Item_PreFrame, "player", "FwdPreFrame_Post", 1);
	
	register_clcmd("say /vipmenu", "cmdVmenu");
	register_clcmd("say_team /vipmenu", "cmdVmenu");
	register_clcmd("say /vm", "cmdVmenu");
	register_clcmd("say_team /vm", "cmdVmenu");
	register_clcmd("say /vmenu", "cmdVmenu");
	register_clcmd("say_team /vmenu", "cmdVmenu");
}

public FwdPreFrame_Post(id)
{
	if(!is_user_alive(id))
	{
		return PLUGIN_HANDLED;
	}

	if(!HasSpeed)
	{
		return PLUGIN_HANDLED;
	}
	
	else if(HasSpeed)
	{
		set_user_maxspeed(id, fast_speed);
	}
	
	return PLUGIN_HANDLED;
}

public FwdHamSpawn_Post(id)
{
	HasSpeed = false;
	VipUsed[id] = false;
	set_user_maxspeed(id, normal_speed);
	set_user_rendering( id, _, 0, 0, 0, _, 0 );  
}

public cmdVmenu(id)
{
	if(cs_get_user_team(id) == CS_TEAM_CT && get_user_flags(id) & ADMIN_LEVEL_H && !VipUsed[id])
	{
		VipCTMenu(id);
	}
	
	else if(cs_get_user_team(id) == CS_TEAM_T && get_user_flags(id) & ADMIN_LEVEL_H && !VipUsed[id])
	{
		VipTMenu(id);
	}
	
	else if(VipUsed[id])
	{
		client_printc(id, "%s !tAi folosit deja !gmenu !tpentru !gVIP !t, il mai poti folosi !gurmatoarea runda !t!", PREFIX);
	}
	
	else
	{
		client_printc(id, "%s !tNu ai acces la menu !gVIP!t.Vrei si tu !gVIP !t? Contact [email protected] !t!", PREFIX);
		return PLUGIN_HANDLED;
	}
	
	return PLUGIN_HANDLED;
}

public VipCTMenu(id)
{
	new menu = menu_create("yJailBreak VIP Menu:^nr", "VipCTMenu_handler");

	menu_additem(menu, "wM4a1 + Awp + Deagle", "1", 0);
	menu_additem(menu, "w+50 Viata si +100 Armura", "2", 0);
	menu_additem(menu, "wPachet Grenade", "3", 0);
	menu_additem(menu, "wViteza", "4", 0);
	menu_additem(menu, "wGravitatie", "5", 0);
	menu_additem(menu, "wInvizibilitate", "6", 0);
	menu_additem(menu, "wStralucire [Rosie]", "7", 0);
	menu_additem(menu, "wStralucire [Galbena]", "8", 0);
	menu_additem(menu, "wStralucire [Cyan]", "9", 0);
	menu_additem(menu, "wStralucire [Verde]", "10", 0);
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0);
}

public VipCTMenu_handler(id, menu, item)
{
	if( item == MENU_EXIT )
	{
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}

	new data[6], iName[64];
	new access, callback;
	menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);

	new key = str_to_num(data);

	switch(key)
	{
		case 1:
		{
			give_item(id, "weapon_m4a1");
			give_item(id, "weapon_awp");
			give_item(id, "weapon_deagle");
			cs_set_user_bpammo(id, CSW_M4A1, 200);
			cs_set_user_bpammo(id, CSW_AWP, 200);
			cs_set_user_bpammo(id, CSW_DEAGLE, 200);
			
			VipUsed[id] = true;
			
		  	client_printc(id, "%s !tAi primit un !gM4a1!t,!gAwp !tsi un !gDeagle !ttoate cu munitie !g200 !t!", PREFIX);
		}
                                          case 2:
		{
			set_user_health(id, get_user_health(id) + 50);
			set_user_armor(id, get_user_armor(id) + 100);
			VipUsed[id] = true;
			
			client_printc(id, "%s !tAi primit !g50 Viata si 100 Armura !t!", PREFIX);
		}
		case 3:
		{
			give_item(id, "weapon_hegrenade");
			give_item(id, "weapon_flashbang");
			give_item(id, "weapon_flashbang");
			
			VipUsed[id] = true;
			
		  	client_printc(id, "%s !tAi primit un !gpachet de grenade,!tacesta contine !g[He,Flash] !t!", PREFIX);
		}
		case 4:
		{
			VipUsed[id] = true;
			HasSpeed = true;
			
			set_user_maxspeed(id, fast_speed);
			
			client_printc(id, "%s !tAi primit !gviteza !tmai !gmare decat cea normala !t!", PREFIX);
		}
		case 5:        
		{                   
                                                               set_user_gravity(id, 0.30);
			
			VipUsed[id] = true;
			
		  	client_printc(id, "%s !tAi primit !gGravitatie !t!", PREFIX);
		}
                                          case 6:
		{
			set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransAdd,17);
			
			VipUsed[id] = true;
			
		  	client_printc(id, "%s !tAi primit !ginvizibilitate [83%] !t!", PREFIX);
		}
                                          case 7:
		{
			set_user_rendering(id, kRenderFxGlowShell, 250, 010, 010, kRenderTransAlpha, 100);
			
			VipUsed[id] = true;
			
		  	client_printc(id, "%s !tAi primit o !gstralucire rosie !t!", PREFIX);
		}
                                          case 8:
		{
			set_user_rendering(id, kRenderFxGlowShell, 250, 250, 010, kRenderTransAlpha, 100);
			
			VipUsed[id] = true;
			
		  	client_printc(id, "%s !tAi primit o !gstralucire galbena !t!", PREFIX);
		}
                                          case 9:
		{
			set_user_rendering(id, kRenderFxGlowShell, 000, 255, 255, kRenderTransAlpha, 100);
			
			VipUsed[id] = true;
			
		  	client_printc(id, "%s !tAi primit o !gstralucire cyan !t!", PREFIX);
		}
                                          case 10:
		{
			set_user_rendering(id, kRenderFxGlowShell, 010, 250, 010, kRenderTransAlpha, 100);
			
			VipUsed[id] = true;
			
		  	client_printc(id, "%s !tAi primit o !gstralucire verde !t!", PREFIX);
		}                   
	}

	menu_destroy(menu);
	return PLUGIN_HANDLED;
}

public VipTMenu(id)
{
	new menu = menu_create("yJailBreak VIP Menu:^nr", "VipTMenu_handler");

	 menu_additem(menu, "Gravitate Scazuta", "1", 0); 
    menu_additem(menu, "Invizibilitate", "2", 0); 
    menu_additem(menu, "Viteza", "3", 0); 
    menu_additem(menu, "Droguri", "4", 0); 
    menu_additem(menu, "Viata", "5", 0); 
    menu_additem(menu, "Armura", "6", 0); 
    menu_additem(menu, "Deagle cu 1 glont", "7", 0); 
    menu_additem(menu, "Glock cu 3 gloante", "8", 0);
    menu_additem(menu, "USP cu 2 gloante", "9", 0);
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0);
}

public VipTMenu_handler(id, menu, item)
{
	if( item == MENU_EXIT )
	{
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}

	new data[6], iName[64];
	new access, callback;
	menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);

	new key = str_to_num(data);

	switch(key)
	{
		case 1:
		{
set_user_gravity(id, 0.4375); 
            VipUsed[id] = true; 
             
            client_printc(id, "%s Ai cumparat !gGravitate!n", PREFIX);
		}
		case 2:
		{
set_user_rendering(id, kRenderFxNone, 50, 50, 50, kRenderTransAdd, 50);
            set_user_footsteps(id, 1); 
            VipUsed[id] = true; 
             
            client_printc(id, "%s Ai cumparat !gInvizibilitate!n", PREFIX);
		}
		case 3:
		{
VipUsed[id] = true; 
            HasSpeed = true; 
            set_user_maxspeed(id, 500.0); 
             
            client_printc(id, "%s Ai cumparat !gViteza!n", PREFIX);
		}
                case 4:
		{
set_user_armor(id, 150);
	set_user_health(id, 200);
	set_user_maxspeed(id, 380.0); 
	client_printc(id, "%s[^4JbX.FreakZ.Ro^3] !n%s!n a folosit !gVIP!g pt a lua !tDroguri!t !");
		}
                case 5:
		{ 
VipUsed[id] = true;
            set_user_health(id, 200);  
            client_printc(id, "%s Ai cumparat !gViata!n", PREFIX);                                                
		}
                case 6:
		{
VipUsed[id] = true; 
            set_user_armor(id, 200); 
             
            client_printc(id, "%s Ai cumparat !gArmura!n", PREFIX);
		}
                case 7:
		{
cs_set_weapon_ammo(give_item(id, "weapon_deagle"), 1); 
            VipUsed[id] = true; 
             
            client_printc(id, "%s Ai cumparat !gDeagle cu 1 glont!n", PREFIX);
		}
                case 8:
		{
cs_set_weapon_ammo(give_item(id, "weapon_glock18"), 3);
            VipUsed[id] = true; 
             
            client_printc(id, "%s Ai cumparat !gGlock cu 3 gloante!n", PREFIX);
		}
                case 9:
		{
 VipUsed[id] = true; 
            cs_set_weapon_ammo(give_item(id, "weapon_usp"), 2);
             
            client_printc(id, "%s Ai cumparat !uSp cu 2 gloante!n", PREFIX);
		}                                         
	}

	menu_destroy(menu);
	return PLUGIN_HANDLED;
}

// Colour Chat
stock client_printc(const id, const input[], any:...)
{
    new count = 1, players[32];
    static msg[191];
    vformat(msg, 190, input, 3);
    
    replace_all(msg, 190, "!g", "^x04"); // Green Color
    replace_all(msg, 190, "!n", "^x01"); // Default Color
    replace_all(msg, 190, "!t", "^x03"); // Team Color
    
    if (id) players[0] = id; else get_players(players, count, "ch");
    {
        for (new i = 0; i < count; i++)
        {
            if (is_user_connected(players[i]))
            {
                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
                write_byte(players[i]);
                write_string(msg);
                message_end();
            }
        }
    }
}
Help me, please !!!!!!!!!!!
deadbunny is offline
oxygen935
Veteran Member
Join Date: Jun 2012
Location: Athens, Greece
Old 05-23-2013 , 06:16   Re: Jb vip
Reply With Quote #2

As i am on mobile i cannot see the warning BUT:
1) delete the #define ADMIN_LEVE_H as you never used that
2) Put the messages on english otherwise put this thread on the multilingual section

If again there is a warning just post it cause as i told you i am waiting for new internet connection and now i don't have internet
__________________
Quote:
Originally Posted by quark View Post
You're a genius
Stopped any pawn work cause of university for computer science
oxygen935 is offline
Send a message via Skype™ to oxygen935
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-23-2013 , 06:19   Re: Jb vip
Reply With Quote #3

indent your code and it compiles fine.
__________________
Blizzard_87 is offline
deadbunny
Member
Join Date: Apr 2013
Old 05-23-2013 , 11:39   Re: Jb vip
Reply With Quote #4

Blizzard, it compiles but, with warnings...:
Code:
 /tmp/textscCZX0.sma(170) : warning 217: loose indentation
/tmp/textscCZX0.sma(224) : warning 217: loose indentation
/tmp/textscCZX0.sma(225) : warning 217: loose indentation
/tmp/textscCZX0.sma(234) : warning 217: loose indentation
/tmp/textscCZX0.sma(257) : warning 217: loose indentation
/tmp/textscCZX0.sma(264) : warning 217: loose indentation
/tmp/textscCZX0.sma(272) : warning 217: loose indentation
/tmp/textscCZX0.sma(280) : warning 217: loose indentation
/tmp/textscCZX0.sma(287) : warning 217: loose indentation
/tmp/textscCZX0.sma(293) : warning 217: loose indentation
/tmp/textscCZX0.sma(300) : warning 217: loose indentation
/tmp/textscCZX0.sma(307) : warning 217: loose indentation
/tmp/textscCZX0.sma(314) : warning 217: loose indentation
Header size:           1340 bytes
Code size:             9904 bytes
Data size:             8072 bytes
Stack/heap size:      16384 bytes; estimated max. usage=139 cells (556 bytes)
Total requirements:   35700 bytes

13 Warnings.
Done.
And, don't work on my server... FIX PLEASE !
deadbunny is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 05-23-2013 , 12:14   Re: Jb vip
Reply With Quote #5

You have 2 threads about the same problem.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
hLiaS
Senior Member
Join Date: Aug 2011
Location: In My Holly Dreams
Old 05-23-2013 , 12:14   Re: Jb vip
Reply With Quote #6

without loose indentation
Attached Files
File Type: sma Get Plugin or Get Source (yourvip.sma - 785 views - 8.6 KB)
__________________
.:My Plugins:.
WordGame

If you want anything add me to skype: hlias.zaxos or on steam Larisaios
hLiaS is offline
Send a message via Skype™ to hLiaS
deadbunny
Member
Join Date: Apr 2013
Old 05-23-2013 , 15:19   Re: Jb vip
Reply With Quote #7

Doesn't work... I have ADMIN_LEVEL_H in my acces, and, when I type /vipmenu the menu doesn't appears.
deadbunny is offline
hLiaS
Senior Member
Join Date: Aug 2011
Location: In My Holly Dreams
Old 05-23-2013 , 15:31   Re: Jb vip
Reply With Quote #8

now it's ok???
Attached Files
File Type: sma Get Plugin or Get Source (yourvip.sma - 767 views - 8.6 KB)
__________________
.:My Plugins:.
WordGame

If you want anything add me to skype: hlias.zaxos or on steam Larisaios
hLiaS is offline
Send a message via Skype™ to hLiaS
deadbunny
Member
Join Date: Apr 2013
Old 05-24-2013 , 02:15   Re: Jb vip
Reply With Quote #9

Doesn't work.. :-w when I type /vipmenu the menu doesn't appears
deadbunny is offline
deadbunny
Member
Join Date: Apr 2013
Old 05-24-2013 , 02:40   Re: Jb vip
Reply With Quote #10

UP ! When I type /vipmenu and I'm Terro the menu doesn't appears but when I'm CT the menu appears !
deadbunny is offline
Reply



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 16:22.


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