Raised This Month: $ Target: $400
 0% 

amx_plant_defuse_savehos


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 03-22-2005 , 13:47   amx_plant_defuse_savehos
Reply With Quote #1

i want to port this but i can't get it to work
normally if the pdsh_active 1
then ct's can plant t's can defuse and t's can rescue hos
but it doesn't work it still does the same as normal csstrike
do i have to enable <cstrike>?
Code:
#include <amxmodx> #include <engine> #define ADMIN_ACCESS ADMIN_LEVEL_A new maxplayers public plugin_init() {     register_plugin("Plant-Defuse-SaveHos", "0.2", "KRoTaL")     register_cvar("pdsh_active", "1")     maxplayers = get_maxplayers() + 1 } public client_PreThink(id) {     if(get_cvar_num("pdsh_active") == 0)     {         return PLUGIN_CONTINUE     }     if(!is_user_alive(id))     {         return PLUGIN_CONTINUE     }         if(get_user_flags(id) & ADMIN_ACCESS)     {         if(get_user_team(id) == 1)         {             if(get_user_button(id) & IN_USE && entity_get_int(id, 114) == 1)             {                 new c4 = find_ent(-1, "grenade")                 while(c4 > 0)                 {                     new model[32]                     entity_get_string(c4, EV_SZ_model, model, 31)                     if(equal(model, "models/w_c4.mdl"))                     {                         if(get_entity_distance(id, c4) < 72)                         {                             entity_set_int(id, 114, 2)                             entity_set_int(id, 193, entity_get_int(id, 193) + (1<<16))                             return PLUGIN_CONTINUE                          }                       }                     c4 = find_ent(c4, "grenade")                 }                 new hostage = find_ent(-1, "hostage_entity")                 while(hostage > 0)                 {                     if(get_entity_distance(id, hostage) < 72)                     {                         entity_set_int(id, 114, 2)                         entity_set_int(id, 193, entity_get_int(id, 193) + (1<<16))                         return PLUGIN_CONTINUE                      }                       hostage = find_ent(hostage, "hostage_entity")                 }             }             if(!(get_user_button(id) & IN_USE) && get_user_oldbutton(id) & IN_USE && entity_get_int(id, 114) == 2)             {                 entity_set_int(id, 114, 1)                 entity_set_int(id, 193, entity_get_int(id, 193) - (1<<16))             }         }     }     return PLUGIN_CONTINUE } public entity_touch(entity1, entity2) {     if(get_cvar_num("pdsh_active") == 0)     {         return PLUGIN_CONTINUE     }     if(entity1 > 0 && entity2 > 0 && entity2 < maxplayers)     {         if(get_user_flags(entity2) & ADMIN_ACCESS)         {             if(get_user_team(entity2) == 2)             {                 new model[32]                 entity_get_string(entity1, EV_SZ_model, model, 31)                 new classname[32]                 entity_get_string(entity1, EV_SZ_classname, classname, 31)                 if(equal(model, "models/w_backpack.mdl"))                 {                     if(entity_get_int(entity2, 114) == 2)                     {                         entity_set_int(entity2, 114, 1)                         set_task(0.1, "reset_team", entity2)                         return PLUGIN_CONTINUE                     }                 }                 if(equal(classname, "func_bomb_target"))                 {                     new clip, ammo, weapon = get_user_weapon(entity2, clip, ammo)                     if(weapon == CSW_C4)                     {                         if(entity_get_int(entity2, 114) == 2)                         {                             if(get_user_button(entity2) & IN_ATTACK)                             {                                 entity_set_int(entity2, 114, 1)                                 return PLUGIN_CONTINUE                             }                         }                     }                     else if(entity_get_int(entity2, 114) == 1)                     {                         entity_set_int(entity2, 114, 2)                         return PLUGIN_CONTINUE                     }                 }             }         }     }     return PLUGIN_CONTINUE } public reset_team(id) {     if(get_user_team(id) == 2 && entity_get_int(id, 114) == 1)     {         entity_set_int(id, 114, 2)     } }

help me here http://forums.alliedmods.net/showthread.php?t=11408
and here http://forums.alliedmods.net/showthread.php?t=11535
__________________
- Bye bye!
nightscreem is offline
 


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 09:51.


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