AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to add ADMIN_LEVEL_A (https://forums.alliedmods.net/showthread.php?t=207177)

SmileyDR 01-30-2013 18:02

How to add ADMIN_LEVEL_A
 
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;



YamiKaitou 01-30-2013 19:23

Re: How to add ADMIN_LEVEL_A
 
Add it where?

SmileyDR 01-31-2013 01:19

Re: How to add ADMIN_LEVEL_A
 
Quote:

Originally Posted by YamiKaitou (Post 1883758)
Add it where?

I dont't know,anywhere?
i just want this to be on admin flag,so players cant acess this class.

dejan 01-31-2013 13:40

Re: How to add ADMIN_LEVEL_A
 
1 Attachment(s)
How to do it yourself
Spoiler


Flags here
Spoiler

fysiks 02-01-2013 00:52

Re: How to add ADMIN_LEVEL_A
 
Quote:

Originally Posted by SmileyDR (Post 1883893)
I dont't know,anywhere?

Well obviously "anywhere" doesn't make any sense. This should be obvious.

Quote:

Originally Posted by SmileyDR (Post 1883893)
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.


All times are GMT -4. The time now is 20:41.

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