Raised This Month: $ Target: $400
 0% 

Help with VIP Menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 06-12-2014 , 16:19   Re: Help with VIP Menu
Reply With Quote #2

Your brackets in plugin_init are wrong. Take a look. Also, there are lot's of missing symbols and syntax characters in the code. And you have some undefined natives, dafuq?!
PHP Code:
       set_user_longjump_force(id550)
       
set_user_longjump_height(id255)
       
set_user_longjump_cooldown(id5.0
And you have many redundant new symbols. Holy mess at all. Here is the code, didn't touch the functions, only cleared from the redundant code and fixed the errors. Also, removed these unknown natives.
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fun>
#include <hamsandwich>

#define ADMIN_JBVIP ADMIN_RESERVATION


new HasSpeed[33];
new 
bool:VipUsed[33]
new const 
PREFIX[] = { "!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");
    

    
    
//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"configsDircharsmax(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");

}

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(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);

}
public 
VipMenu_handler(idmenuitem){
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);

    new 
key str_to_num(data);

    switch(
key)
    {
        case 
1:{
            
set_user_health(id225);
            
set_user_armor(id225);
            
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(id0.7);
            
client_printc(id"%s !g[!nHell-Gaming!g]!nYou Taked !gGravity!n!"PREFIX);
        }
        case 
4:{
            
VipUsed[id] = true;
            
HasSpeed[id] = true;
            
            
set_user_maxspeed(id400.0);
            
            
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(id400.0);
    }
}
stock client_printc(const id, const input[], any:...){
    new 
count 1players[32];
    static 
msg[191];
    
vformat(msg190input3);
    
    
replace_all(msg190"!n""^x01"); 
    
replace_all(msg190"!g""^x04"); 
    
replace_all(msg190"!t""^x03"); 
    
    if (
idplayers[0] = id; else get_players(playerscount"ch");
    {
        for (new 
0counti++)
        {
            if (
is_user_connected(players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]);
                
write_byte(players[i]);
                
write_string(msg);
                
message_end();
            }
        }
    }

__________________

Last edited by Flick3rR; 06-12-2014 at 16:29.
Flick3rR is offline
Send a message via Skype™ to Flick3rR
 



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