Raised This Month: $ Target: $400
 0% 

Request predator


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sayf118
Member
Join Date: Jul 2017
Old 07-07-2017 , 10:36   Request predator
Reply With Quote #1

Request predator.sma with invislbe abilty
i realy need it for my srv
sayf118 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 07-07-2017 , 20:00   Re: Request predator
Reply With Quote #2

Try this one
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
sayf118
Member
Join Date: Jul 2017
Old 07-08-2017 , 04:32   Re: Request predator
Reply With Quote #3

i have a one but when i become nemesis or assassin ability steel active and speed + gravity of nemesis and assassin changes too

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <fakemeta>
#include <zombie_plague_advance>
#include <hamsandwich>
#include <colorchat>

#define PLUGIN "[ZP] Class Predator"
#define VERSION "1.0"
#define AUTHOR "TEo"

//Some vars
new g_zclass_Predatorg_maxplayersg_status
new cvar_ability_timecvar_invamountcvar_speedcvar_infect_hpcvar_cooldowncvar_gravitycvar_iconcvar_dmg_multi
new Float:g_last[33]
new 
keys MENU_KEY_1|MENU_KEY_2|MENU_KEY_3
new g_icon[33][16]
new 
boolg_ability[33], boolg_bind[33] = falseboolg_use[33]

//Predator Atributes
new const zclass_name[] = { "Predator" }
new const 
zclass_info[] = { "[Invisible]" }
new const 
zclass_model[] = { "predator_blue" }
new const 
zclass_clawmodel[] = { "predator_blue_claws.mdl" }
const 
zclass_health 5600
const zclass_speed 280
const Float:zclass_gravity 1.00
const Float:zclass_knockback 2

public plugin_init()
{    
    
    
cvar_dmg_multi register_cvar("zp_predator_dmg_multi""3")
    
cvar_ability_time register_cvar("zp_Predator_ability_long""10")
    
cvar_invamount register_cvar("zp_Predator_visible_amount""0")
    
cvar_speed register_cvar("zp_Predator_max_speed""400")
    
cvar_infect_hp register_cvar("zp_Predator_infect_hp""300")
    
cvar_cooldown register_cvar("zp_Predator_cooldown""30")
    
cvar_gravity register_cvar("zp_Predator_gravity""700")
    
cvar_icon register_cvar("zp_Predator_icon""1")
    
    
register_clcmd("ability","ability"ADMIN_ALL"bind ^"g^" ^"ability^"")
    
register_forward(FM_PlayerPreThink"fw_ppt")
    
register_event("HLTV""newround""a""1=0""2=0")
    
register_event("DeathMsg""death""a")
    
register_menucmd(register_menuid("Do you want to bind G ability?"), keys"bind_g")
    
RegisterHamHam_TakeDamage"player""fw_TakeDamage" )
    
    
g_status get_user_msgid("StatusIcon")
}

public 
plugin_precache()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
g_zclass_Predator zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)

}

public 
zp_user_infected_post(idinfector)
{
    if (
zp_get_user_zombie_class(infector) == g_zclass_Predator)
    {
        
set_pev(infectorpev_healthfloat(pev(infectorpev_health) + get_pcvar_num(cvar_infect_hp)))
        
set_hudmessage(25500, -1.00.4500.03.00.010.01, -1)
        
show_hudmessage(infector"+%i HP!"get_pcvar_num(cvar_infect_hp))
    }
    
    if (
zp_get_user_zombie_class(id) == g_zclass_Predator)
    {
        
g_ability[id] = false
        set_user_rendering
(idkRenderFxNone000kRenderNormal255)
        
set_user_maxspeed(idfloat(zclass_speed))
        
set_user_gravity(idzclass_gravity)
        
        if (!
g_bind[id])
        {
            new 
menu[192]
            
format(menu191"Do you want to bind G ability?^n^n1. Yes^n2. No^n3. Ability on +USE")
            
show_menu(idkeysmenu)
        }
    }
}

public 
zp_user_humanized_post(id)
    if(
zp_get_user_zombie_class(id) == g_zclass_Predator)
        
ability_end(id)

public 
bind_g(idkeys)
{
    if (
zp_get_user_zombie_class(id) == g_zclass_Predator)
    
g_bind[id] = true
    
switch(keys)
    {
        case 
0:
            
client_cmd(id"bind g ability")
        
        case 
1:
            
ColorChat(idGREY"^x04[ZP]^x01 To be ^x03invisible type in console:^x03 bind ^'^'key^'^' ^'^'ability^'^'^x01. And than press it!")
        
        case 
2:
            
g_use[id] = true
        
        
default:
            
g_bind[id] = false
    
}
    
    return 
PLUGIN_HANDLED
}

public 
ability(id)
{
    if (
zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_Predator))
    {
        if(
g_ability[id])
        {
            
ColorChat(idGREY"^x04[ZP]^x01 You are already ^x03invisible.")
            return 
PLUGIN_HANDLED
        
}
        
        if(!
is_user_alive(id))
        {
            
ColorChat(idGREY"^x04[ZP]^x01 You can't use that now.")
            return 
PLUGIN_HANDLED
        
}
        
        static 
Floati
        i 
get_pcvar_float(cvar_cooldown)
        
        if (
get_gametime() - g_last[id] < i) {
            
ColorChat(idGREY"^x04[ZP]^x01 Wait^x03 %.f^x01 secondes to use your ability!"get_pcvar_num(cvar_cooldown) - (get_gametime() - g_last[id]))
            return 
PLUGIN_HANDLED
        
} else {
            
set_user_rendering(idkRenderFxGlowShell000kRenderTransAlphaget_pcvar_num(cvar_invamount))
            
set_user_maxspeed(idget_pcvar_float(cvar_speed))
            
set_user_gravity(idget_pcvar_float(cvar_gravity) / 800)
            
set_hudmessage(2001000, -1.00.8500.03.00.010.01, -1)
            
show_hudmessage(id"You are now invisible. Time to hunt!")
            
set_task(get_pcvar_float(cvar_ability_time), "ability_end"id)
            if(
get_pcvar_num(cvar_icon) == 1)
                
set_icon(id)
            
g_ability[id] = true
        
}
    }
    return 
PLUGIN_CONTINUE
}

public 
ability_end(id)
{
    if (
zp_get_user_zombie_class(id) == g_zclass_Predator)
    
set_user_rendering(idkRenderFxNone000kRenderNormal255)
    
set_user_maxspeed(idfloat(zclass_speed))
    
set_user_gravity(idzclass_gravity)
    
    if (
get_pcvar_num(cvar_cooldown) > 0)
        
ColorChat(idGREY"^x04[ZP]^x01 Wait^x03 %i ^x01 secondes to use your ability again."get_pcvar_num(cvar_cooldown))
    
    if(
get_pcvar_num(cvar_icon) == 1)
        
delete_icon(id)
    
    
g_last[id] = get_gametime()
    
g_ability[id] = false
}

public 
fw_ppt(id)
{
    if (!
is_user_alive(id) || !zp_get_user_zombie(id))
        return 
FMRES_IGNORED
    
    
if (g_use[id])
    {
        static 
buttonoldbutton
        button 
get_user_button(id)
        
oldbutton get_user_oldbutton(id)
        
        if (!(
button IN_USE) && (oldbutton IN_USE))      
            
ability(id)
    }
    
    if (
g_ability[id] && (zp_get_user_zombie_class(id) == g_zclass_Predator) && zp_get_user_zombie(id))
    {
        
set_user_rendering(idkRenderFxGlowShell000kRenderTransAlphaget_pcvar_num(cvar_invamount))
        
set_user_maxspeed(idget_pcvar_float(cvar_speed))
        
set_pev(idpev_flTimeStepSound999)
        
set_user_gravity(idget_pcvar_float(cvar_gravity) / 800)
    }
    
    return 
PLUGIN_CONTINUE
}

public 
newround()
{
    
g_maxplayers get_maxplayers()
    
    for (new 
id 1id <= g_maxplayersid++)
    {
        
g_last[id] = get_gametime()
        
g_ability[id] = false
    
}
}

public 
fw_TakeDamagevictiminflictorattackerFloat:damagedamagebits )
{
        if ((
zp_get_user_zombie_class(attacker) == g_zclass_Predator) && (get_user_weapon(attacker) == CSW_KNIFE))
        {
                
SetHamParamFloat4damage get_pcvar_float(cvar_dmg_multi) )
        }
}

public 
death()
{
    new 
id read_data(2)
    
ability_end(id)
    return 
PLUGIN_HANDLED
}

public 
set_icon(id)
{
    static 
color[3], sprite[16]
    
color = {250250250}
    
sprite "dmg_gas"
    
g_icon[id] = sprite
    
    message_begin
(MSG_ONEg_status, {000}, id)
    
write_byte(1)
    
write_string(g_icon[id])
    
write_byte(color[0])
    
write_byte(color[1])
    
write_byte(color[2])
    
message_end()
}

public 
delete_icon(id
{
    
message_begin(MSG_ONEg_status, {000}, id)
    
write_byte(0)
    
write_string(g_icon[id])
    
message_end()
}

stock get_user_button(id)
    return 
pev(idpev_button)

stock get_user_oldbutton(id)
    return 
pev(idpev_oldbuttons)  
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
*/ 
sayf118 is offline
sayf118
Member
Join Date: Jul 2017
Old 07-08-2017 , 14:20   Re: Request predator
Reply With Quote #4

well solved thread i make my own one -_-
sayf118 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 01:09.


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