This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Revive Player


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
isotonic
AlliedModders Donor
Join Date: Jun 2011
Location: Moscow, Russia
Old 07-23-2012 , 19:40   Revive Player
Reply With Quote #1

Revive Player

Description
Using this plugin you can revive players by saying /revive. A menu pops up with all the names of players available to be revived. Of course this service has a price.
I've just rewrited BeasT's plugin to add requested feature (reviving enemies) and because I want try to make better code ;)

CVARs




rev_team (default: 3)
  • 0 - disables the plugin
  • 1 - enables it only for CTs
  • 2 - enables it only for Ts
  • 3 - enables it for both teams
rev_target (default: 1)
  • 0 - enables it only to reviving yourself
  • 1 - enables it only to reviving teammates
  • 2 - enables it only to reviving enemies
  • 3 - enables it to reviving both teams
rev_msg (default: 1)
  • 0 - disables the revival announcement (centered text message for revived player)
  • 1 - enables it
rev_allmsg (default: 1)
  • 0 - disables the revival announcement (chat message for all players)
  • 1 - enables it
rev_give_weaps (default: 3)
  • 0 - does not give weapons and armor to revived players
  • 1 - gives it only to revived CTs
  • 2 - gives it only to revived Ts
  • 3 - gives it to both teams

rev_price_ct (default: 10000) - price for CTs to revive a player
rev_price_te (default: 10000) - price for Ts to revive a player

Notes
- reviver must be alive except he is reviving himself
- you can define weapon set and prefix for chat messages in sma

Modules required
Cstrike
HamSandwich
Fakemeta
Fun

Change Log
Code:
12/13/2012
- a little change without version number:
corrected stupid typo in the code preventing plugin from compiling
1.1: 07/24/2012
- revised colorchat function
07/27/2012
- a little change without version number
1.0: 07/24/2012
- initial release
Credits
BeasT - original plugin creator

Translations:
- Romanian: Razvann.
- Hungarian: Balage74

1.0 65 downloads reset
1.1 55 downloads reset
Attached Files
File Type: txt revive_player.txt (3.7 KB, 457 views)
File Type: sma Get Plugin or Get Source (revive_player.sma - 1198 views - 10.7 KB)

Last edited by isotonic; 12-13-2012 at 06:41.
isotonic is offline
klysman07
Senior Member
Join Date: Oct 2011
Old 07-24-2012 , 12:21   Re: Revive Player
Reply With Quote #2

erro


Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Warning: Loose indentation on line 309
Warning: Loose indentation on line 310
Error: Invalid expression, assumed zero on line 310

1 Error.
Could not locate output file C:\Documents and Settings\Diablo Angel xx\Desktop\revive_player.amx (compile failed).
klysman07 is offline
quilhos
Veteran Member
Join Date: Jun 2010
Old 07-24-2012 , 14:57   Re: Revive Player
Reply With Quote #3

Fixed

PHP Code:
    //display info for all players
    
if ( get_pcvar_num(cvarAllMsg) ) 
    {
        if ( 
target != reviver )
        {
            
get_user_nametargetiTargetNamecharsmax(iTargetName) )
            
ColorPrint0target"%s ^3%L"PREFIXtarget"HAS_REVIVED"iReviverNameiTargetName )
        }
        else 
        {
            
ColorPrint0target"%s ^3%L"PREFIXtarget"HAS_REVIVED_SELF"iReviverName )
            return
        }
    } 
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!
quilhos is offline
isotonic
AlliedModders Donor
Join Date: Jun 2011
Location: Moscow, Russia
Old 07-24-2012 , 16:02   Re: Revive Player
Reply With Quote #4

Thanks.
__________________
isotonic is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-25-2012 , 02:58   Re: Revive Player
Reply With Quote #5

ColorPrint doesn't support ML with null index.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
isotonic
AlliedModders Donor
Join Date: Jun 2011
Location: Moscow, Russia
Old 07-25-2012 , 08:00   Re: Revive Player
Reply With Quote #6

What did you mean? Give me the sample please.
__________________
isotonic is offline
MiniBrackeur
Senior Member
Join Date: Oct 2010
Old 07-25-2012 , 08:51   Re: Revive Player
Reply With Quote #7

Quote:
ColorPrint doesn't support ML with null index.
->
Quote:
ColorPrint( 0, target, "%s ^3%L", PREFIX, target, "HAS_REVIVED_SELF", iReviverName )
Don't use the multilingual system with index=0, this is not supported.
__________________
MiniBrackeur => Daminou
MiniBrackeur is offline
isotonic
AlliedModders Donor
Join Date: Jun 2011
Location: Moscow, Russia
Old 07-25-2012 , 12:23   Re: Revive Player
Reply With Quote #8

When I get ML key I use index=target actually. But may be it would be better to use LANG_SERVER, when I send info to all player at once...
__________________
isotonic is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-25-2012 , 16:55   Re: Revive Player
Reply With Quote #9

No, natives that support index = 0 and ML do a loop on all client.
Your colorchat function send 1 MSG_BROADCAST so it can't work.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
isotonic
AlliedModders Donor
Join Date: Jun 2011
Location: Moscow, Russia
Old 07-26-2012 , 23:04   Re: Revive Player
Reply With Quote #10

Yeah I got it. It works but everybody receive a message using language of target.
Only your colorchat stock could correctly send ML with index = 0. But it also doesn't do it correctly for some reason.
So I believe LANG_SERVER are the best option for now. Plugin was updated.
__________________
isotonic 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 08:17.


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