AlliedModders

[ZP] Sub-Plugin: Rewards 1.4 | Updated [FIXED KNIFE BUG]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
georgik57
Veteran Member
Join Date: Oct 2008
Location: Romania
Old 04-21-2010 , 12:55   [ZP] Sub-Plugin: Rewards 1.4 | Updated [FIXED KNIFE BUG]
Reply With Quote #1

[ZP] Sub-Plugin: Rewards v1.4


Description

This plugin offers certain amounts of ammo packs
to those who frag their enemies or win the round.
Everything is configurable by cvar values.
This is a plugin that shouldn't be missing
from any Zombie Plague server out there...
Enjoy it and have fun!

Thanks to:

MeRcyLeZZ - For such an awesome mod like "Zombie Plague"
and for some code i used from it...once again
abdul-rehman - For being a good friend
XxAvalanchexX - For some code i used from his GunGame Mod
Fry! and bmann_420 - For not ignoring me when i
needed help the most (like other 'friends' do)
suNx - For helping me with the plugin tests
And all my real friends...

ScreenShots

Sorry they are too big...you'll have to click the link
Nemesis wins
Survivor wins
Survivors win
Nemesis win
Survivor and Humans win
Nemesis and Zombies win
Human kills Zombie
Nemesis kills Humans
Humans kill Zombies
Zombies infect Humans
Human kills Nemesis
Zombie Kills Survivor
Human kills Nemesis with KNIFE
Human kills Zombie with KNIFE
Survivor kills Zombie with KNIFE and wins the round

Changelog

Code:
* v1.0 (21 Apr 2010)
- First release

* v1.1 (22 Apr 2010)
- Fixed plugin turning off when
the toggle cvar is set to 1
- Added rewards for surviving
the round as Nemesis or Survivor
- Removed unuseful cvars

* v1.2 (22 Apr 2010)
- Fixed players not getting ammo packs when fragging a enemy
(rescripted the Player Killed part in the plugin)
This wasn't showing up because i was testing the plugin
with bots and it seems that just human players count
- Added giving the players rewards in other rounds

* v1.3 (29 Apr 2010)
- Fixed bug where a player that killed Nemesis got packs for
a Zombie frag too. Well, Nemesis is just a fancy Zombie...
- Fixed players not getting awards for winning
other rounds than Nemesis or Survivor
- Added knife kill rewards for Survivors and Humans
- Added chat text to notify when a Nemesis
or a Zombie kills or infects a Human
- Fixed chat multiple print bug
- Fixed tons of other chat print bugs

* v1.4 (23 Jun 2010)
- Made the plugin multi-lingual
- Added rewards for killing the first and last Zombie
- Added reward giving for killing the last Human
- Improved some code
- Fixed some chat print errors
To do list:
  • Waiting for suggestions...

[!] NOTE [!]

1. Re-download the multi-lingual file(.txt).
It had a typing mistake and 2 of the messages couldn't
be shown being displayed as a "ML_NOTFOUND" error.
Now it's fixed...
2. Fixed the knife kill detection bug.
Now bazooka kills won't be considered knife kills anymore.
Download the fixed sma from below.
Sorry but i don't have time to update it...
Attached Files
File Type: zip zp_rewards14.zip (21.2 KB, 1222 views)
File Type: txt zp_rewards.txt (9.6 KB, 808 views)
File Type: sma Get Plugin or Get Source (zp_sub_rewards.sma - 396 views - 19.4 KB)
__________________

Last edited by georgik57; 02-13-2011 at 11:05. Reason: Fixed knife kill detection bug
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype? to georgik57
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 04-21-2010 , 13:15   Re: [ZP] Sub-Plugin: Rewards 1.0
Reply With Quote #2

Cool plugin mann i might help you with this one as well ...!!
__________________
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype? to abdul-rehman
georgik57
Veteran Member
Join Date: Oct 2008
Location: Romania
Old 04-21-2010 , 13:17   Re: [ZP] Sub-Plugin: Rewards 1.0
Reply With Quote #3

thanks
i didn't even test it but i'm sure it works perfect
can u test it for me and tell me if it really does?
PS: also make some screenshots?
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype? to georgik57
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 04-21-2010 , 13:17   Re: [ZP] Sub-Plugin: Rewards 1.0
Reply With Quote #4

Instead of using this stock for color printing..
PHP Code:
// Colored chat print. Thanks to MeRcyLeZZ
zp_colored_print(target, const message[], any:...)
{
 static 
buffer[512], iargscount
 argscount 
numargs()
 
 
// Send to everyone
 
if (!target)
 {
  static 
player
  
for (player 1player <= g_maxplayersplayer++)
  {
   
// Not connected
   
if (!is_user_connected(player))
    continue;
   
   
// Remember changed arguments
   
static changed[5], changedcount // [5] = max LANG_PLAYER occurencies
   
changedcount 0
   
   
// Replace LANG_PLAYER with player id
   
for (2argscounti++)
   {
    if (
getarg(i) == LANG_PLAYER)
    {
     
setarg(i0player)
     
changed[changedcount] = i
     changedcount
++
    }
   }
   
   
// Format message for player
   
vformat(buffercharsmax(buffer), message3)
   
   
// Send it
   
message_begin(MSG_ONE_UNRELIABLEg_msgSayText_player)
   
write_byte(player)
   
write_string(buffer)
   
message_end()
   
   
// Replace back player id's with LANG_PLAYER
   
for (0changedcounti++)
    
setarg(changed[i], 0LANG_PLAYER)
  }
 }
 
// Send to specific target
 
else
 {
  
// Format message for player
  
vformat(buffercharsmax(buffer), message3)
  
  
// Send it
  
message_begin(MSG_ONEg_msgSayText_target)
  
write_byte(target)
  
write_string(buffer)
  
message_end()
 }

U can actually use this stock:
PHP Code:
// Prints chat in colours
stock zp_colored_print(const id, const input[], any:...)
{
 new 
iCount 1iPlayers[32]
 
 static 
szMsg[191]
 
vformat(szMsgcharsmax(szMsg), input3)
 
 
replace_all(szMsg190"|g|""^4"// green txt
 
replace_all(szMsg190"|y|""^1"// orange txt
 
replace_all(szMsg190"|ctr|""^3"// team txt
 
replace_all(szMsg190"|w|""^0"// team txt
 
 
if(idiPlayers[0] = id
 
else get_players(iPlayersiCount"ch")
  
 for (new 
0iCounti++)
 {
  if (
is_user_connected(iPlayers[i]))
  {
   
message_begin(MSG_ONE_UNRELIABLEg_msgSayText_iPlayers[i])
   
write_byte(iPlayers[i])
   
write_string(szMsg)
   
message_end()
  }
 }

__________________
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype? to abdul-rehman
georgik57
Veteran Member
Join Date: Oct 2008
Location: Romania
Old 04-21-2010 , 13:20   Re: [ZP] Sub-Plugin: Rewards 1.0
Reply With Quote #5

Quote:
Originally Posted by abdul-rehman View Post
Instead of using this stock for color printing..

U can actually use this stock:
thanks but i prefer using MeRcyLeZZ's stock...

Quote:
Originally Posted by georgik57 View Post
i didn't even test it but i'm sure it works perfect
can u test it for me and tell me if it really does?
PS: also make some screenshots?
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype? to georgik57
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 04-21-2010 , 13:29   Re: [ZP] Sub-Plugin: Rewards 1.0
Reply With Quote #6

Man my pc is having some kind of wierd problems when i start cs it gives me that your virtual memory is low..so my cs is not working..
__________________
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype? to abdul-rehman
georgik57
Veteran Member
Join Date: Oct 2008
Location: Romania
Old 04-21-2010 , 13:32   Re: [ZP] Sub-Plugin: Rewards 1.0
Reply With Quote #7

Quote:
Originally Posted by abdul-rehman View Post
Man my pc is having some kind of wierd problems when i start cs it gives me that your virtual memory is low..so my cs is not working..
problems with RAM memory or you don't have enough of them
try uninstalling all the unusefull software you have in your system
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype? to georgik57
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 04-21-2010 , 13:52   Re: [ZP] Sub-Plugin: Rewards 1.0
Reply With Quote #8

Quote:
Originally Posted by georgik57 View Post
problems with RAM memory or you don't have enough of them
try uninstalling all the unusefull software you have in your system
THnx now i finally know what is this fuckin problem recently one of my pcs ram stop working so i removed it thats why this is ocurring
__________________
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype? to abdul-rehman
Old 04-21-2010, 16:33
georgik57
This message has been deleted by georgik57. Reason: not paying attention = fail...
georgik57
Veteran Member
Join Date: Oct 2008
Location: Romania
Old 04-21-2010 , 18:11   Re: [ZP] Sub-Plugin: Rewards 1.1
Reply With Quote #9

Updated to v1.1
Check the first post for more info
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype? to georgik57
Steak243
Senior Member
Join Date: May 2009
Old 04-21-2010 , 19:05   Re: [ZP] Sub-Plugin: Rewards 1.1
Reply With Quote #10

When i compile i get errors of zp_get_survivor_count and zp_get_nemesis_count
__________________
Crysis Website. New Zombie Server.
http://crysisgaming.org/news.php
Zombie Mod | CrysisGaming.org [Fast DL]
New Bank System. Crysis Ammo Pack (C.A.P)


208.122.52.120:27015
Steak243 is offline
Old 04-22-2010, 03:41
georgik57
This message has been deleted by georgik57. Reason: Updating plugin...
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 05:40.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Theme made by Freecode Sponsored by Layered Technologies