Raised This Month: $ Target: $400
 0% 

[REQ]Surf server: Open jail whit shot


Post New Thread Reply   
 
Thread Tools Display Modes
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 10-07-2013 , 13:05   Re: [REQ]Surf server: Open jail whit shot
Reply With Quote #11

Ham_Touch or Ham_Use?
__________________
alan_el_more is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 10-07-2013 , 13:11   Re: [REQ]Surf server: Open jail whit shot
Reply With Quote #12

Quote:
Originally Posted by pokemonmaster View Post
I think that plugin only works when you shoot the door not the button
Quote:
Originally Posted by ANTICHRISTUS View Post
Open doors with a shot! v1.0, check my post at the end.
__________________
ANTICHRISTUS is offline
brlight
Senior Member
Join Date: Jun 2011
Old 01-09-2014 , 08:12   Re: [REQ]Surf server: Open jail whit shot
Reply With Quote #13

Hi, Did anyone manage to find a plugin that when you shoot button in Sur_ski_2 it will open jail?
The 2 plugins Iīve found donīt work.

Use buttons by b0R3sT;
Shoot To Activate by Elusive.

None of these work, anyone knows same that actually work?
Thx in advance.
brlight is offline
Estland
Member
Join Date: Nov 2012
Old 12-11-2014 , 12:54   Re: [REQ]Surf server: Open jail whit shot
Reply With Quote #14

This one works:
Code:
#include <amxmodx>
#include <hamsandwich>
#include <engine>

public plugin_init()
{
    register_plugin("Admin/M3 nupp", "1.0.0", "Faval")
    RegisterHam(Ham_TraceAttack, "func_button", "button_attack")
    RegisterHam(Ham_TraceAttack, "trigger_multiple", "button_attack")
    RegisterHam(Ham_TraceAttack, "trigger_once", "button_attack")
}
public button_attack(button, id, Float:damage, Float:direction[3], tracehandle, damagebits)
{
    if(is_valid_ent(button) && (get_user_flags(id) & ADMIN_BAN))
    {
        ExecuteHamB(Ham_Use, button, id, 0, 2, 1.0)
        ExecuteHamB(Ham_Touch, button, id, 0, 2, 1.0)
        entity_set_float(button, EV_FL_frame, 0.0)
    }
    else if(is_valid_ent(button) && get_user_weapon(id) == CSW_M3)
    {
        ExecuteHamB(Ham_Use, button, id, 0, 2, 1.0)
        ExecuteHamB(Ham_Touch, button, id, 0, 2, 1.0)
        entity_set_float(button, EV_FL_frame, 0.0)
    }
    return HAM_IGNORED
}
Admins can open with any weapons, players can open it only with M3 (to avoid spam).
Estland 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 20:30.


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