Raised This Month: $ Target: $400
 0% 

Help with VIP Menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Fr0sty_GR
Junior Member
Join Date: Jun 2014
Old 06-12-2014 , 14:22   Help with VIP Menu
Reply With Quote #1

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fun>
#include <hamsandwich>

#define PLUGIN "JailBreak VIP v2.0"
#define VERSION "2.0"
#define AUTHOR "TheHacker1998"

#define ADMIN_JBVIP ADMIN_RESERVATION

new cvarLongjumpForce, cvarLongjumpHeight, cvarLongjumpCooldown
new p_speed
new p_advertises
new p_gravity
new HP
new Armor
new HasGravity[33]
new HasSpeed[33]
new HasSpeed2[33]
new HasSpeed3[33]
new HasMulti[33]
new jumpnum[33]
new bool:dojump[33]
new bool:longJump[33]
new Float:lastLongJumpTime[33]
new const saychatprefix[] = { "!g[!nHell-Gaming!g]!n" }

public plugin_init()
    register_plugin("JailBreak_VIP", "2.0", "TheHacker1998");
    RegisterHam(Ham_Spawn, "player", "FwdHamSpawn_Post", 1);
    register_event("HLTV", "NewRound", "a", "1=0", "2=0");
    register_event("CurWeapon", "HookCurWeapon", "be", "1=1");
    
     g_max_clients = get_maxplayers();
}

	//Cvars
	cvarLongjumpForce = register_cvar("vip_longjump_force", "550")
	cvarLongjumpHeight = register_cvar("vip_longjump_height", "255")
	cvarLongjumpCooldown = register_cvar("vip_longjump_cooldown", "5.0")
	p_speed = register_cvar("vip_maxspeed", "400.0")
	p_maxjumps = register_cvar("vip_maxjumps", "2")
	p_advertises = register_cvar("vip_advertisements", "1")
	p_gravity = register_cvar("vip_gravity", "550")
	
	//Advertise
	set_task(30.0, "Task_Advertise", 0, _, _, "b")
	
	//Add Cfg File for cvars(no need to add on amxx.cfg)
	new configsDir[64];
	get_localinfo("amxx_configsdir", configsDir, charsmax(configsDir))
	server_cmd("exec %s/JailBreak_VIP.cfg", configsDir)
	
	//Add lang file for messages
	register_dictionary("JailBreak_VIP.txt")
	
         //CLMDS
         register_clcmd("say vmenu", "cmdVmenu");
         register_clcmd("say /vmenu", "cmdVmenu");
         register_clcmd("say_team vmenu", "cmdVmenu");
         register_clcmd("say_team /vmenu", "cmdVmenu");
	 
	return PLUGIN_CONTINUE
}

public cmdVmenu(id)
    if(is_user_alive(id) && get_user_flags(id) & ADMIN_JBVIP && !( VipUsed[id] ) )
    {
        VipMenu(id);
    }
    else if(VipUsed[id])
    {
        client_printc(id, "%s !g[!nHell-Gaming!g]!nVIP Menu is already used this Round!g! !nTry next Round!g!", PREFIX);	
    }
        else
    {
        client_printc(id, "%s !g[!nHell-Gaming!g]!nOnly !gVIPs !ncan use the !gVIP Menu!", PREFIX);
        return PLUGIN_HANDLED;
    }
    
    return PLUGIN_HANDLED;
}

public VipMenu(id){
    new menu = menu_create("\yJailBreak VIP Menu:^n\rby TheHacker1998", "VipMenu_handler");

    menu_additem(menu, "\w225 HP and Armor", "1", 0);
    menu_additem(menu, "\wLongjump - (550), "2", 0);
    menu_additem(menu, "\wGravity - (550)", "3", 0);
    menu_additem(menu, "\wSpeed -(400)", "4", 0);
    
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    menu_display(id, menu, 0);

}
public VipMenu_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_health(id, 225);
            set_user_armor(id, 225);
            VipUsed[id] = true
            
            client_printc(id, "%s !g[!nHell-Gaming!g]!nYou Taked !g225 Health !nand !g225 Armor!n!", PREFIX);
        }
        case 2:{
            set_user_longjump_force(id, 550)
	   set_user_longjump_height(id, 255)
	   set_user_longjump_cooldown(id, 5.0)
            VipUsed[id] = true;
            
            client_printc(id, "%s !g[!nHell-Gaming!g]!nYou Taked !gLongjump!n!", PREFIX);
        }
        case 3:{
            set_user_gravity(id, 550);
            client_printc(id, "%s !g[!nHell-Gaming!g]!nYou Taked !gGravity!n!", PREFIX);
        }
        case 4:{
            VipUsed[id] = true;
            HasSpeed[id] = true;
            
            set_user_maxspeed(id, 400);
            
            client_printc(id, "%s !g[!nHell-Gaming!g]!nYou Taked !gSpeed!n!", PREFIX);
        }
    }

    menu_destroy(menu);
    return PLUGIN_HANDLED;
}
public HookCurWeapon(id){
    if(HasSpeed[id]){
        set_user_maxspeed(id, 400);
    }
}
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, "!n", "^x01"); 
    replace_all(msg, 190, "!g", "^x04"); 
    replace_all(msg, 190, "!t", "^x03"); 
    
    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();
            }
        }
    }
}
I compiled the .sma and i found 22 Errors

Code:
/tmp/textZwM7gC.sma(34) : error 021: symbol already defined: "RegisterHam"
/tmp/textZwM7gC.sma(38) : error 010: invalid function or declaration
/tmp/textZwM7gC.sma(42) : error 010: invalid function or declaration
/tmp/textZwM7gC.sma(51) : error 021: symbol already defined: "set_task"
/tmp/textZwM7gC.sma(55) : error 021: symbol already defined: "get_localinfo"
/tmp/textZwM7gC.sma(59) : error 021: symbol already defined: "register_dictionary"
/tmp/textZwM7gC.sma(62) : error 021: symbol already defined: "register_clcmd"
/tmp/textZwM7gC.sma(67) : error 010: invalid function or declaration
/tmp/textZwM7gC.sma(71) : error 017: undefined symbol "VipUsed"
/tmp/textZwM7gC.sma(71) : error 029: invalid expression, assumed zero
/tmp/textZwM7gC.sma(73) : warning 218: old style prototypes used with optional semicolumns
/tmp/textZwM7gC.sma(74) : error 054: unmatched closing brace
/tmp/textZwM7gC.sma(75) : error 010: invalid function or declaration
/tmp/textZwM7gC.sma(77) : warning 218: old style prototypes used with optional semicolumns
/tmp/textZwM7gC.sma(78) : error 054: unmatched closing brace
/tmp/textZwM7gC.sma(79) : error 010: invalid function or declaration
/tmp/textZwM7gC.sma(81) : warning 218: old style prototypes used with optional semicolumns
/tmp/textZwM7gC.sma(82) : error 010: invalid function or declaration
/tmp/textZwM7gC.sma(85) : error 010: invalid function or declaration
/tmp/textZwM7gC.sma(92) : error 001: expected token: ",", but found "-integer value-"
/tmp/textZwM7gC.sma(92) : error 037: invalid string (possibly non-terminated string)
/tmp/textZwM7gC.sma(92 -- 93) : warning 215: expression has no effect
/tmp/textZwM7gC.sma(118) : error 017: undefined symbol "VipUsed"
/tmp/textZwM7gC.sma(118) : warning 215: expression has no effect
/tmp/textZwM7gC.sma(118) : error 001: expected token: ";", but found "]"
/tmp/textZwM7gC.sma(118) : error 029: invalid expression, assumed zero
/tmp/textZwM7gC.sma(118) : fatal error 107: too many error messages on one line

Compilation aborted.
22 Errors.
Can someone help me?
Fr0sty_GR is offline
 


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 21:10.


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