Raised This Month: $ Target: $400
 0% 

[JailBreak] T spy by exolent


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vaan123
Veteran Member
Join Date: Sep 2009
Location: Kuwait
Old 01-26-2010 , 19:52   [JailBreak] T spy by exolent
Reply With Quote #1

hello,

hey exo could you fix your plugin T Spy , this error appears whenever i start my hlds :


Quote:
Originally Posted by error
Mod_NumForName : models/player//.mdl not found
CODE :

Code:
#include < amxmodx >
#include < cstrike >
#include < fun >
#include < fakemeta >
#include < hamsandwich >

new const SPY_CHANCE = 5;
new const SPY_MODEL[ ] = "";
new const SPY_WEAPONS[ ] = {
    CSW_KNIFE,
    CSW_ELITE
};
new const SPY_HEALTH = 100;

new const g_szWeaponClassnames[ ][ ] =
{
    "",
    "weapon_p228",
    "",
    "weapon_scout",
    "weapon_hegrenade",
    "weapon_xm1014",
    "weapon_c4",
    "weapon_mac10",
    "weapon_aug",
    "weapon_smokegrenade",
    "weapon_elite",
    "weapon_fiveseven",
    "weapon_ump45",
    "weapon_sg550",
    "weapon_galil",
    "weapon_famas",
    "weapon_usp",
    "weapon_glock18",
    "weapon_awp",
    "weapon_mp5navy",
    "weapon_m249",
    "weapon_m3",
    "weapon_m4a1",
    "weapon_tmp",
    "weapon_g3sg1",
    "weapon_flashbang",
    "weapon_deagle",
    "weapon_sg552",
    "weapon_ak47",
    "weapon_knife",
    "weapon_p90"
};

enum AmmoTypes
{
    AMMO_CLIP,
    AMMO_BACKPACK
};

new const g_iWeaponMaxAmmo[ sizeof( g_szWeaponClassnames ) ][ AmmoTypes ] =
{
    { 0, 0 },
    { 13, 52 },
    { 0, 0 },
    { 10, 90 },
    { 0, 0 },
    { 7, 32 },
    { 0, 0 },
    { 30, 100 },
    { 30, 90 },
    { 0, 0 },
    { 30, 120 },
    { 20, 100 },
    { 25, 100 },
    { 30, 90 },
    { 35, 90 },
    { 25, 90 },
    { 12, 100 },
    { 20, 120 },
    { 10, 30 },
    { 30, 120 },
    { 100, 200 },
    { 8, 32 },
    { 30, 90 },
    { 30, 120 },
    { 20, 90 },
    { 0, 0 },
    { 7, 35 },
    { 30, 90 },
    { 30, 90 },
    { 0, 0 },
    { 50, 100 }
};

new bool:g_bSpy;

new g_iMsgId_TeamInfo;

public plugin_precache( ) {
    new szModel[ 128 ];
    formatex( szModel, 127, "models/player/%s/%s.mdl", SPY_MODEL, SPY_MODEL );
    precache_model( szModel );
}

public plugin_init( ) {
    register_plugin( "T Spy", "0.0.1", "Exolent" );
    
    register_event( "HLTV", "EventNewRound", "a", "1=0", "2=0" );
    
    RegisterHam( Ham_Spawn, "player", "FwdPlayerSpawn", 1 );
    
    g_iMsgId_TeamInfo = get_user_msgid( "TeamInfo" );
}

public EventNewRound( ) {
    g_bSpy = false;
}

public FwdPlayerSpawn( iPlayer ) {
    if( !g_bSpy
    && is_user_alive( iPlayer )
    && cs_get_user_team( iPlayer ) == CS_TEAM_T ) {
        if( random_num( 1, 100 ) <= SPY_CHANCE ) {
            g_bSpy = true;
            
            new iBlock = get_msg_block( g_iMsgId_TeamInfo );
            set_msg_block( g_iMsgId_TeamInfo, BLOCK_SET );
            
            fm_cs_set_user_team( iPlayer, CS_TEAM_CT );
            ExecuteHamB( Ham_CS_RoundRespawn, iPlayer );
            fm_cs_set_user_team( iPlayer, CS_TEAM_T );
            
            set_msg_block( g_iMsgId_TeamInfo, iBlock );
            
            cs_set_user_model( iPlayer, SPY_MODEL );
            
            strip_user_weapons( iPlayer );
            
            new iWeapon, iEntity, iAmmo;
            for( new i = 0; i < sizeof( SPY_WEAPONS ); i++ ) {
                iWeapon = SPY_WEAPONS[ i ];
                iEntity = give_item( iPlayer, g_szWeaponClassnames[ iWeapon ] );
                
                iAmmo = g_iWeaponMaxAmmo[ iWeapon ][ AMMO_CLIP ];
                if( iAmmo ) {
                    cs_set_weapon_ammo( iEntity, iAmmo );
                }
                
                iAmmo = g_iWeaponMaxAmmo[ iWeapon ][ AMMO_BACKPACK ];
                if( iAmmo ) {
                    cs_set_user_bpammo( iPlayer, iWeapon, iAmmo );
                }
            }
            
            set_user_health( iPlayer, SPY_HEALTH );
            
            client_print( iPlayer, print_center, "You are a SPY! (%i%% chance)", SPY_CHANCE );
        }
    }
}

// ConnorMcLeod
fm_cs_set_user_team(id, {CsTeams,_}:iTeam, {CsInternalModel,_}:iModel = CsInternalModel:CS_DONTCHANGE)
{
    static const OFFSET_TEAM = 114;
    static const OFFSET_INTERNALMODEL = 126;
    
    if( iTeam > CS_TEAM_SPECTATOR )
        return;

    set_pdata_int(id, OFFSET_TEAM, _:iTeam);

    if( iModel )
    {
        set_pdata_int(id, OFFSET_INTERNALMODEL, _:iModel);
    }

    dllfunc(DLLFunc_ClientUserInfoChanged, id, engfunc(EngFunc_GetInfoKeyBuffer, id));

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

    emessage_begin(MSG_ALL, g_iMsgId_TeamInfo);
    ewrite_byte(id);
    ewrite_string(szTeams[_:iTeam]);
    emessage_end();
}
ORIGINAL THREAD :
http://forums.alliedmods.net/showthread.php?t=114581

please fix it



thanks a bunch =)
__________________


Last edited by vaan123; 01-26-2010 at 19:59.
vaan123 is offline
Send a message via MSN to vaan123 Send a message via Yahoo to vaan123 Send a message via Skype™ to vaan123
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 01-26-2010 , 20:03   Re: [JailBreak] T spy by exolent
Reply With Quote #2

You need to edit the
PHP Code:
new const SPY_MODEL[ ] = ""
to whatever model you want the spy to have. If you leave it blank then you'll get that error.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
vaan123
Veteran Member
Join Date: Sep 2009
Location: Kuwait
Old 01-26-2010 , 20:21   Re: [JailBreak] T spy by exolent
Reply With Quote #3

how the hell did i miss that , im an idiot thanks wrecked !
__________________

vaan123 is offline
Send a message via MSN to vaan123 Send a message via Yahoo to vaan123 Send a message via Skype™ to vaan123
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 01-26-2010 , 22:12   Re: [JailBreak] T spy by exolent
Reply With Quote #4

No problem, I'm not a , for the record. I'm a pirate.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
mininova
BANNED
Join Date: Mar 2009
Old 01-28-2010 , 09:33   Re: [JailBreak] T spy by exolent
Reply With Quote #5

One question
This would be changing x number of users CS_TEAM_T?


PHP Code:
public FwdPlayerSpawniPlayer ) {
    if( !
g_bSpy
    
&& is_user_aliveiPlayer )
    && 
cs_get_user_teamiPlayer ) == CS_TEAM_T ) {
        if( 
random_num1100 ) <= SPY_CHANCE ) {
            
g_bSpy true;
            
            new 
iBlock get_msg_blockg_iMsgId_TeamInfo );
            
set_msg_blockg_iMsgId_TeamInfoBLOCK_SET );
            
            
fm_cs_set_user_teamiPlayerCS_TEAM_CT );
            
ExecuteHamBHam_CS_RoundRespawniPlayer );
            
fm_cs_set_user_teamiPlayerCS_TEAM_T );
            
            
set_msg_blockg_iMsgId_TeamInfoiBlock );
            
            
cs_set_user_modeliPlayerSPY_MODEL );
            
            
strip_user_weaponsiPlayer );
            
            new 
iWeaponiEntityiAmmo;
            for( new 
0sizeofSPY_WEAPONS ); i++ ) {
                
iWeapon SPY_WEAPONS];
                
iEntity give_itemiPlayerg_szWeaponClassnamesiWeapon ] );
                
                
iAmmo g_iWeaponMaxAmmoiWeapon ][ AMMO_CLIP ];
                if( 
iAmmo ) {
                    
cs_set_weapon_ammoiEntityiAmmo );
                }
                
                
iAmmo g_iWeaponMaxAmmoiWeapon ][ AMMO_BACKPACK ];
                if( 
iAmmo ) {
                    
cs_set_user_bpammoiPlayeriWeaponiAmmo );
                }
            }
            
            
set_user_healthiPlayerSPY_HEALTH );
            
            
client_printiPlayerprint_center"You are a SPY! (%i%% chance)"SPY_CHANCE );
        }
    }




mininova is offline
Send a message via MSN to mininova
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-28-2010 , 15:50   Re: [JailBreak] T spy by exolent
Reply With Quote #6

Quote:
Originally Posted by mininova View Post
One question
This would be changing x number of users CS_TEAM_T?
No.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 07:21.


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