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

Please fix the plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
matan
Junior Member
Join Date: Feb 2011
Old 02-17-2011 , 09:37   Please fix the plugins
Reply With Quote #1

hi
Anyone know why it is not open to CT the the days menu?
Sorry for my English
pliz fix thes =]

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#include <engine>
#include <fakemeta_util>
#include <nvault>
#include <colorchat>

#define VERSION "2.0"

new const PREFIX[] = "[ JailBreak ]^x04" // Prefix 
new g_max_clients        //client check



new specialday[21]
enum
{
DAY_NONE,
DAY_MUSIC,
DAY_GRAV,
DAY_FREEDAY,
DAY_ZOMBIE,
DAY_LAVA,
DAY_SHARK,
DAY_CAGE,
DAY_DM,
DAY_NIGHT,
DAY_SPARTAN
}
    

////////////////////////////////////////////////////////////
//-----------------ROUND END/ ROUND START-----------------//
////////////////////////////////////////////////////////////
public Event_Roundend()
{
    {
        
server_cmd("sv_gravity 800")
    }

    if(
specialday[20] == DAY_DM)
        
server_cmd("mp_friendlyfire 0")
    {
        
set_hudmessage(255255255, -1.0, -1.006.03.0)
        
show_hudmessage(0"Round end!!!")
    }
    
client_cmd(0"mp3 stop")
    
client_cmd(0"stopsound")
}    
public 
Event_Roundstart()
{
    {
        
set_hudmessage(255255255, -1.0, -1.006.03.0)
        
show_hudmessage(0"Round Start!!!")
    }
    {

    }
}

//////////////
// =Stocks= //
//////////////

stock check_user(index)
{
    if(!
is_user_connected(index) ||(is_user_bot(index)))
    {
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}

stock strip_weapons(index)
{

    
strip_user_weapons(index)
    
give_item(index"weapon_knife")



//////////////////////////////////////////////////////////////
//---------------PLUGIN INIT--------------------------------//
//////////////////////////////////////////////////////////////

public plugin_init()
{
    
register_plugin("JailBreak-DaysMenu"VERSION"NeTo")
    
    
//client commands
    
register_concmd("say /days""specialday_check")
    
register_concmd("say /cd""cdmenu")
    
register_concmd("amx_day""specialday_menu"ADMIN_KICK)

    
//Other Things
}


//    Cvars    
new cvar_daysmenu        // Enables the days menu
////////////////
// =Booleans= //
////////////////
new boolcan_have_gun[33]      // Can he have a gun?


// Sounds
new musicday_song[]     = "sound/kisaot1.mp3"
new musicday_song2[]     = "sound/kisaot2.mp3"
new musicday_song3[]    = "sound/kisaot3.mp3"
new zombiesound[]         = "sound/jailbreak/zombie_day.mp3"


///////////////
// =Defines= //
///////////////


#define IsPlayer(%1) (1<=%1<=g_max_clients)

#define REQUIRED_ADMIN_LEVEL ADMIN_KICK
#define ADMIN_VOICE ADMIN_MENU
#define USE_CC

#if defined USE_CC
#endif
#define OFFSET_PRIMARYWEAPON        116

/*=====================================================================
The Days Menu
=====================================================================*/

public specialday_check(id)
{
    if(
cs_get_user_team(id) == CS_TEAM_T)
    {
        
#if defined USE_CC
            
ColorChat(idRED"%s Only^x03 CT's^x04 can start a^x03 special day"PREFIX)
        
#else
            
client_print(idprint_chat"%s Only CT's can start a special day"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}

    if(!
get_pcvar_num(cvar_daysmenu))
    {
        
#if defined USE_CC
        
ColorChat(idRED"%s Days are^x03 disabled"PREFIX)
        
#else
        
client_print(idprint_chat"%s Days are disabled"PREFIX)
        
#endif
        
        
return PLUGIN_HANDLED
    
}
    
specialday_menu(id)
    return 
PLUGIN_HANDLED
}
public 
specialday_menu(id)
{
    new 
specialdaymenu menu_create("ySpecial Days:""specialday_submenu")
    
    
menu_additem(specialdaymenu"wMusic Day""1"0);
    
menu_additem(specialdaymenu"wGravity Day""2"0);
    
menu_additem(specialdaymenu"wFreeday""3"0);
    
menu_additem(specialdaymenu"wZombie Day""4"0);
    
menu_additem(specialdaymenu"wLava Day""5"0);
    
menu_additem(specialdaymenu"wShark Day""6"0);
    
menu_additem(specialdaymenu"wCage Day""7"0);
    
menu_additem(specialdaymenu"wDeathMatch Day""8"0);
    
menu_additem(specialdaymenu"wNight Crawler Day""9"0)
    
menu_additem(specialdaymenu"wSpartan Day""10"0)
        
    
menu_setprop(specialdaymenuMPROP_EXITMEXIT_ALL);
    
menu_display(idspecialdaymenu0);
}
public 
specialday_submenu(idspecialdaymenuitem)
{
    
    if (
item == MENU_EXIT)
    {
        
menu_destroy(specialdaymenu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
Data[7], Name[64];
    new 
AccessCallback;
    
menu_item_getinfo(specialdaymenuitemAccessData,5Name63Callback);
    
    new 
Key str_to_num(Data);
    
    switch (
Key)
    {
        case 
1:
            
specialday[20] = DAY_MUSIC
        
        
case 2:
            
specialday[20] = DAY_GRAV
        
        
case 3:
            
specialday[20] = DAY_FREEDAY
        
        
case 4:
            
specialday[20] = DAY_ZOMBIE
        
        
case 5:
            
specialday[20] = DAY_LAVA
        
        
case 6:
            
specialday[20] = DAY_SHARK
        
        
case 7:
            
specialday[20] = DAY_CAGE
        
        
case 8:
            
specialday[20] = DAY_DM
        
        
case 9:
            
specialday[20] = DAY_NIGHT
        
        
case 10:
            
specialday[20] = DAY_SPARTAN
            
    
}    
    
    if(
IsPlayer(id) && is_user_alive(id))
        
do_specialday(id)
        
    
menu_destroy(specialdaymenu);
    return 
PLUGIN_HANDLED
}

public 
do_specialday(id)
{
    for(new 
0g_max_clientsi++)
    {
        switch(
specialday[20])
        {
            case 
DAY_MUSIC:
            {
                new 
musicmenu menu_create("yMusic Choice""musicday_submenu")
    
                
menu_additem(musicmenu"wPlay Music""1"0)
                
menu_additem(musicmenu"wStop Music""2"0)
    
                
menu_setprop(musicmenu,MPROP_EXITMEXIT_ALL)
                
menu_display(idmusicmenu0)
            }
            
            case 
DAY_GRAV:
            {
                
server_cmd("sv_gravity 200")
            
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Gravity day"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Gravity day"PREFIX)
                
#endif
            
}
            
            case 
DAY_FREEDAY:
            {
                if(
IsPlayer(id) && is_user_alive(id))
                {
                    if(
cs_get_user_team(i) == CS_TEAM_T)
                        
set_user_rendering(ikRenderFxGlowShell25500kRenderNormal16)
                }
                
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Freeday"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Freeday"PREFIX)
                
#endif
            
}
            
            case 
DAY_ZOMBIE:
            {
                if(
IsPlayer(i) && is_user_alive(i))
                {    
                    switch(
cs_get_user_team(i))
                    {
                        case 
CS_TEAM_T:
                        {
                            
set_user_health(i150)
                            
                            
give_item(i"weapon_ak47")
                            
give_item(i"weapon_m4a1")
                            
                            
cs_set_user_bpammo(iCSW_AK4790)
                            
cs_set_user_bpammo(iCSW_M4A190)
                        }
                        
                        case 
CS_TEAM_CT:
                        {
                            if(
is_user_alive(i))
                            {
                                
set_user_health(i500)
                                
can_have_gun[i] = false
                            
}
                        }
                    }
                }
                
                
client_cmd(0"mp3 play ^"%s^""zombiesound)
                
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Zombie Day"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Zombie day"PREFIX)
                
#endif                
            
}
            
            case 
DAY_LAVA:
            {
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Lava Day,^x03 Stand on a^x03 spray at all times"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Lava day, Stand on a spray at all times"PREFIX)
                
#endif
            
}
            
            case 
DAY_SHARK:
            {
                if(
IsPlayer(i) && is_user_alive(i))
                {
                    switch(
cs_get_user_team(i))
                    {
                        case 
CS_TEAM_T:
                        {
                            
set_user_health(i200)
                            
                            
give_item(i"weapon_ak47")
                            
give_item(i"weapon_m4a1")
                            
                            
cs_set_user_bpammo(iCSW_AK4790)
                            
cs_set_user_bpammo(iCSW_M4A190)
                        }
                        
                        case 
CS_TEAM_CT:
                        {
                            if(
is_user_alive(i))
                            {
                                
set_user_noclip(i1)
                                
set_user_health(i300)
                            }
                        }
                    }
                    
                    
#if defined USE_CC
                        
ColorChat(0RED"%s Today is^x03 Shark Day"PREFIX)
                    
#else    
                        
client_print(0print_chat"%s Today is Shark day"PREFIX)
                    
#endif
                
}
            }
                
            case 
DAY_CAGE:
            {
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is cage day"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is a cage day"PREFIX)
                
#endif
            
}
            
            case 
DAY_DM:
            {
                
server_cmd("mp_friendlyfire 1")
                
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Deathmatch Day,^x04 Last survivor chooses lr"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Deathmatch Day, Last survivor chooses lr"PREFIX)
                
#endif
            
}
            
            case 
DAY_NIGHT:
            {
                if(
IsPlayer(i) && is_user_alive(i))
                {    
                    switch(
cs_get_user_team(i))
                    {
                        case 
CS_TEAM_T:    
                        {
                            
give_item(i"weapon_m4a1")
                            
give_item(i"weapon_deagle")
                            
                            
cs_set_user_bpammo(iCSW_M4A190)
                            
cs_set_user_bpammo(iCSW_DEAGLE35)
                        }
                        
                        case 
CS_TEAM_CT:
                        {
                            
strip_weapons(i)
                            
                            
set_user_rendering(ikRenderFxGlowShell000kRenderTransAlpha0)
                            
can_have_gun[i] = false
                        
}
                    }
                }
                
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is a^x03 NightCrawler Day"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is a NightCrawler Day"PREFIX)
                
#endif
            
}
            
            case 
DAY_SPARTAN:
            {
                if(
IsPlayer(i) && is_user_alive(i))
                {
                    switch(
cs_get_user_team(i))
                    {
                        case 
CS_TEAM_T:
                        {
                            
give_item(i"weapon_shield")
                            
give_item(i"weapon_deagle")
                            
                            
cs_set_user_bpammo(iCSW_DEAGLE35)
                        }
                        
                        case 
CS_TEAM_CT:
                        {
                            
give_item(i"weapon_deagle")
                            
give_item(i"weapon_m4a1")
                            
                            
cs_set_user_bpammo(iCSW_DEAGLE35)
                            
cs_set_user_bpammo(iCSW_M4A190)
                        }
                    }
                }
                
                
#if defined USE_CC
                    
ColorChat(0RED"%s Today is^x03 Spartan Day"PREFIX)
                
#else
                    
client_print(0print_chat"%s Today is Spartan Day"PREFIX)
                
#endif
            
}
        }
    }
}

public 
musicday_submenu(idmusicmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(musicmenu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
Data[7], Name[64]
    new 
AccessCallback
    menu_item_getinfo
(musicmenuitemAccessData5Name63Callback)
    
    new 
key str_to_num(Data)
    
    switch(
key)
    {
        case 
1:
        {
            switch(
random_num(13))
            {
                case 
1:
                {
                    
client_cmd(0"mp3 play ^"%s^""musicday_song)
                }
                
                case 
2:
                {
                    
client_cmd(0"mp3 play ^"%s^""musicday_song2)
                }
                case 
3:
                {
                    
client_cmd(0"mp3 play ^"%s^""musicday_song3)
                }
            }
        }
        
        case 
2:
        {
            
client_cmd(0"mp3 stop")
        }
    }
    
menu_display(idmusicmenu0)
    return 
PLUGIN_CONTINUE
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ fbidis\\ ansi\\ ansicpg1255\\ deff0\\ deflang1037{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ ltrpar\\ f0\\ fs16 \n\\ par }
*/ 
matan is offline
Old 02-19-2011, 01:14
matan
This message has been deleted by Exolent[jNr]. Reason: Spambot
Old 02-20-2011, 07:35
matan
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 02-20-2011 , 13:05   Re: Please fix the plugins
Reply With Quote #2

Copy-pasting parts of a plugin doesn't make you the author.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-20-2011 , 19:30   Re: Please fix the plugins
Reply With Quote #3

Quote:
Originally Posted by matan View Post
up
You have been warned about bumping before 2 weeks have passed since the last post.
Thread is now locked for 2 weeks and all similar threads created in that time will be trashed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 10:11.


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