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

[CSS|REQ] Banana Bombs - ES to SM Port.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lqhnybear
Member
Join Date: Oct 2009
Location: Miami Beach, Fl
Old 02-26-2011 , 01:22   [CSS|REQ] Banana Bombs - ES to SM Port.
Reply With Quote #1

I'm looking for some one to port over a Eventscripts plugin called bananabombs. I'm trying to do a full convert from ES to SM and only a few things are holding me back, this is one of them.

The current ES plugin shows a Banana once it's thrown. What I was hoping for is it actually shows a "bunch of bananas" in your hand and when thrown and the nade explodes it blows up into 4 bananas. No extra damage and no damage from the individual bananas just kinda looks cool. Anyway here is the code from the original plugin written by Wonder and ES Admin. Can anyone help me out and make one for SM even if it's exactly like his?

PHP Code:
block load
{
    
es_xset bananabombs_ver 1.0
    es_xmakepublic bananabombs_ver

    es_xset nade 0
    es_xset nadenull 0
    es_xset nademodel 0

    
// Make sure we are on a map first or else we'll blow the server up.
    
isnull nadenull eventscripts_currentmap
    ifx false
(nadenull) do
    {
        
es_xdoblock bananabombs/precachemodels
    
}

    
es_xdoblock corelib/noisy_on
}

block precachemodels
{
    
es_xprecachemodel nademodel "models/props/cs_italy/bananna.mdl"
}

block unload
{
    
es_xdoblock corelib/noisy_off
}

event es_map_start
{
    
es_xdoblock bananabombs/precachemodels
}

event weapon_fire
{
    if (
grenade in event_var(weapon)) do
    {
        
es_xdelayed 0.1 es_xdoblock bananabombs/dochange
    
}
    else do
    {
        if (
event_var(weaponequalto flashbang) do
        {
            
es_xdelayed 0.1 es_xdoblock bananabombs/dochange
        
}
    }
}

block dochange
{
    
// Change the model of the nades.
    
es_xcreateentitylist nadelist hegrenade_projectile
    es_xforeachkey nade in nadelist 
"es_xdoblock bananabombs/dochange_inner"
    
es_xkeygroupdelete nadelist

    es_xcreateentitylist nadelist flashbang_projectile
    es_xforeachkey nade in nadelist 
"es_xdoblock bananabombs/dochange_inner"
    
es_xkeygroupdelete nadelist

    es_xcreateentitylist nadelist smokegrenade_projectile
    es_xforeachkey nade in nadelist 
"es_xdoblock bananabombs/dochange_inner"
    
es_xkeygroupdelete nadelist
}

block dochange_inner
{
    
es_setindexprop server_var(nadeCBaseEntity.m_nModelIndex server_var(nademodel)
    
es_setindexprop server_var(nadeCBaseEntity.m_clrRender -1
}

event round_start
{
    
es_xmsg #multi "#green[BananaBombs]#default All grenades have become banana bombs!"

__________________

Last edited by lqhnybear; 02-26-2011 at 01:28.
lqhnybear 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 05:09.


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