AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [ REALLY URGENTLY ] Edit 2 plugins (https://forums.alliedmods.net/showthread.php?t=184847)

dreamiing 05-09-2012 11:39

[ REALLY URGENTLY ] Edit 2 plugins
 
The plugin: vortexgame_deathrun do not accept this plugin smoke: vortexgame_vipdr2.


HELP ME !!!!!!!!!!!!!!!!!!!!!!!!!!


vortexgame_deathrun
PHP Code:

/*** 
 * Link to the plugin 
 * 
 *    [url]http://forums.alliedmods.net/showthread.php?t=78197[/url] 
 */ 

#include < amxmodx > 
#include < engine > 
#include < cstrike > 
#include < fun > 
#include < fakemeta > 
#include < hamsandwich > 

#pragma semicolon 1 

// Comment this line if you do not want to have fake player ! 
// #define FAKE_PLAYER 

// Bot name 
#if defined FAKE_PLAYER 
    
new const g_szBotName[ ] = "DRM Fake Player"
#endif 

// Messages prefix 
new const g_szPrefix[ ] = "[ VG-Deathrun ]"

// Global Variables 
new bool:g_bHauntedHousebool:g_bGamerFunbool:g_bRandromizedbool:g_bStartingbool:g_bFirstRound
new 
bool:g_bEnabledbool:g_bRestartbool:g_bConnected33 ]; 

new 
g_pRemoveBuyZoneg_pHideHudsg_pBlockMoneyg_pLifeSystemg_pSvRestartg_pAutoBalanceg_pLimitTeams
new 
g_pNoFallDmgg_pGameNameg_pToggleg_pBlockSprayg_pBlockRadiog_pSemiclipg_pGiveUspg_pBlockKill

new 
g_iMsgHideWeapong_iMsgCrosshairg_iMsgMoneyg_iMsgTeamInfog_iMsgSayText
new 
g_iMaxplayersg_iHudSyncg_iHudSync2g_iLastTerrg_iThinker
new 
g_iSemiClip33 ], g_Lifes33 ]; 

#if defined FAKE_PLAYER 
    
new g_iFakeplayer
#endif 

// Macros 
#if cellbits == 32 
    #define OFFSET_BZ 235 
#else 
    #define OFFSET_BZ 268 
#endif 

// Colorchat 
enum Color 
    
NORMAL 1
    
GREEN
    
RED
    
BLUE 
}; 

new 
TeamName[ ][ ] = { 
    
""
    
"TERRORIST"
    
"CT"
    
"SPECTATOR" 
}; 

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

public plugin_init( ) { 
    new const 
VERSION[ ] = "3.0.3"
     
    
register_plugin"Deathrun Manager"VERSION"xPaw" ); 
     
    
g_pToggle        register_cvar"deathrun_toggle",     "1" ); 
    
g_pBlockSpray    register_cvar"deathrun_spray",      "1" ); 
    
g_pBlockRadio    register_cvar"deathrun_radio",      "1" ); 
    
g_pBlockKill     register_cvar"deathrun_blockkill",  "1" ); 
    
g_pBlockMoney    register_cvar"deathrun_blockmoney""1" ); 
    
g_pSemiclip      register_cvar"deathrun_semiclip",   "1" ); 
    
g_pGiveUsp       register_cvar"deathrun_giveusp",    "1" ); 
    
g_pHideHuds      register_cvar"deathrun_hidehud",    "1" ); 
    
g_pLifeSystem    register_cvar"deathrun_lifesystem""1" ); 
    
g_pGameName      register_cvar"deathrun_gamename",   "1" ); 
    
g_pNoFallDmg     register_cvar"deathrun_terrnfd",    "1" ); 
    
g_pRemoveBuyZone register_cvar"deathrun_removebz",   "0" ); 
     
    
// Lets get map name... 
    
new szMapName64 ]; 
    
get_mapnameszMapName63 ); 
     
    if( 
containszMapName"deathrun_" ) != -) { 
        
set_pcvar_numg_pToggle); 
         
        if( 
containszMapName"hauntedhouse" ) != -
            
g_bHauntedHouse true
        else { 
            
g_bHauntedHouse false
             
            if( 
equalszMapName"deathrun_gamerfun" ) ) 
                
g_bGamerFun true
            else 
                
g_bGamerFun false
        } 
    } else 
        
set_pcvar_numg_pToggle); 
     
    
g_pSvRestart   get_cvar_pointer"sv_restart" ); 
    
g_pAutoBalance get_cvar_pointer"mp_autoteambalance" ); 
    
g_pLimitTeams  get_cvar_pointer"mp_limitteams" ); 
     
    
register_cvar"deathrun_version"VERSIONFCVAR_SERVER FCVAR_SPONLY ); 
    
set_cvar_string"deathrun_version"VERSION ); 
     
    
// Registering Language file 
    
register_dictionary"dreamiing.txt" ); 
     
    
// Logging Events 
    
register_logevent"EventRoundStart"2"1=Round_Start" ); 
    
register_logevent"EventRandromize"2"1=Round_End" ); 
    
register_event"SendAudio""EventTerrsWin",   "a""2&%!MRAD_terwin" ); 
    
register_event"TextMsg",     "EventRandromize""a""2&#Game_w" ); 
    
register_event"DeathMsg",     "EventDeath",      "a"); 
    
register_event"Money",     "EventMoney",      "b" ); 
    
register_event"ResetHUD",     "EventResetHud",   "be" ); 
     
    
g_bFirstRound    true
    
g_iMaxplayers    get_maxplayers( ); 
    
g_iMsgHideWeapon get_user_msgid"HideWeapon" ); 
    
g_iMsgCrosshair  get_user_msgid"Crosshair" ); 
    
g_iMsgMoney      get_user_msgid"Money" ); 
    
g_iMsgSayText    get_user_msgid"SayText" ); 
    
g_iMsgTeamInfo   get_user_msgid"TeamInfo" ); 
     
    
g_iHudSync       CreateHudSyncObj( ); 
    
g_iHudSync2      CreateHudSyncObj( ); 
     
    if( 
get_pcvar_numg_pToggle ) ) { 
        
RegisterHamHam_TakeDamage"player""FwdHamPlayerDamage" ); 
        
RegisterHamHam_Spawn,      "player""FwdHamPlayerSpawn"); 
        
register_forwardFM_ClientKill,       "FwdClientKill" ); 
        
register_impulse201"FwdImpulse_201" ); 
         
        if( 
get_pcvar_numg_pGameName ) ) 
            
register_forwardFM_GetGameDescription"FwdGameDesc" ); 
         
        
register_clcmd"say /lifes""CmdShowlifes" ); 
        
register_clcmd"say /lives""CmdShowlifes" ); 
         
        
register_clcmd"radio1""CmdRadio" ); 
        
register_clcmd"radio2""CmdRadio" ); 
        
register_clcmd"radio3""CmdRadio" ); 
         
        
// Terrorist Check 
        
g_iThinkercreate_entity"info_target" ); 
         
        if( 
is_valid_entg_iThinker ) ) { 
            
entity_set_stringg_iThinkerEV_SZ_classname"DeathrunThinker" ); 
            
entity_set_floatg_iThinkerEV_FL_nextthinkget_gametime( ) + 20.0 ); 
             
                        
g_bRestart true
             
            
// First think will happen in 20.0, Restart will be done there. 
             
            
register_think"DeathrunThinker""FwdThinker" ); 
        } else { 
            
set_task15.0"CheckTerrorists"___"b" ); 
             
            
// Lets make restart after 20 seconds from map start. 
            
set_task20.0"RestartRound" ); 
        } 
         
        if( 
get_pcvar_numg_pRemoveBuyZone ) ) { 
            
register_messageget_user_msgid"StatusIcon" ), "MsgStatusIcon" ); // BuyZone Icon 
             
            // Remove buyzone on map 
            
remove_entity_name"info_map_parameters" ); 
            
remove_entity_name"func_buyzone" ); 
             
            
// Create own entity to block buying 
            
new iEntity create_entity"info_map_parameters" ); 
             
            
DispatchKeyValueiEntity"buying""3" ); 
            
DispatchSpawniEntity ); 
        } 
         
        if( 
get_pcvar_numg_pSemiclip ) ) { 
            
register_forwardFM_StartFrame,    "FwdStartFrame"); 
            
register_forwardFM_AddToFullPack,    "FwdFullPack",   ); 
        } 
         
        
g_bEnabled true
         
    
#if defined FAKE_PLAYER 
        
new iEntityiCount
         
        while( ( 
iEntity find_ent_by_classiEntity"info_player_deathmatch" ) ) > 
            if( 
iCount++ > 
                break; 
         
        if( 
iCount <= 
            
g_iFakeplayer = -1
         
        
set_task5.0"UpdateBot" ); 
         
        
register_messageget_user_msgid"DeathMsg" ), "MsgDeathMsg" ); 
    
#endif 
    
} else 
        
g_bEnabled false


// FAKEPLAYER 
/////////////////////////////////////////// 
#if defined FAKE_PLAYER 
    
public UpdateBot( ) { 
        if( 
g_iFakeplayer == -
            return; 
         
        new 
id find_player"i" ); 
         
        if( !
id ) { 
            
id engfuncEngFunc_CreateFakeClientg_szBotName ); 
            if( 
pev_validid ) ) { 
                
engfuncEngFunc_FreeEntPrivateDataid ); 
                
dllfuncMetaFunc_CallGameEntity"player"id ); 
                
set_user_infoid"rate""3500" ); 
                
set_user_infoid"cl_updaterate""25" ); 
                
set_user_infoid"cl_lw""1" ); 
                
set_user_infoid"cl_lc""1" ); 
                
set_user_infoid"cl_dlmax""128" ); 
                
set_user_infoid"cl_righthand""1" ); 
                
set_user_infoid"_vgui_menus""0" ); 
                
set_user_infoid"_ah""0" ); 
                
set_user_infoid"dm""0" ); 
                
set_user_infoid"tracker""0" ); 
                
set_user_infoid"friends""0" ); 
                
set_user_infoid"*bot""1" ); 
                
set_pevidpev_flagspevidpev_flags ) | FL_FAKECLIENT ); 
                
set_pevidpev_colormapid ); 
                 
                new 
szMsg128 ]; 
                
dllfuncDLLFunc_ClientConnectidg_szBotName"127.0.0.1"szMsg ); 
                
dllfuncDLLFunc_ClientPutInServerid ); 
                 
                
cs_set_user_teamidCS_TEAM_T ); 
                
ExecuteHamBHam_CS_RoundRespawnid ); 
                 
                
set_pevidpev_effectspevidpev_effects ) | EF_NODRAW ); 
                
set_pevidpev_solidSOLID_NOT ); 
                
dllfuncDLLFunc_Thinkid ); 
                 
                
g_iFakeplayer id
            } 
        } 
    } 
     
    public 
MsgDeathMsg( const iMsgId, const iMsgDest, const id ) { 
        if( 
get_msg_arg_int) == g_iFakeplayer 
            return 
PLUGIN_HANDLED
         
        return 
PLUGIN_CONTINUE
    } 
#endif 

// NEW TERRORIST 
/////////////////////////////////////////// 
public EventRandromize( ) { 
    if( !
g_bEnabled || g_bFirstRound || g_bRandromized 
        return 
PLUGIN_CONTINUE
     
    
g_bRandromized true
     
    new 
iiPlayers32 ], iNumiPlayer
    
get_playersiPlayersiNum"c" ); 
     
    if( 
iNum <= 
        return 
PLUGIN_CONTINUE
     
    for( 
0iNumi++ ) { 
        
iPlayer iPlayers]; 
         
        if( 
cs_get_user_teamiPlayer ) == CS_TEAM_T 
            
cs_set_user_teamiPlayerCS_TEAM_CT ); 
    } 
     
    new 
iRandomPlayerCsTeams:iTeam
     
    while( ( 
iRandomPlayer iPlayersrandom_num0iNum ) ] ) == g_iLastTerr ) { } 
     
    
g_iLastTerr iRandomPlayer
     
    
iTeam cs_get_user_teamiRandomPlayer ); 
     
    if( 
iTeam == CS_TEAM_T || iTeam == CS_TEAM_CT ) { 
        
cs_set_user_team(iRandomPlayerCS_TEAM_T); 
         
        new 
szName32 ]; 
        
get_user_nameiRandomPlayerszName31 ); 
         
        for( 
0iNumi++ ) 
            
ColorChat(iPlayers], RED"%s^4 %L"g_szPrefixiPlayers], "DR_NOW_TERR"szName); 
         
        if( !
g_bRestart && is_valid_entg_iThinker ) ) 
            
entity_set_floatg_iThinkerEV_FL_nextthinkget_gametime( ) + 15.0 ); 
    } else { 
        
g_bRandromized false
        
EventRandromize( ); 
    } 
     
    return 
PLUGIN_CONTINUE


// NEW ROUND 
/////////////////////////////////////////// 
public EventRoundStart( ) { 
    if( !
g_bEnabled 
        return 
PLUGIN_CONTINUE
     
    
g_bRandromized    false
    
g_bStarting    false
     
    new 
iiPlayers32 ], iNumiRealPlayersCsTeams:iTeam
    
get_playersiPlayersiNum"c" ); 
     
    if( 
iNum <= 
        return 
PLUGIN_CONTINUE
     
    for( 
0iNumi++ ) { 
        
iTeam cs_get_user_teamiPlayers] ); 
         
        if( 
iTeam == CS_TEAM_T || iTeam == CS_TEAM_CT 
            
iRealPlayers++; 
    } 
     
    if( 
iRealPlayers <= ) { 
        
set_hudmessage01280, -1.00.104.04.00.50.5); 
         
        for( 
0iNumi++ ) 
            
ShowSyncHudMsgiPlayers], g_iHudSync"%L"iPlayers], "DR_NOT_ENOUGH" ); 
         
        return 
PLUGIN_CONTINUE
    } 
     
    
set_pcvar_numg_pAutoBalance); 
    
set_pcvar_numg_pLimitTeams); 
     
    if( 
g_bFirstRound ) { 
        
set_hudmessage01280, -1.00.104.04.00.50.5); 
         
        for( 
0iNumi++ ) { 
            
ShowSyncHudMsgiPlayers], g_iHudSync"%L"iPlayers], "DR_STARTING" ); 
             
            
ColorChatiPlayers], RED"%s^1 %L"g_szPrefixiPlayers], "DR_STARTING_CC" ); 
        } 
         
        if( 
is_valid_entg_iThinker ) ) { 
            
g_bRestart true
             
            
entity_set_floatg_iThinkerEV_FL_nextthinkget_gametime( ) + 9.0 ); 
        } else 
            
set_task9.0"RestartRound" ); 
         
        
g_bStarting true
        
g_bFirstRound false
    } 
     
    return 
PLUGIN_CONTINUE


// CHECK TERRORIST 
/////////////////////////////////////////// 
public FwdThinkeriEntity ) { 
    if( 
g_bRestart ) { 
        
g_bRestart false
         
        
RestartRound( ); 
    } else 
        
CheckTerrorists( ); 
     
    
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + 15.0 ); 


public 
CheckTerrorists( ) { 
    if( !
g_bEnabled || g_bFirstRound || g_bStarting 
        return 
PLUGIN_CONTINUE
     
    new 
iiPlayers32 ], iTerrorsiNumiRealPlayersCsTeams:iTeam
    
get_playersiPlayersiNum"c" ); 
     
    if( 
iNum <= 
        return 
PLUGIN_CONTINUE
     
    for( 
0iNumi++ ) { 
        
iTeam cs_get_user_teamiPlayers] ); 
         
        if( 
iTeam == CS_TEAM_T 
            
iTerrors++; 
         
        if( 
iTeam == CS_TEAM_T || iTeam == CS_TEAM_CT 
            
iRealPlayers++; 
    } 
     
    if( 
iRealPlayers <= ) { 
        
set_hudmessage01280, -1.00.104.04.00.50.5); 
         
        for( 
0iNumi++ ) 
            
ShowSyncHudMsgiPlayers], g_iHudSync"%L"iPlayers], "DR_NOT_ENOUGH" ); 
         
        return 
PLUGIN_CONTINUE
    } 
     
    if( 
iTerrors == ) { 
        for( 
0iNumi++ ) { 
            
ColorChat(iPlayers], RED"%s^1 %L"g_szPrefixiPlayers], "DR_NO_DETECT"); 
             
            if( 
is_user_aliveiPlayers] ) && cs_get_user_teamiPlayers] ) == CS_TEAM_CT 
                
user_silentkilliPlayers] ); 
        } 
         
        
set_task0.5"EventRandromize" ); 
    } 
     
    return 
PLUGIN_CONTINUE


// LIFE SYSTEM 
/////////////////////////////////////////// 
public EventTerrsWin( ) { 
    if( !
g_bEnabled || g_bFirstRound 
        return 
PLUGIN_CONTINUE
     
    new 
iPlayers32 ], iNumiPlayer
    
get_playersiPlayersiNum"c" ); 
     
    if( 
iNum <= 
        return 
PLUGIN_CONTINUE
     
    new 
iLifeCvar get_pcvar_numg_pLifeSystem ); 
     
    for( new 
0iNumi++ ) { 
        
iPlayer iPlayers]; 
         
        if( 
cs_get_user_teamiPlayer ) == CS_TEAM_T ) { 
            
set_user_fragsiPlayerget_user_fragsiPlayer ) + ); 
             
            if( 
iLifeCvar == 
                
g_LifesiPlayer ]++; 
        } 
    } 
     
    return 
PLUGIN_CONTINUE


public 
EventDeath( ) { 
    if( !
g_bEnabled 
        return 
PLUGIN_CONTINUE
     
#if defined FAKE_PLAYER 
    
new iVictim read_data); 
    new 
iTeam get_user_teamiVictim ); 
     
    if( 
iTeam == && is_user_aliveg_iFakeplayer ) ) 
        
fakedamageg_iFakeplayer"worldspawn"100.0DMG_GENERIC ); 
     
    if( !
get_pcvar_numg_pLifeSystem ) ) 
        return 
PLUGIN_CONTINUE
#else 
    
if( !get_pcvar_numg_pLifeSystem ) ) 
        return 
PLUGIN_CONTINUE
     
    new 
iVictim read_data); 
    new 
iTeam get_user_teamiVictim ); 
#endif 
     
    
new iKiller read_data); 
     
    if( 
iKiller != iVictim && get_user_team(iKiller) != iTeam 
        
g_Lifes[iKiller]++; 
     
    if( 
cs_get_user_teamiVictim ) == CS_TEAM_CT && g_LifesiVictim ] > ) { 
        new 
iCTcount
        for( new 
1<= g_iMaxplayersi++ ) { 
            if( 
is_user_alive) && cs_get_user_team) == CS_TEAM_CT 
                
iCTcount++; 
        } 
         
        if( 
iCTcount ) { 
            
set_task(3.2"fnRevivePlayer"iVictim); 
             
            
ColorChatiVictimRED"%s^1 %L"g_szPrefixiVictim"DR_LIFE_RESPAWN" ); 
        } 
        
/*else 
            ColorChat( iVictim, RED, "%s^1 %L", g_szPrefix, iVictim, "DR_LIFE_CANT" );*/ 
    

     
    return 
PLUGIN_CONTINUE


public 
fnRevivePlayerid ) { 
    if( 
g_bConnectedid ] ) { 
        if( 
cs_get_user_teamid ) == CS_TEAM_CT ) { 
            new 
iCTcount
            for( new 
1<= g_iMaxplayersi++ ) 
                if( 
is_user_alive) && cs_get_user_team) == CS_TEAM_CT 
                    
iCTcount++; 
             
            if( 
iCTcount ) { 
                
ExecuteHamBHam_CS_RoundRespawnid ); 
                 
                
g_Lifesid ]--; 
            } 
        } 
    } 


public 
CmdShowlifesid ) { 
    if( 
get_pcvar_numg_pLifeSystem ) == ) { 
        
ColorChatidRED"%s^1 %L"g_szPrefixid"DR_LIFE_DISABLE" ); 
        return 
PLUGIN_HANDLED
    } 
     
    if( 
g_Lifesid ] > 
        
ColorChatidRED"%s^1 %L"g_szPrefixid"DR_LIFE_CC_COUNT"g_Lifesid ] ); 
    else 
        
ColorChatidRED"%s^1 %L"g_szPrefixid"DR_LIFE_CC_NO" ); 
     
    return 
PLUGIN_HANDLED


public 
Showlifesid ) { 
    
set_hudmessage012800.040.7102.52.50.50.5); 
     
    if( 
g_Lifesid ] > 
        
ShowSyncHudMsgidg_iHudSync2"%L"id"DR_LIFE_COUNT"g_Lifesid ] ); 
    else 
        
ShowSyncHudMsgidg_iHudSync2"%L"id"DR_LIFE_NO" ); 


// EVENTS 
/////////////////////////////////////////// 
public EventResetHudid ) { 
    if( 
g_bEnabled && get_pcvar_numg_pHideHuds ) && !is_user_botid ) ) { 
        
message_beginMSG_ONE_UNRELIABLEg_iMsgHideWeapon_id ); 
        
write_byte( ( 1<<1<<) ); 
        
message_end( ); 
         
        
message_beginMSG_ONE_UNRELIABLEg_iMsgCrosshair_id ); 
        
write_byte); 
        
message_end( ); 
    } 


public 
EventMoneyid ) { 
    if( 
g_bEnabled && get_pcvar_numg_pBlockMoney ) ) { 
        
set_pdata_intid115); 
         
        
message_beginMSG_ONE_UNRELIABLEg_iMsgMoney_id ); 
        
write_long ); 
        
write_byte ); 
        
message_end( ); 
    } 


public 
client_putinserverid 
    
g_bConnectedid ] = true

public 
client_disconnectid ) { 
    
g_bConnectedid ] = false
    
CheckTerrorists( ); 
     
    if( !
g_bRestart && is_valid_entg_iThinker ) ) 
        
entity_set_floatg_iThinkerEV_FL_nextthinkget_gametime( ) + 15.0 ); 
     
#if defined FAKE_PLAYER 
    
if( g_iFakeplayer == id ) { 
        
set_task1.5"UpdateBot" ); 
         
        
g_iFakeplayer 0
    } 
#endif 


// SEMICLIP 
/////////////////////////////////////////// 
public FwdFullPackeseenthostflagsplayerpSet ) { 
    if( !
g_bEnabled 
        return 
FMRES_IGNORED
     
    if( 
player && g_iSemiClipent ] && g_iSemiCliphost ] ) { 
        
set_esesES_SolidSOLID_NOT ); 
        
set_esesES_RenderModekRenderTransAlpha ); 
        
set_esesES_RenderAmt85 ); 
    } 
     
    return 
FMRES_IGNORED


public 
FwdStartFrame( ) { 
    if( !
g_bEnabled 
        return 
FMRES_IGNORED
     
    static 
iPlayers32 ], iNumiPlayeriPlayer2ij
    
get_playersiPlayersiNum"ache""CT" ); 
     
    
arraysetg_iSemiClip032 ); 
     
    if( 
iNum <= 
        return 
FMRES_IGNORED
     
    for( 
0iNumi++ ) { 
        
iPlayer iPlayers]; 
         
        for( 
0iNumj++ ) { 
            
iPlayer2 iPlayers]; 
             
            if( 
iPlayer == iPlayer2 
                continue; 
             
            if( 
g_iSemiClipiPlayer ] && g_iSemiClipiPlayer2 ] ) 
                continue; 
             
            if( 
entity_rangeiPlayeriPlayer2 ) < 128 ) { 
                
g_iSemiClipiPlayer ]    = true
                
g_iSemiClipiPlayer2 ]    = true
            } 
        } 
    } 
     
    for( 
0iNumi++ ) { 
        
iPlayer iPlayers]; 
         
        
set_peviPlayerpev_solidg_iSemiClipiPlayer ] ? SOLID_NOT SOLID_SLIDEBOX ); 
    } 
     
    return 
FMRES_IGNORED


// FORWARDS 
/////////////////////////////////////////// 
public FwdHamPlayerSpawnid ) { 
    if( !
g_bEnabled || !is_user_aliveid ) ) 
        return 
HAM_IGNORED
     
    if( 
get_pcvar_numg_pBlockRadio ) ) // thanks to ConnorMcLeod for this good way :) 
        
set_pdata_intid192); 
     
#if defined FAKE_PLAYER 
    
if( g_iFakeplayer == id ) { 
        
set_pevidpev_frags, -1000.0 ); 
        
cs_set_user_deathsid, -1000 ); 
         
        
set_pevidpev_effectspevidpev_effects ) | EF_NODRAW ); 
        
set_pevidpev_solidSOLID_NOT ); 
        
entity_set_originidFloat:{ 999999.0999999.0999999.0 } ); 
        
dllfuncDLLFunc_Thinkid ); 
    } else { 
#endif 
        
new CsTeams:iTeam cs_get_user_teamid ); 
         
        
// An small delay for message 
        
if( get_pcvar_numg_pLifeSystem ) != && iTeam == CS_TEAM_CT 
            
set_task0.8"Showlifes"id ); 
         
        
strip_user_weaponsid ); 
        
give_itemid"weapon_knife" ); 
         
        
set_pdata_intid116); // Pickup fix by ConnorMcLeod 
         
        
if( g_bGamerFun && iTeam == CS_TEAM_CT 
            
give_itemid"weapon_deagle" ); 
         
        if( 
get_pcvar_numg_pGiveUsp ) && iTeam == CS_TEAM_CT && !g_bHauntedHouse 
            
set_task1.0"GiveUsp"id ); 

#if defined FAKE_PLAYER 
    

#endif 
     
    
return HAM_IGNORED


public 
GiveUsp( const id ) { 
    if( 
is_user_aliveid ) ) { 
        
give_itemid"weapon_usp" ); 
        
cs_set_user_bpammoidCSW_USP100 ); 
    } 


public 
FwdGameDesc( ) { 
    static const 
GameName[ ] = "Deathrun v3.0"
     
    
forward_returnFMV_STRINGGameName ); 
     
    return 
FMRES_SUPERCEDE


public 
FwdClientKill( const id ) { 
    if( !
g_bEnabled || !is_user_alive(id) ) 
        return 
FMRES_IGNORED
     
    if( 
get_pcvar_numg_pBlockKill ) || cs_get_user_teamid ) == CS_TEAM_T ) { 
        
client_printidprint_center"%L"id"DR_BLOCK_KILL" ); 
        
client_printidprint_console"%L"id"DR_BLOCK_KILL" ); 
         
        return 
FMRES_SUPERCEDE
    } 
     
    return 
FMRES_IGNORED


public 
FwdImpulse_201( const id ) { 
    if( 
g_bEnabled && get_pcvar_numg_pBlockSpray ) ) { 
        if( 
is_user_aliveid ) ) 
            
client_printidprint_center"%L"id"DR_BLOCK_SPRAY" ); 
         
        return 
PLUGIN_HANDLED_MAIN
    } 
     
    return 
PLUGIN_CONTINUE


public 
FwdHamPlayerDamageididInflictoridAttackerFloat:flDamageiDamageBits ) { 
    if( 
get_pcvar_numg_pNoFallDmg ) ) 
        if( 
iDamageBits DMG_FALL 
            if( 
get_user_teamid ) == 
                return 
HAM_SUPERCEDE
     
    return 
HAM_IGNORED


public 
MsgStatusIconmsg_idmsg_destid ) { 
    new 
szIcon]; 
    
get_msg_arg_string2szIcon); 
     
    static const 
BuyZone[ ] = "buyzone"
     
    if( 
equalszIconBuyZone ) ) { 
        
set_pdata_intidOFFSET_BZget_pdata_intidOFFSET_BZ) & ~( << ), ); 
         
        return 
PLUGIN_HANDLED
    } 
     
    return 
PLUGIN_CONTINUE


public 
CmdRadioid ) { 
    if( 
get_pcvar_numg_pBlockRadio ) ) 
        return 
PLUGIN_HANDLED_MAIN
     
    return 
PLUGIN_CONTINUE


public 
RestartRound( ) 
    
set_pcvar_numg_pSvRestart); 

// COLORCHAT 
///////////////////////////////////////////// 
ColorChatidColor:type, const szMessage[], {Float,Sql,Result,_}:... ) { 
    if( !
get_playersnum( ) ) return; 
     
    new 
message256 ]; 
     
    switch( 
type ) { 
        case 
NORMALmessage[0] = 0x01
        case 
GREENmessage[0] = 0x04
        default: 
message[0] = 0x03
    } 
     
    
vformatmessage], 251szMessage); 
     
    
message192 ] = '^0'
     
    
replace_allmessage191"\YEL""^1" ); 
    
replace_allmessage191"\GRN""^4" ); 
    
replace_allmessage191"\TEM""^3" ); 
     
    new 
iTeamColorChangeindexMSG_Type
     
    if( 
id ) { 
        
MSG_Type MSG_ONE_UNRELIABLE
        
index id
    } else { 
        
index CC_FindPlayer(); 
        
MSG_Type MSG_BROADCAST
    } 
     
    
iTeam get_user_teamindex ); 
    
ColorChange CC_ColorSelection(indexMSG_Typetype); 

    
CC_ShowColorMessage(indexMSG_Typemessage); 
     
    if( 
ColorChange 
        
CC_Team_Info(indexMSG_TypeTeamName[iTeam]); 


CC_ShowColorMessageidtypemessage[] ) { 
    
message_begintypeg_iMsgSayText_id ); 
    
write_byteid );     
    
write_stringmessage ); 
    
message_end( );     


CC_Team_Infoidtypeteam[] ) { 
    
message_begintypeg_iMsgTeamInfo_id ); 
    
write_byteid ); 
    
write_stringteam ); 
    
message_end( ); 
     
    return 
1


CC_ColorSelectionindextypeColor:Type ) { 
    switch( 
Type ) { 
        case 
RED: return CC_Team_InfoindextypeTeamName] ); 
        case 
BLUE: return CC_Team_InfoindextypeTeamName] ); 
    } 
     
    return 
0


CC_FindPlayer( ) { 
    for( new 
1<= g_iMaxplayersi++ ) 
        if( 
g_bConnected] ) 
            return 
i
     
    return -
1



vortexgame_vipdr2

PHP Code:

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

#define PLUGIN "Vip" 
#define VERSION "1.0" 
#define AUTHOR "Rocha" 

public plugin_init()  

    
register_plugin("Vip""1.0""Rocha"
    
RegisterHam(Ham_Spawn"player""Ham_PlayerSpawn"1
    
RegisterHam(Ham_Spawn"player""PlayerSpawn"1


public 
Ham_PlayerSpawn(id

    if(
get_user_flags(id) & ADMIN_RESERVATION
    { 
        
strip_user_weapons(id
        
give_item(id"weapon_knife"
        
give_item(id"weapon_smokegrenade"
    } 


public 
PlayerSpawn(id

    if(
get_user_flags(id) & ADMIN_RESERVATION
    { 
        
strip_user_weapons(id
        
give_item(id"weapon_knife"
        
give_item(id"weapon_smokegrenade"
    } 



wickedd 05-09-2012 12:20

Re: [ REALLY URGENTLY ] Edit 2 plugins
 
Post in the request section.


All times are GMT -4. The time now is 00:28.

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