Raised This Month: $ Target: $400
 0% 

[TF2] Presents! (v0.5.1, fixed major bug)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
labelmaker
Member
Join Date: Mar 2009
Location: Kentucky USA
Old 08-15-2009 , 04:31   Re: [TF2] Presents! (v0.5.1, fixed major bug)
Reply With Quote #11

Awesome mod you got, just played it a few weeks ago on a Zombie Fortress server. Ive updated my popcorn mod and have a really cool script snippit for doing away with map config files for random spawning of items if your interested. Works great, guarantee we will get more people to use random drop rather than the death drop now. I copied and pasted from my code, but i beleive you will get the picture . Now to figure out a fix for teleporter, Ill post if I have something.

PHP Code:
new Float:MapX[2];
new 
Float:MapY[2];
new 
Float:MapZ[2];
new 
runeAmount 20;
new 
bool:pop_mapstart;
new 
Handle:pop_boxTimer INVALID_HANDLE;

public 
OnMapStart()
{
        
MapX[0] = 0.0MapX[1] = 0.0;
    
MapY[0] = 0.0MapY[1] = 0.0;
    
MapZ[0] = 0.0MapZ[1] = 0.0;
    
pop_mapstart true;
}

public 
PlayerSpawnEvent(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if (
client 0)
    {    
        if (
pop_mapstart)
        {
            new 
Float:targetPos[3];
            
GetClientEyePosition(clienttargetPos);
            
            
MapX[0] = targetPos[0]; MapX[1] = targetPos[0];
            
MapY[0] = targetPos[1]; MapY[1] = targetPos[1];
            
MapZ[0] = targetPos[2]; MapZ[1] = targetPos[2];
            
pop_mapstart false;
        }
        {
}

public 
function_EnableItemDrops ()
{
        
function_ResetHistory();
        
pop_boxTimer CreateTimer(10.0expandBox0TIMER_REPEAT);
}

public 
function_ResetHistory()
{
        if (
pop_boxTimer != INVALID_HANDLE)
    {
        
KillTimer(pop_boxTimerfalse);
        
pop_boxTimer INVALID_HANDLE;
    }
        
MapX[0] = 0.0MapX[1] = 0.0;
    
MapY[0] = 0.0MapY[1] = 0.0;
    
MapZ[0] = 0.0MapZ[1] = 0.0;
}

public 
Action:expandBox(Handle:timerany:garbage)
{
    new 
Float:targetPos[3];
    for(new 
1<= MaxClients; ++i)
    {
        if (
IsClientConnected(i) && IsClientInGame(i))
        {
            if (
IsPlayerAlive(i))
            {
                
GetClientEyePosition(itargetPos);
                
//Create Max X coordinates
                
if (targetPos[0] > MapX[0])
                    
MapX[0] = targetPos[0];
                if (
targetPos[0] < MapX[1])
                    
MapX[1] = targetPos[0];
                
//Create Max Y coordinates
                
if (targetPos[1] > MapY[0])
                    
MapY[0] = targetPos[1];
                if (
targetPos[1] < MapY[1])
                    
MapY[1] = targetPos[1];
                
//Create Max Z coordinates
                
if (targetPos[2] > MapZ[0])
                    
MapZ[0] = targetPos[2];
                if (
targetPos[2] < MapZ[1])
                    
MapZ[1] = targetPos[2];
            }
        }    
    }
    return 
Plugin_Continue;

__________________

Come Check Out the Popcorn Mod Yourself!!

Last edited by labelmaker; 08-16-2009 at 13:08.
labelmaker is offline
Send a message via Skype™ to labelmaker
 



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 18:24.


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