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

Problema Abrir Celdas JailBreak No se abren


  
 
 
Thread Tools Display Modes
Author Message
AlgoChikitito
BANNED
Join Date: Feb 2011
Location: Espaņa
Old 09-12-2011 , 18:24   Problema Abrir Celdas JailBreak No se abren
#1

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>
#include <cstrike>

new const VERSION[] = "1.6"

new found[10]

public 
plugin_init()
{
    
register_plugin"Auto Cells Opener"VERSION"Wrecked" )
    
    
register_clcmd"say /abrir""CMD_PushButton")
}

public 
CMD_PushButtonid )
{
    if ( 
cs_get_user_team (id) == CS_TEAM_CT )
    {
        new 
name 32 ]
        
get_user_name id name 31 )
        
ChatColor "!t[!gJailBreak!t] !nEl Policia !g%s !nA Abierto Las Celdas De Los Presos" name)
        
Push_Button()
    }
    else if ( 
get_user_flags(id) & ADMIN_KICK )
    {
        
Push_Button()
        new 
name 32 ]
        
get_user_name id name 31 )
        
ChatColor "!t[!gJailBreak!t] !nEl Administrador !g%s !nA Abierto Las Celdas De Los Presos" name)
    }    
    return 
PLUGIN_HANDLED
}

public 
Push_Button() 

        new 
ent 
        
new ent3 
        
new Float:origin[3
        new 
Float:radius 200.0 
        
new class[32
        new 
name[32]
        new 
pos 
        
while((pos <= sizeof(found)) && (ent engfunc(EngFunc_FindEntityByStringent"classname""info_player_deathmatch"))) // info_player_deathmatch = tspawn
        

                new 
ent2 
                pev
(entpev_originorigin
                while((
ent2 engfunc(EngFunc_FindEntityInSphereent2originradius)))  // find doors near T spawn
                

                        if(!
pev_valid(ent2)) 
                                continue 

                        
pev(ent2pev_classname, class, charsmax(class)) 
                        if(!
equal(class, "func_door")) // if it's not a door, move on to the next iteration
                                
continue 

                        
pev(ent2pev_targetnamenamecharsmax(name)) 
                        
ent3 engfunc(EngFunc_FindEntityByString0"target"name// find button that opens this door
                        
if(pev_valid(ent3) && (in_array(ent3foundsizeof(found)) < 0)) 
                        { 
                                
ExecuteHamB(Ham_Useent30011.0// zomg poosh it
                                
found[pos] = ent3 
                                pos
++ // next
                                
break // break from current while loop
                        

                } 
        } 
        return 
pos 


stock in_array(needledata[], size

        for(new 
0sizei++) 
        { 
                if(
data[i] == needle
                        return 

        

        return -

}  

stock ChatColor(const id, const input[], any:...)
{
    new 
count 1players[32]
    static 
msg[191]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4"// Green Color
    
replace_all(msg190"!n""^1"// Default Color
    
replace_all(msg190"!t""^3"// Team Color

    
if (idplayers[0] = id; else get_players(playerscount"ch")
    {
        for (new 
0counti++)
    {
        if (
is_user_connected(players[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])
            
write_byte(players[i]);
            
write_string(msg);
            
message_end();
        }
          }
    }

Al escribir /abrir , si se manda el mensaje , pero no abre las puertas. Antes hice uno que si funciono a medias , solo le abrian a los admins.

Ahora no funciona
AlgoChikitito is offline
Kiske
Veteran Member
Join Date: May 2009
Old 09-12-2011 , 21:03   Re: Problema Abrir Celdas JailBreak No se Habren
#2

No estoy seguro de que haga lo mismo que ese plugin, pero este abre todas las entidades func_door_rotating y func_door
Solo se puede usar 1 vez por ronda.

PHP Code:
#include <amxmodx>
#include <engine>

new g_open_doors;

public 
plugin_init()
{
    new 
g_plugin_name[] = "Open Doors";
    new 
g_plugin_version[] = "v1.0.0";
    new 
g_plugin_author[] = "Kiske";
    
    
register_plugin(g_plugin_nameg_plugin_versiong_plugin_author);
    
    
register_event("HLTV""event_HLTV""a""1=0""2=0");
    
    
register_clcmd("say /abrir""clcmd_OpenDoors");
}

public 
event_HLTV()
{
    
g_open_doors 0;
}

public 
clcmd_OpenDoors(id)
{
    if(!
is_user_alive(id) || g_open_doors)
        return 
PLUGIN_HANDLED;
    
    static 
name[32];
    
get_user_name(idnamecharsmax(name));
    
    if(
cs_get_user_team(id) == CS_TEAM_CT)
    { 
        
ChatColor(0"!t[!gJailBreak!t] !nEl Policia !g%s !nA Abierto Las Celdas De Los Presos"name);
        
fn_open_doors(id);
    } 
    else if(
get_user_flags(id) & ADMIN_KICK)
    { 
        
ChatColor(0"!t[!gJailBreak!t] !nEl Administrador !g%s !nA Abierto Las Celdas De Los Presos"name);
        
fn_open_doors(id);
    }

    return 
PLUGIN_HANDLED;
}

fn_open_doors(id)
{
    static 
entity;
    
    while((
entity find_ent_by_class(entity"func_door_rotating")) != 0force_use(identity);
    while((
entity find_ent_by_class(entity"func_door")) != 0force_use(identity);

    
g_open_doors 1;

Kiske is offline
Send a message via Skype™ to Kiske
AlgoChikitito
BANNED
Join Date: Feb 2011
Location: Espaņa
Old 09-13-2011 , 07:33   Re: Problema Abrir Celdas JailBreak No se Habren
#3

Funciono Perfecto. Muchas Gracias Kiske

Te dejo 10 cangrejos ;)

AlgoChikitito is offline
Old 09-13-2011, 07:37
Stereo
This message has been deleted by Starsailor.
Old 09-13-2011, 12:29
fpA
This message has been deleted by Starsailor.
Old 09-13-2011, 18:14
AlgoChikitito
This message has been deleted by Starsailor.
 



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:39.


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