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

KILL LIMIT


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
willrock2700
Junior Member
Join Date: Sep 2010
Old 09-08-2010 , 20:36   KILL LIMIT
Reply With Quote #1

hey, i have searched high and low as far as i know and i was looking for a kill limit plugin, so lets just say when a player has reached 100 kills the round ends and changes map to the next in the list

kind regards
will
willrock2700 is offline
Alex.
SourceMod Donor
Join Date: Sep 2010
Location: England
Old 09-08-2010 , 20:46   Re: KILL LIMIT
Reply With Quote #2

I will do this for you as soon as I figure out how to get a client's score.
Alex. is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 09-08-2010 , 20:52   Re: KILL LIMIT
Reply With Quote #3

What game is this for? If it's CS:S, isn't there a cvar that already handles this?
__________________
thetwistedpanda is offline
willrock2700
Junior Member
Join Date: Sep 2010
Old 09-08-2010 , 20:55   Re: KILL LIMIT
Reply With Quote #4

this is for css correct
willrock2700 is offline
willrock2700
Junior Member
Join Date: Sep 2010
Old 09-08-2010 , 20:59   Re: KILL LIMIT
Reply With Quote #5

Im not sure about the cvar, what im trying to say is that when max kills are reached it brings up a motd with the winnner for eg;

ALEX is the winner with 100 kills
willrock2700 is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 09-08-2010 , 21:26   Re: KILL LIMIT
Reply With Quote #6

Ah gotcha, you left out that MOTD part to begin with :-o.
__________________
thetwistedpanda is offline
Alex.
SourceMod Donor
Join Date: Sep 2010
Location: England
Old 09-08-2010 , 21:29   Re: KILL LIMIT
Reply With Quote #7

This should send a message to all clients and change to the next map when someone has a kill count of 100:
PHP Code:
#include <sourcemod>
#include <sdktools>

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.1",
    
url ""
}

new 
PlayerKillRecord[MAXPLAYERS];

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

public 
APlayerHasDied(Handle:event, const String:name[], bool:dontBroadcast){
    new 
attackerId GetEventInt(event"attacker");
    new 
String:NextMapIs[100];
    
GetNextMap(NextMapIs100);
    
    
PlayerKillRecord[attackerId]++;
    
    if(
PlayerKillRecord[attackerId] == 100){
        
PrintToChatAll("%N is the winner with 100 kills."attackerId);
        
        new 
String:mapChangeReason[100];
        
Format(mapChangeReason100"%N has reached 100 kills. Moving on to the next map."attackerId);
        
        
ForceChangeLevel(NextMapIsmapChangeReason);
    }
}

public 
OnClientDisconnect(client)
{
    
PlayerKillRecord[client] = 0;
}

public 
OnMapStart()
{
    for(new 
1MaxClientsi++) {
        
PlayerKillRecord[i] = 0;
    }

Alex. is offline
willrock2700
Junior Member
Join Date: Sep 2010
Old 09-08-2010 , 23:14   Re: KILL LIMIT
Reply With Quote #8

cheers ;) __+++
willrock2700 is offline
willrock2700
Junior Member
Join Date: Sep 2010
Old 09-09-2010 , 00:09   Re: KILL LIMIT
Reply With Quote #9

this plugin isnt working :\

any ideas?
willrock2700 is offline
Monkeys
Veteran Member
Join Date: Jan 2010
Old 09-09-2010 , 00:14   Re: KILL LIMIT
Reply With Quote #10

GetEntProp(Client, Prop_Data, "m_iFrags");
if I'm not mistaken.

(That's how to read someone's frags)
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
Reply


Thread Tools
Display Modes

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


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