Raised This Month: $ Target: $400
 0% 

Deathrun Manager by xPaw v3.0.3 [13/02/2010]


Post New Thread Reply   
 
Thread Tools Display Modes
neXo112
Junior Member
Join Date: Nov 2008
Old 12-25-2008 , 07:45   Re: Deathrun Manager v1.2a [25/12/2008]
Reply With Quote #81

Please fix it
neXo112 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 12-25-2008 , 07:53   Re: Deathrun Manager v1.2a [25/12/2008]
Reply With Quote #82

check my post above lol.
__________________
xPaw is offline
neXo112
Junior Member
Join Date: Nov 2008
Old 12-25-2008 , 08:15   Re: Deathrun Manager v1.2a [25/12/2008]
Reply With Quote #83

But mostly the people turns to the sky like this and can't move

[IMG]http://img338.**************/img338/425/skyjo6.th.png[/IMG]
neXo112 is offline
oDo
New Member
Join Date: Dec 2008
Location: Lithuania
Old 12-25-2008 , 13:26   Re: Deathrun Manager v1.2a [25/12/2008]
Reply With Quote #84

Quote:
Originally Posted by neXo112 View Post
But mostly the people turns to the sky like this and can't move

[IMG]http://img338.**************/img338/425/skyjo6.th.png[/IMG]
This bug is and to me, but I deleted semiclip in xPaw plugin and use semiclip plugin. Now xPaw plugin works fine.
__________________
oDo is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 12-25-2008 , 13:58   Re: Deathrun Manager v1.2a [25/12/2008]
Reply With Quote #85

Quote:
Originally Posted by oDo View Post
This bug is and to me, but I deleted semiclip in xPaw plugin and use semiclip plugin. Now xPaw plugin works fine.
I see no reason for this plugin to do this, can you post a video of it so I can understand what you mean?
__________________

Community / No support through PM
danielkza is offline
Old 12-26-2008, 06:45
neXo112
This message has been deleted by neXo112.
neXo112
Junior Member
Join Date: Nov 2008
Old 12-26-2008 , 07:19   Re: Deathrun Manager v1.2a [25/12/2008]
Reply With Quote #86

Code:
/****************************************//**************************************/
/*                    *//*                    */
/*    Deathrun Manager        *//*    Other Plugins:            */
/*        by xPaw            *//*        Semiclip by danielkza    */
/*                    *//*        Spray Blocker        */
/*    Original code:            *//*        Radio Commands    Blocker    */
/*        by Grim            *//*        No Roundtimer & Money    */
/*                    *//*                    */
/****************************************//**************************************/

/** CVars
 *
 * Turn on/off the plugin
 *    deathrun_toggle 0/1 <default: 1>
 *
 * Turn on/off the spray blocker
 *    deathrun_spray 0/1 <default: 1>
 *
 * Turn on/off the radio commands blocker
 *    deathrun_radio 0/1 <default: 1>
 */

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

#pragma semicolon 1

// Plugin Version
#define VERSION "1.2a"

// Bools
new bool:g_Restart;
new bool:g_Randromized;
new bool:g_FirstRound;

new g_Toggle, g_SprayB, g_RadioB;
new g_Maxplayers, g_msgHideWeapon, g_msgCrosshair, g_msgTeamInfo, g_msgMoney;

#define OFFSET_TEAM 114

enum {
    FM_TEAM_UNASSIGNED,
    FM_TEAM_T,
    FM_TEAM_CT,
    FM_TEAM_SPECTATOR,
    
    FM_TEAM_MAX
};

// =======================================================================================

public plugin_init() {
    register_plugin("Deathrun Manager", VERSION, "xPaw");
    g_Toggle     = register_cvar("deathrun_toggle", "1");
    g_SprayB    = register_cvar("deathrun_spray", "1");
    g_RadioB    = register_cvar("deathrun_radio", "1");
    register_cvar("deathrun_version", VERSION, FCVAR_SERVER);
    set_cvar_string("deathrun_version", VERSION);
    
    // Registering Language file
    register_dictionary("deathrun.txt");

    // Logging Events
    register_logevent("eStartRound", 2, "1=Round_Start");
    register_logevent("eRandromize", 2, "1=Round_End");
    register_event("TextMsg",    "eRandromize",    "a", "2&#Game_w");
    register_event("Money",        "eMoney",    "b");
    register_event("ResetHUD",    "eResetHUD",    "be");
    
    // Forwards
    RegisterHam(Ham_Spawn, "player",    "fwHamPlayerSpawnPost", 1);
    register_forward(FM_StartFrame,        "fwStartFrame",    0);
    register_forward(FM_AddToFullPack,    "fwFullPack",    1);
    register_forward(FM_ClientKill,        "fwClientKill");
    register_forward(FM_CmdStart,        "cmdBlockSpray");
    
    // First round // Maxplayers
    g_FirstRound    = true;
    g_Maxplayers    = get_maxplayers();
    g_msgHideWeapon    = get_user_msgid( "HideWeapon" );
    g_msgCrosshair    = get_user_msgid( "Crosshair" );
    g_msgTeamInfo    = get_user_msgid( "TeamInfo" );
    g_msgMoney    = get_user_msgid( "Money" );
    
    // Block all radio commands
    register_clcmd("radio1",    "cmdBlockRadio");
    register_clcmd("radio2",    "cmdBlockRadio");
    register_clcmd("radio3",    "cmdBlockRadio");
    register_clcmd("coverme",    "cmdBlockRadio");
    register_clcmd("takepoint",    "cmdBlockRadio");
    register_clcmd("holdpos",    "cmdBlockRadio");
    register_clcmd("regroup",    "cmdBlockRadio");
    register_clcmd("followme",    "cmdBlockRadio");
    register_clcmd("takingfire",    "cmdBlockRadio");
    register_clcmd("go",        "cmdBlockRadio");
    register_clcmd("fallback",    "cmdBlockRadio");
    register_clcmd("sticktog",    "cmdBlockRadio");
    register_clcmd("getinpos",    "cmdBlockRadio");
    register_clcmd("stormfront",    "cmdBlockRadio");
    register_clcmd("report",    "cmdBlockRadio");
    register_clcmd("roger",        "cmdBlockRadio");
    register_clcmd("enemyspot",    "cmdBlockRadio");
    register_clcmd("needbackup",    "cmdBlockRadio");
    register_clcmd("sectorclear",    "cmdBlockRadio");
    register_clcmd("inposition",    "cmdBlockRadio");
    register_clcmd("reportingin",    "cmdBlockRadio");
    register_clcmd("getout",    "cmdBlockRadio");
    register_clcmd("negative",    "cmdBlockRadio");
    register_clcmd("enemydown",    "cmdBlockRadio");
    
    if( get_pcvar_num(g_Toggle) ) { // only called at new map
        // Terrorist Check
        set_task(30.0, "eTerrorCheck",_,_,_, "b");
    
        log_amx("[DeathRun] ON.");
    } else
        log_amx("[DeathRun] OFF.");
}

// =======================================================================================

// Making new Terr
public eRandromize() {
    if(get_pcvar_num(g_Toggle) == 0)
        return PLUGIN_HANDLED;
    
    if(g_FirstRound || g_Randromized)
        return PLUGIN_HANDLED;
    
    g_Randromized = true;
    
    new g_Players;
    new indexArray[32];
 
    for(new i=1; i<=g_Maxplayers; i++) {
        if(is_user_connected(i)) {
            indexArray[g_Players] = i;
            g_Players++;
        }
 
        if(get_user_team(i) == 1)
            fm_set_user_team(i, FM_TEAM_CT);
    }

    if(g_Players <= 1)
        return PLUGIN_HANDLED;
        
    if(g_FirstRound)
        return PLUGIN_HANDLED;

    new g_ID = indexArray[random_num(0, g_Players - 1)];
    
    if(get_user_team(g_ID) == 2 && is_user_connected(g_ID)) {
        new name[32];
        get_user_name(g_ID, name, 31);
    
        client_print(0, print_chat, "[Deathrun] %L", LANG_PLAYER, "MSG_NOW_TERR", name);

        fm_set_user_team(g_ID, FM_TEAM_T);
    } else {
        if(g_Restart)
            return PLUGIN_HANDLED;
        
        g_Restart = true;
        
        client_print(0, print_chat, "[Deathrun] %L", LANG_PLAYER, "MSG_TOO_LAZY");
        
        eRandromize();
        for(new i=0; i<g_Maxplayers; i++)
            if(is_user_alive(i) && get_user_team(i) == 2)
                fm_user_kill(i);
    }
    
    return PLUGIN_HANDLED;
}

// New Round
public eStartRound() {
    if(get_pcvar_num(g_Toggle) == 0)
        return PLUGIN_HANDLED;
    
    g_Randromized    = false;
    g_Restart    = false;
    
    new g_Players;
    
    for(new i=0; i<g_Maxplayers; i++)
        if(is_user_connected(i))
            g_Players++;
    
    if(g_Players <= 1)
        return PLUGIN_HANDLED;
    
    set_cvar_num("sv_autoteambalance", 0);
    set_cvar_num("mp_limitteams", g_Maxplayers);

    set_hudmessage(255, 127, 0, -1.0, 0.1, 2, 7.0, 7.0, 0.2, 0.5, -1);
    show_hudmessage(0, "%L", LANG_PLAYER, "MSG_PREPARE");
    
    if(g_FirstRound) {
        log_amx("[DeathRun] %L", LANG_SERVER, "MSG_STARTING");
        client_print(0, print_chat, "[Deathrun] %L", LANG_PLAYER, "MSG_STARTING");
        set_cvar_num("sv_restartround", 10);
        g_FirstRound = false;
    }
    return PLUGIN_CONTINUE;
}

// Terrorist check
public eTerrorCheck() {
    if(g_FirstRound)
        return PLUGIN_HANDLED;
    
    new g_Terrors;
    new g_Players;
    
    for(new i=0; i<g_Maxplayers; i++) {
        if(get_user_team(i) == 1)
            g_Terrors++;
            
        if(is_user_connected(i))
            g_Players++;
    }
    
    if(g_Players <= 1)
        return PLUGIN_HANDLED;
    
    if(g_Terrors == 0) {
        if(g_Restart)
            return PLUGIN_HANDLED;
        
        g_Restart = true;
        client_print(0, print_chat, "[Deathrun] %L", LANG_PLAYER, "MSG_NO_DETECT");
        log_amx("[DeathRun] %L", LANG_SERVER, "MSG_NO_DETECT");
        
        eRandromize();
        for(new i=0; i<g_Maxplayers; i++)
            if(is_user_alive(i) && get_user_team(i) == 2)
                fm_user_kill(i);
    }
    return PLUGIN_CONTINUE;
}

// Remove Timer & Money
public eResetHUD( id ) {
    if(!is_user_bot( id )) {
        message_begin( MSG_ALL, g_msgHideWeapon, _, id );
        write_byte( (1<<4 | 1<<5) );
        message_end();
    
        message_begin( MSG_ALL, g_msgCrosshair, _, id );
        write_byte( 0 );
        message_end();
    }
}

public client_disconnect()
    eTerrorCheck();

public eMoney( id )
    fm_set_user_money(id, 0);

// Lets strip player weapons...
public fwHamPlayerSpawnPost( id ) {
    if(!is_user_alive( id ))
        return PLUGIN_HANDLED;
    
    fm_strip_user_weapons( id );
    fm_give_item(id, "weapon_knife");
    fm_give_item(id, "weapon_usp");
    fm_give_item(id, "ammo_45acp");
    fm_give_item(id, "ammo_45acp");
    fm_give_item(id, "ammo_45acp");
    fm_give_item(id, "ammo_45acp");
    return PLUGIN_CONTINUE;
}

// =======================================================================================
// Block commands
// =======================================================================================

public cmdBlockRadio( id ) {
    if(get_pcvar_num(g_RadioB) == 1) {
        if(is_user_alive(id))
            client_print(id, print_center, "%L", id, "BLOCK_RADIO");
        return PLUGIN_HANDLED;
    }
    return PLUGIN_CONTINUE;
}

public fwClientKill( id ) {
    if(!is_user_alive(id))
        return FMRES_IGNORED;

    client_print(id, print_chat, "[Deathrun] You can't kill yourself!");
    client_print(id, print_console, "[Deathrun] You can't kill yourself!");
    return FMRES_SUPERCEDE;
}

public cmdBlockSpray( id, uc_handle, seed ) {
    if(get_pcvar_num(g_SprayB) == 0)
        return PLUGIN_HANDLED;
    
    if(get_uc(uc_handle, UC_Impulse) == 201) {
        set_uc(uc_handle, UC_Impulse, 0);
        client_print(id, print_center, "%L", id, "BLOCK_SPRAY");
        return FMRES_HANDLED;
    }
    return FMRES_IGNORED;
}

// =======================================================================================
// Stocks
// =======================================================================================

stock fm_create_entity(const classname[])
    return engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, classname));

stock fm_set_user_team(client, team) {
    set_pdata_int(client, OFFSET_TEAM, team);

    static const TeamInfo[FM_TEAM_MAX][] = {
        "UNASSIGNED",
        "TERRORIST",
        "CT",
        "SPECTATOR"
    };

    message_begin(MSG_ALL, g_msgTeamInfo);
    write_byte(client);
    write_string(TeamInfo[team]);
    message_end();
}

stock fm_set_user_money ( id, i_Money ) {
    set_pdata_int ( id, 115, i_Money );

    message_begin ( MSG_ONE, g_msgMoney, _, id );
    write_long ( i_Money );
    write_byte ( 1 );
    message_end ();
}

stock fm_user_kill(index) {
    dllfunc(DLLFunc_ClientKill, index);

    return 1;
}

stock fm_strip_user_weapons(index) {
    new ent = fm_create_entity("player_weaponstrip");
    if (!pev_valid(ent))
        return 0;

    dllfunc(DLLFunc_Spawn, ent);
    dllfunc(DLLFunc_Use, ent, index);
    engfunc(EngFunc_RemoveEntity, ent);

    return 1;
}

stock fm_give_item(index, const item[]) {
    if (!equal(item, "weapon_", 7) && !equal(item, "ammo_", 5) && !equal(item, "item_", 5))
        return 0;

    new ent = fm_create_entity(item);
    if (!pev_valid(ent))
        return 0;

    new Float:origin[3];
    pev(index, pev_origin, origin);
    set_pev(ent, pev_origin, origin);
    set_pev(ent, pev_spawnflags, pev(ent, pev_spawnflags) | SF_NORESPAWN);
    dllfunc(DLLFunc_Spawn, ent);

    new save = pev(ent, pev_solid);
    dllfunc(DLLFunc_Touch, ent, index);
    if (pev(ent, pev_solid) != save)
        return ent;

    engfunc(EngFunc_RemoveEntity, ent);

    return -1;
}
Here's without semiclip, if you like it +karma.

Last edited by YamiKaitou; 12-26-2008 at 22:25.
neXo112 is offline
koyumu
Senior Member
Join Date: Jul 2008
Old 12-26-2008 , 07:37   Re: Deathrun Manager v1.2a [25/12/2008]
Reply With Quote #87

Quote:
Originally Posted by neXo112 View Post
But players turn to the sky

me too :/
__________________
[IMG]http://img80.**************/img80/4594/neyawndragon.gif[/IMG]





koyumu is offline
Old 12-26-2008, 08:00
neXo112
This message has been deleted by YamiKaitou. Reason: link no longer valid
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 12-26-2008 , 08:04   Re: Deathrun Manager v1.2a [25/12/2008]
Reply With Quote #88

neXo please remove your code, i added nonsemiclip version in first post.
__________________
xPaw is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 12-26-2008 , 10:29   Re: Deathrun Manager v1.2a [25/12/2008]
Reply With Quote #89

Also dont show the .amxx, I want to see the .sma file as well. Otherwise remove your code, reupload the .sma or get close to a ban . Its Forum Rules, Its a Heads Up for you NeXo
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 12-26-2008 , 12:09   Re: Deathrun Manager v1.2a [25/12/2008]
Reply With Quote #90

Could you guys do a better description of the 'point to the sky problem'? Does it happen on spawn, while spectating? Are there any players near you? etc, so I can try to fix it.
__________________

Community / No support through PM
danielkza is offline
Old 12-26-2008, 13:21
mazafaka
This message has been deleted by Greentryst. Reason: unhelpful and obnoxious
Old 12-26-2008, 13:41
DruGzOG
This message has been deleted by Greentryst. Reason: reply to deleted post
Old 12-26-2008, 13:41
danielkza
This message has been deleted by Greentryst. Reason: reply to deleted post
Old 12-26-2008, 14:04
bmann_420
This message has been deleted by Greentryst. Reason: reply to deleted post
Old 12-26-2008, 14:22
mazafaka
This message has been deleted by Greentryst. Reason: unhelpful and obnoxious
Old 12-26-2008, 14:25
bmann_420
This message has been deleted by Greentryst. Reason: reply to deleted post
Old 12-26-2008, 22:35
YamiKaitou
This message has been deleted by Greentryst. Reason: reply to deleted post
Old 12-27-2008, 00:55
mazafaka
This message has been deleted by Greentryst. Reason: unhelpful and obnoxious
Old 12-27-2008, 04:30
xPaw
This message has been deleted by Greentryst. Reason: reply to deleted post
Old 12-27-2008, 10:06
DruGzOG
This message has been deleted by Greentryst. Reason: reply to deleted post
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 07:20.


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