Raised This Month: $ Target: $400
 0% 

How to add ADMIN_LEVEL_A


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SmileyDR
Junior Member
Join Date: Feb 2011
Old 01-30-2013 , 18:02   How to add ADMIN_LEVEL_A
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <engine>
#include <biohazard>

#define PLUGIN  "Class: Bhop"
#define AUTHOR  "MiSkE"
#define VERSION "1.0"

const Float:helte 250.0 // helte
const Float:brzina 250.0 // brzina
const Float:gravitacija 0.90 // gravitacija
const Float:napad 2.0 // napad
const Float:odbrana 0.245 // odbrana
const Float:heodbrana 1.10 // odbrana od he bombi
const Float:hitbrzina 0.95 // brzina kad ga pucaju
const Float:hitduzina 0.15 // duzina koliko ostaje brzina kad ga pucaju
const Float:regeneracija 0.20 // regeneracija
const Float:hitregeneracija 2.2 // regeneracija kad ga pucaju
const Float:knockback 1.25 // knockback

new g_class;
new 
bool:g_havebunnyhop[33] = false  

public plugin_precache()
{
    
precache_model("models/player/stalker/stalker.mdl"
    
precache_model("models/v_knife_zombie.mdl"
    return 
PLUGIN_CONTINUE
}

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR
    
    
register_event("DeathMsg""death""a")
    
    
g_class register_class("Jumper""Ima autobhop")
    
    if(
g_class != -1)
    {
        
set_class_data(g_classDATA_HEALTHhelte)
        
set_class_data(g_classDATA_SPEEDbrzina)
        
set_class_data(g_classDATA_GRAVITYgravitacija)
        
set_class_data(g_classDATA_ATTACKnapad)
        
set_class_data(g_classDATA_DEFENCEodbrana)
        
set_class_data(g_classDATA_HEDEFENCEheodbrana)
        
set_class_data(g_classDATA_HITSPEEDhitbrzina)
        
set_class_data(g_classDATA_HITDELAYhitduzina)
        
set_class_data(g_classDATA_REGENDLYregeneracija)
        
set_class_data(g_classDATA_HITREGENDLYhitregeneracija)
        
set_class_data(g_classDATA_KNOCKBACKknockback)
    
    
set_class_pmodel(g_class"models/player/stalker/stalker.mdl")
    
set_class_wmodel(g_class"models/v_knife_zombie.mdl")
    
    }
}

public 
event_infect(victimattacker)
{
    if(
get_user_class(victim) == g_class)
    {
        
g_havebunnyhop[victim] = true
        
return PLUGIN_CONTINUE
    
}
    return 
PLUGIN_CONTINUE;
}

public 
client_connect(id)
{
    
g_havebunnyhop[id] = false
}

public 
client_disconnect(id)
{
    
g_havebunnyhop[id] = false
}

public 
death(id)
{
    
g_havebunnyhop[id] = false
}

public 
client_PreThink(id)
{
    if(
g_havebunnyhop[id] && is_user_zombie(id) && get_user_class(id) == g_class)
    {
        
entity_set_float(idEV_FL_fuser20.0);
        
        if (
entity_get_int(idEV_INT_button) & 2)
        {
            new 
flags entity_get_int(idEV_INT_flags);
            
            if (
flags FL_WATERJUMP)
            {
                return 
PLUGIN_CONTINUE;
            }
            if (
entity_get_int(idEV_INT_waterlevel) >= 2)
            {
                return 
PLUGIN_CONTINUE;
            }
            if(!(
flags FL_ONGROUND))
            {
                return 
PLUGIN_CONTINUE;
            }
            
            new 
Float:velocity[3];
            
entity_get_vector(idEV_VEC_velocityvelocity);
            
velocity[2] += 250.0;
            
entity_set_vector(idEV_VEC_velocityvelocity);
            
            
entity_set_int(idEV_INT_gaitsequence6);
        }
    }
    return 
PLUGIN_CONTINUE;

__________________
Nobody is perfect,but i am f'ckn close

Last edited by SmileyDR; 01-30-2013 at 18:03.
SmileyDR is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-30-2013 , 19:23   Re: How to add ADMIN_LEVEL_A
Reply With Quote #2

Add it where?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
SmileyDR
Junior Member
Join Date: Feb 2011
Old 01-31-2013 , 01:19   Re: How to add ADMIN_LEVEL_A
Reply With Quote #3

Quote:
Originally Posted by YamiKaitou View Post
Add it where?
I dont't know,anywhere?
i just want this to be on admin flag,so players cant acess this class.
__________________
Nobody is perfect,but i am f'ckn close
SmileyDR is offline
dejan
Senior Member
Join Date: Mar 2009
Location: Sweden
Old 01-31-2013 , 13:40   Re: How to add ADMIN_LEVEL_A
Reply With Quote #4

How to do it yourself
Spoiler


Flags here
Spoiler
Attached Files
File Type: sma Get Plugin or Get Source (class.sma - 444 views - 3.2 KB)
__________________

Last edited by dejan; 01-31-2013 at 13:46.
dejan is offline
Send a message via Skype™ to dejan
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-01-2013 , 00:52   Re: How to add ADMIN_LEVEL_A
Reply With Quote #5

Quote:
Originally Posted by SmileyDR View Post
I dont't know,anywhere?
Well obviously "anywhere" doesn't make any sense. This should be obvious.

Quote:
Originally Posted by SmileyDR View Post
i just want this to be on admin flag,so players cant acess this class.
You put it where you give access [to the class] so that you can give or deny a player that class.
__________________
fysiks 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 20:41.


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