AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   KILL LIMIT (https://forums.alliedmods.net/showthread.php?t=137741)

willrock2700 09-08-2010 20:36

KILL LIMIT
 
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

Alex. 09-08-2010 20:46

Re: KILL LIMIT
 
I will do this for you as soon as I figure out how to get a client's score.

thetwistedpanda 09-08-2010 20:52

Re: KILL LIMIT
 
What game is this for? If it's CS:S, isn't there a cvar that already handles this?

willrock2700 09-08-2010 20:55

Re: KILL LIMIT
 
this is for css correct

willrock2700 09-08-2010 20:59

Re: KILL LIMIT
 
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

thetwistedpanda 09-08-2010 21:26

Re: KILL LIMIT
 
Ah gotcha, you left out that MOTD part to begin with :-o.

Alex. 09-08-2010 21:29

Re: KILL LIMIT
 
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;
    }



willrock2700 09-08-2010 23:14

Re: KILL LIMIT
 
cheers ;) __+++

willrock2700 09-09-2010 00:09

Re: KILL LIMIT
 
this plugin isnt working :\

any ideas?

Monkeys 09-09-2010 00:14

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

(That's how to read someone's frags)


All times are GMT -4. The time now is 18:01.

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