Raised This Month: $32 Target: $400
 8% 

[L4D] Survivor Upgrades


Post New Thread Reply   
 
Thread Tools Display Modes
Naow
Senior Member
Join Date: Feb 2009
Old 07-20-2009 , 08:27   Re: [L4D] Survivor Upgrades
Reply With Quote #171

PHP Code:
//==================================================================================================
// Kill upgrades:
// Gives upgrade:    everytime a player kills 120 infected
HookEvent("infected_death"KillUpgrades);
public 
Action:KillUpgrades(Handle:eventString:ename[], bool:dontBroadcast)
{
    new 
client             GetClientOfUserId(GetEventInt(event"attacker"));
    new 
bool:minigun     GetEventBool(event"minigun");
    new 
bool:blast         GetEventBool(event"blast");
    
    if(
client)
    {
        
// normal kills only
        
if (!minigun && !blast
            
'// previously declared global'
            
killcount[client] += 1;

            
i.e: new killcount[MAXPLAYERS+1];

            
        
// Gives a upgrade everytime a player kills 120 infected
        
if ((killcount[client]%120) == && killcount[client] > 1)
        {
            if(
IsClientInGame(client)==true && GetClientTeam(client)==2)
            {
                
decl String:name[64];
                
GetClientName(clientname64);
                
PrintToChatAll("\x05[ \x04%s\x01 won a upgrade for killing %d infected.",namekillcount[client]);
                
GiveClientUpgrades(client1);
            }
        }
    }
    
    return 
Plugin_Continue;

PHP Code:
/home/groups/sourcemod/upload_tmp/phpWoHpPb.sp(1068) : error 027invalid character constant
/home/groups/sourcemod/upload_tmp/phpWoHpPb.sp(1068) : warning 217loose indentation
/home/groups/sourcemod/upload_tmp/phpWoHpPb.sp(1068) : error 017undefined symbol "declared"
/home/groups/sourcemod/upload_tmp/phpWoHpPb.sp(1068) : error 017undefined symbol "global"
/home/groups/sourcemod/upload_tmp/phpWoHpPb.sp(1068) : fatal error 127too many error messages on one line

Compilation aborted
.
4 Errors
Here is the part of the code for the kill feature , why it doesn't work?

Thx

Last edited by Naow; 07-20-2009 at 08:34.
Naow is offline
Chaotic Llama
SourceMod Donor
Join Date: Dec 2005
Location: Lee's Summit, MO
Old 07-20-2009 , 17:24   Re: [L4D] Survivor Upgrades
Reply With Quote #172

Its my guess its because previously declared global was meant to be just a comment yet you have it single quoted (remove the ' ').
__________________
In a League of it's own ~ OneWorldOn-line.com
Chaotic Llama is offline
Send a message via AIM to Chaotic Llama
MagnoT
Junior Member
Join Date: Jul 2009
Old 07-20-2009 , 20:15   Re: [L4D] Survivor Upgrades
Reply With Quote #173

This is the version I use:

- Survivors don't get initial upgrades
- Bots don't get upgrades
- Balanced for team work
- Different witch award
- Only alive survivors can get upgrades
- Hollow-point and incendiary bullets are limited (can set the amount with convar, default is 45 bullets)
- Kill points (only for regular weapon kills, default is 120 infected)
- Fixed the bug which survivors can get upgrades twice (via convar and via plugin)
- Fixed the finale tank bug which survivors get upgrades because the game keep spawning tanks and frustrating (tanks commit suicide) them
- Fixed the bug which dead survivors still keep their upgrades
- Added a info console command, 'su_help' to show some commands
- Added a Admin command to clean all client upgrades, 'cleanallupgrades'
Attached Files
File Type: sp Get Plugin or Get Source (l4d_surup.sp - 411 views - 39.5 KB)

Last edited by MagnoT; 07-21-2009 at 14:01.
MagnoT is offline
Chaotic Llama
SourceMod Donor
Join Date: Dec 2005
Location: Lee's Summit, MO
Old 07-20-2009 , 21:29   Re: [L4D] Survivor Upgrades
Reply With Quote #174

I'll give it a try, I know the biggest problem I had with Jerriths release was not being able to disable upgrades even though they were supposedly disabled via the config.

Do you feel your version will work any better? I know on a few of our servers we'd like to just take advantage of the laser sights only.
__________________
In a League of it's own ~ OneWorldOn-line.com
Chaotic Llama is offline
Send a message via AIM to Chaotic Llama
Pontifex
Member
Join Date: Feb 2009
Old 07-20-2009 , 22:02   Re: [L4D] Survivor Upgrades
Reply With Quote #175

MagnoT, you can correct the error of omission in the Witch whose incendiary bullets hit?
__________________
Sorry for my bad English
Pontifex is offline
olj
Veteran Member
Join Date: Jun 2009
Old 07-21-2009 , 07:34   Re: [L4D] Survivor Upgrades
Reply With Quote #176

Quote:
Originally Posted by Pontifex View Post
MagnoT, you can correct the error of omission in the Witch whose incendiary bullets hit?
Give her immunity from fire somehow?
olj is offline
MagnoT
Junior Member
Join Date: Jul 2009
Old 07-21-2009 , 13:41   Re: [L4D] Survivor Upgrades
Reply With Quote #177

Quote:
Originally Posted by olj View Post
Give her immunity from fire somehow?
I've already fixed that. You can't set witch on fire with incendiary ammo because she will burn forever.

@Chaotic Llama: yes, I fixed it. It happens because of the survivor_upgrades convar. My version turn it off when the round ends and turn it on back again when the new map is loaded.

I updated the plugin to fix a bad english warn (hehe, I'm brazilian) and I've changed the special ammo handling to prevent a client from getting both special ammos. It can only hold one type of special ammo at same time, hollow-point or incendiary.

Last edited by MagnoT; 07-21-2009 at 13:51.
MagnoT is offline
Naow
Senior Member
Join Date: Feb 2009
Old 07-21-2009 , 16:24   Re: [L4D] Survivor Upgrades
Reply With Quote #178

I have tried your plugin Magnot and new features doesn't work in versus games. (after 120 zombies kills no upgrades , the witch killer doesn't get 2 upgrades , no upgrade after healing an other survivor...)
Naow is offline
xgoose
New Member
Join Date: Jul 2009
Old 07-23-2009 , 12:14   Re: [L4D] Survivor Upgrades
Reply With Quote #179

okay i spent hours reading , i just discovered the "source" thing newly..anyhow i managed to install the sourcemod and the metamod and then i placed this plugin in the "addon>sourcemod>plugins" this is correct right?

also when i type sm_admin it says

"[SM] This command can only be used in-game."

even when iam inside the game.

also is there a way to turn off this plug in from inside the game, its killing me to look thru the commands with just plain luck infinding a command that turns it off and if i did find it i might not recognize it. is there a way to turn them off or reset them to start new with 0 upgrades and get the starting-up random upgrades???

oh yeah one more thing...when i hit the witch with incendiary bullets, she just kept running around.... and no matter how many bullets i sent into her head she wouldn't stop moving

Last edited by xgoose; 07-23-2009 at 12:44.
xgoose is offline
Chaotic Llama
SourceMod Donor
Join Date: Dec 2005
Location: Lee's Summit, MO
Old 07-23-2009 , 19:16   Re: [L4D] Survivor Upgrades
Reply With Quote #180

Quote:
Originally Posted by xgoose View Post
its killing me to look thru the commands with just plain luck infinding a command that turns it off and if i did find it i might not recognize it. is there a way to turn them off or reset them to start new with 0 upgrades and get the starting-up random upgrades???
Console commands as listed in the plugin...

RegAdminCmd("addupgrade", addUpgrade, ADMFLAG_KICK);
RegAdminCmd("removeupgrade", removeUpgrade, ADMFLAG_KICK);
RegAdminCmd("giverandomupgrades", giveRandomUpgrades, ADMFLAG_KICK);
RegConsoleCmd("listupgrades", ListUpgrades);
RegConsoleCmd("laseron", LaserOn);
RegConsoleCmd("laseroff", LaserOff);
RegConsoleCmd("laser", LaserToggle);
__________________
In a League of it's own ~ OneWorldOn-line.com
Chaotic Llama is offline
Send a message via AIM to Chaotic Llama
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 04:03.


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