Raised This Month: $51 Target: $400
 12% 

Door problem!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KleirPlays
Member
Join Date: Jun 2013
Location: Portugal
Old 08-07-2014 , 20:09   Door problem!
Reply With Quote #1

I made this plugin, it complies just have a big problem.

I got a jailbreak and I want, only open cell door with a bullet, and I have this problem, evryone can punch in the cell door and open it. Can anyone help me?

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>

#define PLUGIN "Open Doors"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"

new cvar 

public plugin_init() 
{
register_plugin(PLUGINVERSIONAUTHOR)

cvar register_cvar("od_enabled""1")


if(
get_pcvar_num(cvar))
{
RegisterHam(Ham_TraceAttack"func_door_rotating""open_door")
RegisterHam(Ham_TraceAttack"func_door""open_door")
}
}

public 
open_door(thisidattackerFloat:damageFloat:direction[3], tracehandledamagebits)
{
dllfunc(DLLFunc_Usethisidattacker

KleirPlays is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 08-07-2014 , 20:10   Re: Door problem!
Reply With Quote #2

And that's what the plugin should do? What exactly is your request and what exactly do we have to do?
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
R3pTy
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 08-07-2014 , 22:15   Re: Door problem!
Reply With Quote #3

this plugin is jailbreak cells.
i think
__________________
R3pTy is offline
Th3822
Member
Join Date: Jan 2013
Location: Venezuela
Old 08-08-2014 , 01:49   Re: Door problem!
Reply With Quote #4

It's for jailbreak, so i'm assuming that you need that only CTs may open any door (cell) shooting at them.

The actual plugin opens the door from any hit that it receives...
For allowing to check the team of the attacker you need to include the cs functions with:
PHP Code:
#include <cstrike> 
and check the team in open_door before open the door, as this:
PHP Code:
public open_door(thisidattackerFloat:damageFloat:direction[3], tracehandledamagebits
{
    if (
is_user_alive(idattacker) && cs_get_user_team(idattacker) == CS_TEAM_CT)
    {
        
dllfunc(DLLFunc_Usethisidattacker);
        return 
HAM_HANDLED;
    }
    return 
HAM_IGNORED;

with that code only the CTs should be able to open the cells shooting at them.

i hope that it helps.
Th3822 is offline
KleirPlays
Member
Join Date: Jun 2013
Location: Portugal
Old 08-08-2014 , 03:03   Re: Door problem!
Reply With Quote #5

Does not work!

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>
#include <cstrike>

#define PLUGIN "Open Doors"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"

new cvar 

public plugin_init() 
{
register_plugin(PLUGINVERSIONAUTHOR)

cvar register_cvar("od_enabled""1")


if(
get_pcvar_num(cvar))
{
RegisterHam(Ham_TraceAttack"func_door_rotating""open_door")
RegisterHam(Ham_TraceAttack"func_door""open_door")
}
}

public 
open_door(thisidattackerFloat:damageFloat:direction[3], tracehandledamagebits)  

    if (
is_user_alive(idattacker) && cs_get_user_team(idattacker) == CS_TEAM_CT
    { 
        
dllfunc(DLLFunc_Usethisidattacker); 
        return 
HAM_HANDLED
    } 
    return 
HAM_IGNORED

KleirPlays is offline
KleirPlays
Member
Join Date: Jun 2013
Location: Portugal
Old 08-19-2014 , 16:40   Re: Door problem!
Reply With Quote #6

Help!
KleirPlays is offline
Gh05t04
Senior Member
Join Date: Jul 2015
Old 07-19-2015 , 08:20   Re: Door problem!
Reply With Quote #7

bump
Gh05t04 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 14:10.


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