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

[L4D] Survivor Upgrades


Post New Thread Reply   
 
Thread Tools Display Modes
Naow
Senior Member
Join Date: Feb 2009
Old 07-19-2009 , 04:24   Re: [L4D] Survivor Upgrades
Reply With Quote #161

Quote:
Originally Posted by MagnoT View Post
Also, I wrote some functions to handle events and of course give upgrades:
- witch, a player can only win a upgrade if he kill her with a single shot. If he succeed everybody win one upgrade and the killer win a +1 extra. If he fail and wake her up, when survivors kill her, they all get upgrade, but the player whom wake her doesn't get anything (punishment).
- healing, if someone heal a teammate, he gets a upgrade. It's fun because most of people save first aid kits.
- killing points, everytime someone kills 120 infected, he win a upgrade. People fight for a couple of zombies... hell!
Nice features you've got here , you should create an unofficial update of this plugin since Jerrith seems to be away.
Can you also release the full source instead of small parts of code please?
Naow is offline
GrossKopf
Senior Member
Join Date: Jun 2007
Old 07-19-2009 , 11:40   Re: [L4D] Survivor Upgrades
Reply With Quote #162

If anyone is going to update the plugin, could you add a cvar that lets an admin remove all upgrades when the map changes?
GrossKopf is offline
MagnoT
Junior Member
Join Date: Jul 2009
Old 07-19-2009 , 12:09   Re: [L4D] Survivor Upgrades
Reply With Quote #163

Quote:
Originally Posted by Naow View Post
Nice features you've got here , you should create an unofficial update of this plugin since Jerrith seems to be away.
Can you also release the full source instead of small parts of code please?
Sorry, I've changed a lot of things in Jerrith base code so it's different and only supports coop. But if you need anything I can help you out.

Quote:
Originally Posted by GrossKopf View Post
If anyone is going to update the plugin, could you add a cvar that lets an admin remove all upgrades when the map changes?
Like I said before, I don't keep upgrades for the whole campaign. They expire on every map load. Also, keep in mind that survivor_upgrades convar works so the game gives 1 upgrade for every client on every map transition. To test it, just remove the plugin and set survivor_upgrades to 1 (sm_cvar). You will notice that you'll get upgrades.
You can add this to ResetValues():
PHP Code:
            if (GetClientTeam(i)==2)
            {
            
            
// removes any upgrades a client have    
                
for(new j=0j<NVALID; ++j)
                {
                    
bClientHasUpgrade[i][j] = false;
                    
SDKCall(RemoveUpgradeiIndexToUpgrade[j]);
                }
            } 
*i=client
And hook mission_lost, map_transition or round_end to clean all upgrades.

For the admin thing you can try this:
PHP Code:
RegAdminCmd("CleanAllUpgrades"CleanUpgradesADMFLAG_KICK);

// cleaning upgrades
public Action:CleanUpgrades(clientargs)
{
    
// no args required
    
ResetValues();
    

MagnoT is offline
Pontifex
Member
Join Date: Feb 2009
Old 07-19-2009 , 12:58   Re: [L4D] Survivor Upgrades
Reply With Quote #164

Quote:
Sorry, I've changed a lot of things in Jerrith base code so it's different and only supports coop. But if you need anything I can help you out.
there is something interesting in your version, you can publish?

And you did not respond to http://forums.alliedmods.net/showpos...&postcount=160
"healing" in versus working?
__________________
Sorry for my bad English

Last edited by Pontifex; 07-19-2009 at 13:02.
Pontifex is offline
GrossKopf
Senior Member
Join Date: Jun 2007
Old 07-19-2009 , 14:37   Re: [L4D] Survivor Upgrades
Reply With Quote #165

Quote:
Originally Posted by MagnoT View Post
Like I said before, I don't keep upgrades for the whole campaign. They expire on every map load. Also, keep in mind that survivor_upgrades convar works so the game gives 1 upgrade for every client on every map transition. To test it, just remove the plugin and set survivor_upgrades to 1 (sm_cvar). You will notice that you'll get upgrades.
Yeah, all that stuff is beyond my expertise. I really have no clue what any of it means.
GrossKopf is offline
olj
Veteran Member
Join Date: Jun 2009
Old 07-19-2009 , 17:35   Re: [L4D] Survivor Upgrades
Reply With Quote #166

You can post modified code, if i red this right http://forums.alliedmods.net/showthread.php?t=57142 , it will be great if you fix bugs and add a cvars for the features you wrote for upgrades.
olj is offline
Chaotic Llama
SourceMod Donor
Join Date: Dec 2005
Location: Lee's Summit, MO
Old 07-19-2009 , 18:00   Re: [L4D] Survivor Upgrades
Reply With Quote #167

Quote:
Originally Posted by olj View Post
You can post modified code, if i red this right http://forums.alliedmods.net/showthread.php?t=57142 , it will be great if you fix bugs and add a cvars for the features you wrote for upgrades.
Yep, I'm sure many would appreciate a copy of your plugin, I know I would. Especially if when you disable something... its actually disabled :p

I gave up on trying to get JUST the laser sight to work
__________________
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-19-2009 , 19:30   Re: [L4D] Survivor Upgrades
Reply With Quote #168

hehe... ok oook... I'll review and comment the code... then I'll post it.
But it's suitable for coop and I don't know if it would work for other gamemodes.
I've edited for balance and fun purposes.
MagnoT is offline
Naow
Senior Member
Join Date: Feb 2009
Old 07-20-2009 , 05:23   Re: [L4D] Survivor Upgrades
Reply With Quote #169

Quote:
Originally Posted by MagnoT View Post
'// previously declared global'
killcount[client] += 1;


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

*keep in mind that I disabled GiveInitialUpgrades.
I have the same error and it doesn't work
PHP Code:
/home/groups/sourcemod/upload_tmp/phpxk10EI.sp(1068) : error 027invalid character constant
/home/groups/sourcemod/upload_tmp/phpxk10EI.sp(1068) : warning 217loose indentation
/home/groups/sourcemod/upload_tmp/phpxk10EI.sp(1068) : error 017undefined symbol "declared"
/home/groups/sourcemod/upload_tmp/phpxk10EI.sp(1068) : error 017undefined symbol "global"
/home/groups/sourcemod/upload_tmp/phpxk10EI.sp(1068) : fatal error 127too many error messages on one line 
Naow is offline
Whosat
Senior Member
Join Date: Nov 2007
Location: Singapore
Old 07-20-2009 , 08:12   Re: [L4D] Survivor Upgrades
Reply With Quote #170

Quote:
Originally Posted by Naow View Post
I have the same error and it doesn't work
PHP Code:
/home/groups/sourcemod/upload_tmp/phpxk10EI.sp(1068) : error 027invalid character constant
/home/groups/sourcemod/upload_tmp/phpxk10EI.sp(1068) : warning 217loose indentation
/home/groups/sourcemod/upload_tmp/phpxk10EI.sp(1068) : error 017undefined symbol "declared"
/home/groups/sourcemod/upload_tmp/phpxk10EI.sp(1068) : error 017undefined symbol "global"
/home/groups/sourcemod/upload_tmp/phpxk10EI.sp(1068) : fatal error 127too many error messages on one line 
Try just copying this line:
PHP Code:
killcount[client] += 1
Whosat 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 13:57.


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