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

KILL LIMIT


Post New Thread Reply   
 
Thread Tools Display Modes
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 09-10-2010 , 14:37   Re: KILL LIMIT
Reply With Quote #31

PHP Code:
public APlayerHasDied(Handle:event, const String:name[], bool:dontBroadcast){
    new 
attackerId GetEventInt(event"attacker");
    new 
attackerClient GetClientOfUserId(attackerId);
    if(
attackerClient && IsClientInGame(attackerClient))
    {
        if(
GetClientFrags(attackerClient) >= 100){
            
storeMapWinner attackerId;
            
GetNextMap(storeNextMapsizeof(storeNextMap));

            
PrintToChatAll("%N is the winner with 100 kills."attackerClient);
            
CreateTimer(10.0DelayedMapChange_TIMER_FLAG_NO_MAPCHANGE);
        }
    }
}

public 
Action:DelayedMapChange(Handle:timer)
{
    new 
attackerClient GetClientOfUserId(storeMapWinner);
    if(
attackerClient && IsClientInGame(attackerClient))
        
Format(storeMapReasonsizeof(storeMapReason), "%N has reached 100 kills. Moving on to the next map."attackerClient);
    else
        
Format(storeMapReasonsizeof(storeMapReason), "A player has reached 100 kills. Moving on to the next map.");
        
    
ForceChangeLevel(storeNextMapstoreMapReason);

__________________
thetwistedpanda is offline
willrock2700
Junior Member
Join Date: Sep 2010
Old 09-10-2010 , 15:18   Re: KILL LIMIT
Reply With Quote #32

Quote:
Originally Posted by thetwistedpanda View Post
PHP Code:
public APlayerHasDied(Handle:event, const String:name[], bool:dontBroadcast){
    new 
attackerId GetEventInt(event"attacker");
    new 
attackerClient GetClientOfUserId(attackerId);
    if(
attackerClient && IsClientInGame(attackerClient))
    {
        if(
GetClientFrags(attackerClient) >= 100){
            
storeMapWinner attackerId;
            
GetNextMap(storeNextMapsizeof(storeNextMap));

            
PrintToChatAll("%N is the winner with 100 kills."attackerClient);
            
CreateTimer(10.0DelayedMapChange_TIMER_FLAG_NO_MAPCHANGE);
        }
    }
}

public 
Action:DelayedMapChange(Handle:timer)
{
    new 
attackerClient GetClientOfUserId(storeMapWinner);
    if(
attackerClient && IsClientInGame(attackerClient))
        
Format(storeMapReasonsizeof(storeMapReason), "%N has reached 100 kills. Moving on to the next map."attackerClient);
    else
        
Format(storeMapReasonsizeof(storeMapReason), "A player has reached 100 kills. Moving on to the next map.");
        
    
ForceChangeLevel(storeNextMapstoreMapReason);



add to current plugin source? = overwrite old or just use as is ?
willrock2700 is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 09-10-2010 , 16:10   Re: KILL LIMIT
Reply With Quote #33

They're both updated pieces of code so just a wee bit of common sense would imply overwriting the old ones with the new ones.
__________________
thetwistedpanda is offline
willrock2700
Junior Member
Join Date: Sep 2010
Old 09-10-2010 , 23:03   Re: KILL LIMIT
Reply With Quote #34

this plugin still only says the message when 101kills have been reached.... it needs to be 100kills, and it would be nice if it took after the gungame round end with everyone frozen (cause of round end) and shows a motd in the middle of the screen and displays the winner
willrock2700 is offline
Alex.
SourceMod Donor
Join Date: Sep 2010
Location: England
Old 09-11-2010 , 09:27   Re: KILL LIMIT
Reply With Quote #35

PHP Code:
#include <sourcemod>
#include <sdktools>

new String:storeNextMap[100];
new 
String:storeMapReason[100];
new 
storeMapWinner;

public 
Plugin:myinfo 
{
    
name "Kill Limit",
    
author "Alex",
    
description ="If a client reaches 100 kills, the map is moved on to the next one.",
    
version "0.4",
    
url ""
}

public 
OnPluginStart()
{
    
HookEvent("player_death"APlayerHasDied);
}

public 
APlayerHasDied(Handle:event, const String:name[], bool:dontBroadcast){
    new 
attackerId GetEventInt(event"attacker");
    new 
attackerClient GetClientOfUserId(attackerId);
    if(
attackerClient && IsClientInGame(attackerClient))
    {
        if(
GetClientFrags(attackerClient) >= 99){
            
storeMapWinner attackerId;
            
GetNextMap(storeNextMapsizeof(storeNextMap));

            
PrintToChatAll("%N is the winner with 100 kills."attackerClient);
            
CreateTimer(10.0DelayedMapChange_TIMER_FLAG_NO_MAPCHANGE);
        }
    }
}

public 
Action:DelayedMapChange(Handle:timer)
{
    new 
attackerClient GetClientOfUserId(storeMapWinner);
    if(
attackerClient && IsClientInGame(attackerClient))
        
Format(storeMapReasonsizeof(storeMapReason), "%N has reached 100 kills. Moving on to the next map."attackerClient);
    else
        
Format(storeMapReasonsizeof(storeMapReason), "A player has reached 100 kills. Moving on to the next map.");
        
    
ForceChangeLevel(storeNextMapstoreMapReason);

Alex. is offline
Sarin
Senior Member
Join Date: Nov 2014
Location: Sydney, Australia
Old 06-15-2018 , 23:53   Re: KILL LIMIT
Reply With Quote #36

Any updates on this bad boy? looking for something simular myself..........


I tried to complile this and get this error;
//SourceMod Batch Compiler
// by the SourceMod Dev Team


//// killlimit.sp
// Internal error.

Press enter to exit ...

Last edited by Sarin; 06-16-2018 at 00:05.
Sarin 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 17:03.


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