Raised This Month: $ Target: $400
 0% 

slay timer / slay hostage=0hp


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Diablo-89
Junior Member
Join Date: Jul 2005
Location: the netherlands
Old 08-24-2005 , 07:59   slay timer / slay hostage=0hp
Reply With Quote #1

i need a timer for my plugin.... after x minutes in the round
it slayes the t's
the x should be changeable with a cvar: mp_slaytime default 4.9 minutes
and i need something to slay the ct's when all the hostages are dead

thanx

greetz Diablo
Diablo-89 is offline
Send a message via MSN to Diablo-89
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 08-24-2005 , 08:35  
Reply With Quote #2

As for the T slaying part, try this:
Code:
#include <amxmodx> public plugin_init() {     register_plugin("Slay T's","0.1","v3x")     register_cvar("mp_slaytime","4.9")     register_logevent("Event_NewRound",2,"0=World triggered","1=Round_Start") } public Event_NewRound() {     set_task(get_cvar_float("mp_slaytime"),"SlayTerrors",2932) } public SlayTerrors() {     new aPlayers[32],iNum,i     get_players(aPlayers,iNum,"ae","TERRORIST")         for(i = 0; i <= iNum; i++)     {         new id = aPlayers[i]         if(!is_user_connected(id)) continue         user_kill(id)     } }

As for the slaying of the CT's when all hostages are killed:

Code:
#include <amxmodx> #include <engine> public plugin_init() {     register_plugin("No hostage Slay","0.1","v3x")     register_event("TextMsg","HostageKilled","b","2&#Killed_Hostage")   } new g_iHostages public HostageKilled() {     new iEnts = get_global_int(GL_maxEntities)         g_iHostages = 0         for(new i = -1; i <= iEnts; i++)     {         if(!is_valid_ent(i)) continue                 new szClassName[32]         entity_get_string(i,EV_SZ_classname,szClassName,31)         if(equali(szClassName,"hostage_entity"))             g_iHostages++     }         if(g_iHostages <= 0)     {         new aPlayers[32],iNum,i         get_players(aPlayers,iNum,"ae","CT")                 for(i = 0; i <= iNum; i++)         {             new id = aPlayers[i]             if(!is_user_connected(id)) continue             user_kill(id)         }     } }
Lemme know how they work. ;)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Diablo-89
Junior Member
Join Date: Jul 2005
Location: the netherlands
Old 08-24-2005 , 08:38  
Reply With Quote #3

thanx very much ill let you know how they do when my plugin is finished and debugged
Diablo-89 is offline
Send a message via MSN to Diablo-89
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 14:34.


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