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

Subplugin Submission [ZP] +Health | Damage Selection | Teleport | Nemesis | Survivor


Post New Thread Reply   
 
Thread Tools Display Modes
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 08-24-2012 , 12:39   Re: [ZP] +Health | Damage Selection | Teleport | Nemesis | Survivor
Reply With Quote #11

oups, didnt read the whole script. My deepest apology
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers

Last edited by mottzi; 08-24-2012 at 12:39.
mottzi is offline
Send a message via MSN to mottzi
anantthakor
Senior Member
Join Date: Aug 2009
Old 08-25-2012 , 12:52   Re: [ZP] +Health | Damage Selection | Teleport | Nemesis | Survivor
Reply With Quote #12

Quote:
Originally Posted by H.RED.ZONE View Post
More efficient way would be.
PHP Code:
/*
    Name: Extra Items Pack
    Link: http://forums.alliedmods.net/showthread.php?t=185739
    Autor: [R]ak
*/


#include <amxmodx>
#include <zombieplague>
#include <hamsandwich>
#include <fakemeta>

#define PLUGIN "Some Items Extra"
#define VERSION "1.0"
#define AUTHOR "[R]ak"

#define MarkUserInAlive(%0)   g_bitInAlive |= (1 << (%0 & 31))
#define ClearUserInAlive(%0)  g_bitInAlive &= ~(1 << (%0 & 31))
#define IsUserInAlive(%0)     g_bitInAlive & (1 << (%0 & 31))

#define MarkUserInConnected(%0)   g_bitInConnected |= (1 << (%0 & 31))
#define ClearUserInConnected(%0)  g_bitInConnected &= ~(1 << (%0 & 31))
#define IsUserInConnected(%0)    g_bitInConnected & (1 << (%0 & 31))

#define MarkUserInDamage(%0)   g_bitInDamagePlayers |= (1 << (%0 & 31))
#define ClearUserInDamage(%0)  g_bitInDamagePlayers &= ~(1 << (%0 & 31))
#define IsUserInDamage(%0)    g_bitInDamagePlayers & (1 << (%0 & 31))

new g_bitInDamagePlayers
    
,g_bitInConnected
    
,g_bitInAlive
    
,g_maxplayers

new item_vida
    
,item_damage
    
,item_teleport
    
,item_nemesis
    
,item_survivor

new g_tporigin[33][3]

const 
health_cost 12   // Cost of Health item
const damage_cost 25   // Cost of More Damage item
const teleport_cost 24 // Cost of teleport item
const nemesis_cost 60  // Cost of Buy Nemesis
const survivor_cost 80 // Cost of Buy Survivor


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
item_vida zp_register_extra_item("Health(H +150 | Z +1500)"health_costZP_TEAM_ANY)
    
item_damage zp_register_extra_item("Damage Selection(1 Round)"damage_costZP_TEAM_HUMAN)
    
item_teleport zp_register_extra_item("Teleport"teleport_costZP_TEAM_HUMAN)
    
item_nemesis zp_register_extra_item("Nemesis"nemesis_costZP_TEAM_ANY)
    
item_survivor zp_register_extra_item("Survivor"survivor_costZP_TEAM_ANY)
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled"
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
    
g_maxplayers get_maxplayers()
}

 public 
fw_PlayerKilled(victimattackershouldgib) {
    if(
IsUserInConnected(victim)) {
        
ClearUserInAlive(victim)
    }
}

public 
fw_PlayerSpawn_Post(id) {
    
    if(
IsUserInConnected(id)) {
        
MarkUserInAlive(id)
    }
    
    if(
IsUserInAlive(id)) {
        
pev(idpev_origing_tporigin[id])
    }    
}

public 
fw_TakeDamage(victiminflictorattacker) {
    
    if(
IsUserInAlive(attacker) && IsUserInAlive(victim) &&  IsUserInDamage(attacker))
        
SetHamParamFloat(4175.0)
}

public 
event_round_start(){
    for(new 
id 1;id <= g_maxplayers;id++) {
        
ClearUserInConnected(id)
        
ClearUserInDamage(id)
    }
}

public 
client_putinserver(id) {
    
MarkUserInConnected(id)
}

public 
client_disconnect(id) {
    
ClearUserInConnected(id)
    
}

public 
zp_extra_item_selected(iditemid) {
    
    if(
itemid == item_vida)
        
set_pev(idpev_healthfloat(pev(idpev_health)+(zp_get_user_zombie(id) ? 1500 150)))
    else if(
itemid == item_damage)
        
MarkUserInDamage(id)
    else if(
itemid == item_teleport) {
        new 
doneihull = (pev(idpev_flags) & FL_DUCKING) ? HULL_HEAD HULL_HUMAN
        
while(!done) {
            
random_num(132)
        
            if(!
g_tporigin[i][0] || !is_hull_vacant(Float:g_tporigin[i], hull))
                continue;
            
            
set_pev(idpev_origing_tporigin[i])
            
done++
        }
    }
    else if(
itemid == item_nemesis)
        
zp_make_user_nemesis(id)
    else if(
itemid == item_survivor)
        
zp_make_user_survivor(id)    
}

stock is_hull_vacant(Float:origin[3], hull) {
    
engfunc(EngFunc_TraceHulloriginorigin0hull00)

    if (!
get_tr2(0TR_StartSolid) && !get_tr2(0TR_AllSolid) && get_tr2(0TR_InOpen))
        return 
true;

    return 
false;


can you add same above code in above thread's plugins ?

i mean add "1 user 1 time buy per map" for Buy Nemesis and Buy Survivor

and also set it as no one can buy before infect starts.
anantthakor is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 08-25-2012 , 13:53   Re: [ZP] +Health | Damage Selection | Teleport | Nemesis | Survivor
Reply With Quote #13

Quote:
Originally Posted by anantthakor View Post
can you add same above code in above thread's plugins ?

i mean add "1 user 1 time buy per map" for Buy Nemesis and Buy Survivor

and also set it as no one can buy before infect starts.
Lol its not my code, if you want it that much you can set it as a request, in requests section.
__________________
H.RED.ZONE is offline
anantthakor
Senior Member
Join Date: Aug 2009
Old 08-25-2012 , 23:05   Re: [ZP] +Health | Damage Selection | Teleport | Nemesis | Survivor
Reply With Quote #14

Quote:
Originally Posted by H.RED.ZONE View Post
Lol its not my code, if you want it that much you can set it as a request, in requests section.
already b4 this post

http://forums.alliedmods.net/showpos...5&postcount=19

ty in advance
anantthakor is offline
anantthakor
Senior Member
Join Date: Aug 2009
Old 08-31-2012 , 07:48   Re: [ZP] +Health | Damage Selection | Teleport | Nemesis | Survivor
Reply With Quote #15

Quote:
Originally Posted by H.RED.ZONE View Post
Lol its not my code, if you want it that much you can set it as a request, in requests section.
posted there and waiting for your reply
anantthakor is offline
anantthakor
Senior Member
Join Date: Aug 2009
Old 08-31-2012 , 07:49   Re: [ZP] +Health | Damage Selection | Teleport | Nemesis | Survivor
Reply With Quote #16

never found what is damage selection
anantthakor is offline
gogicaa
Veteran Member
Join Date: Aug 2011
Location: //
Old 08-31-2012 , 10:55   Re: [ZP] +Health | Damage Selection | Teleport | Nemesis | Survivor
Reply With Quote #17

Quote:
Originally Posted by anantthakor View Post
never found what is damage selection
Check out code then :
PHP Code:
public fw_TakeDamage(victiminflictorattacker)
    if(
is_valid_user(attacker) && is_valid_user(victim) &&  g_hasdamage[attacker])
        
SetHamParamFloat(4175.0
I hope that you understand now.
gogicaa is offline
anantthakor
Senior Member
Join Date: Aug 2009
Old 08-31-2012 , 23:39   Re: [ZP] +Health | Damage Selection | Teleport | Nemesis | Survivor
Reply With Quote #18

naa plz ! i m not coder bro !
anantthakor 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 13:06.


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