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

[How] to make mode cs ??


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 08-23-2016 , 23:48   [How] to make mode cs ??
Reply With Quote #1

PHP Code:
/* Create Modes with Zombie Plague style, but for normal Counter Strike */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich> 

#define VERSION "1.0"

new cvar_modecvar_min_playerscvar_chance //We register our pcvars
new g_newround
new g_endround
new g_lastmode
new g_modexample //And the Variables

/*Also we have to enum our modes for the game */
enum
{
    
MODE_NONE 0,
    
MODE_KNIVES
}  

public 
plugin_init() 
{
    
register_plugin("KNIVES"VERSION"arvEL.-"//We register the Plugin Name and the Plugin Author
    
    
register_event"HLTV""RoundStart""a""1=0""2=0" //Here the RoundStart event (When the round starts)
    
register_logevent("Round_end"2"1=Round_End"//Here the round_end event (When the round ends)
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage"//Here when the player takes damage
    
    //Aquí registramos las pcvars
    
cvar_mode register_cvar("modes_toggle""1"//If the modes are enabled
    
cvar_min_players register_cvar("mode_min_players""2")
    
cvar_chance register_cvar("mode_chances""50")
}  

public 
RoundStart()
{
    
g_newround true
    g_endround 
false
    g_modexample 
false
    
    set_task
(2.0"go_to_mode"//Later of setting the Variables true or false, we set a task to the public "go_to_mode"
}

public 
Round_end()
{
    
g_newround false //We set again this false
    
g_endround true //And this true
}

public 
go_to_mode()
{
    
start_mode(MODE_NONE
}

start_mode(mode)
{
    static 
iPlayersnum
    iPlayersnum 
get_playersnum() //We get the number of players 
    
    
if (iPlayersnum 1//If players number < 1, start with no mode 
    
{
        
set_task(2.0"go_to_mode")
        return;
    }
    
    
g_newround false 
    
    
if ((mode == MODE_NONE || (g_lastmode != MODE_KNIVES) && random_num(1get_pcvar_num(cvar_chance)) && get_pcvar_num(cvar_mode) && iPlayersnum >= get_pcvar_num(cvar_min_players)) || mode == MODE_KNIVES)
    { 
        
g_modexample true //Our mode is now true
        
g_lastmode MODE_KNIVES  
        
        set_hudmessage
(25500, -1.0, -1.006.05.0//So we send a message to the players
        
show_hudmessage(0"The example mode was started!")
    }
}  

public 
fw_TakeDamage(victim)
{
    if (
g_newround || g_endround)
    return 
HAM_SUPERCEDE;
    
    if (
g_modexample
    return 
HAM_IGNORED//The mode can't affect the gameplay, so we return it 
    
    
return PLUGIN_CONTINUE;

i find this codes and edit it
but it's have problem everyround the mode running
how can i make it like modes zombie
example:
in zombie 10 rounds normall infection and after than maybe server will
used mode sniper or nemesis or...
what problem in my codes??
__________________
arvEL. is offline
Send a message via Skype™ to arvEL.
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 08-25-2016 , 08:06   Re: [How] to make mode cs ??
Reply With Quote #2

helppppppp
__________________
arvEL. is offline
Send a message via Skype™ to arvEL.
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 17:24.


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