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

Ultimate Revive


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Admin Commands       
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 08-25-2008 , 11:55   Ultimate Revive
Reply With Quote #1

Ultimate Revive
v1.2

With this plugin on your server, you can revive a player,team or all players with x hp and x armor. Also, a nice green screen fade on revive

Changelog:

[1.2]
- changes in code
[1.1]
- Fixed bug at respawn
- You don't have to write the hp and armor arguments if you don't want to...the plugin uses the default values: 100 hp and 0 armor.
- Removed fun module

[1.0]
- First relesead

Credits:
- GHW_Chronic -- fakemeta functions
- VEN -- give_item stock

Modules: Fakemeta

Command:
amx_revive <player/@/@T/@CT> <hp> <armor> - respawn a player,team or all player with x hp and x armor. You don't have to write the hp and armor.
@ - all players
@T - terrorists
@CT - counter-terrorists

Info:
- If you don't type the hp and the armor, the plugin use the default values: 100 hp and 0 armor.
- Every player gets a knife,glock or a usp, depending on his team, and default ammo.
- If you want to change to color of the screnfade, change in sma:
Quote:
Fade(index,0,255,0,30);
- bold means editable - RGB format. 30 - alpha


Examples:
  • Single player - will respawn 'mut2nt' with 150 hp and 100 armor
    Code:
    amx_revive mut2nt 150 100
  • T team - will respawn all T players with 100 hp and 50 armor
    Code:
    amx_revive @T 100 50
  • CT team - will respawn all CT players with 50 hp and 0 armor
    Code:
    amx_revive @CT 50 0
  • All players - respawn all players with 1 hp and 0 armor
    Code:
    amx_revive @ 1 0
  • No armor argument - respawn player 'fps' with 50 hp and 0 armor
    Code:
    amx_revive fps 50
  • No arguments - respawn team T with 100 hp and 0 armor
    Code:
    amx_revive @T
Image: [IMG]http://img174.**************/img174/7922/revivesx2.th.png[/IMG]
Attached Files
File Type: sma Get Plugin or Get Source (ut_revive.sma - 23394 views - 4.1 KB)
__________________


Last edited by anakin_cstrike; 09-30-2008 at 11:46. Reason: 1.1
anakin_cstrike is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 08-25-2008 , 12:07   Re: Ultimate Revive
Reply With Quote #2

No point in having these as globals: new name[32],namet[32],teamname[24],tname[16];

No need for this if(!arg3[0]) armor = 0 (if it is not a valid num str_to_num returns 0)

Instead of copying a tname, it is better to just use get_players within the if statements.

get_players is known to be buggy with the 'e' flag. (would recommend using another method to find players on a team)

I recommend you using @ALL instead of just @ as most other plugins use @ALL.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 08-25-2008 , 12:31   Re: Ultimate Revive
Reply With Quote #3

just to prevent errors

PHP Code:
if(get_user_team(index) == 1)
{
    
// code
}
if(
get_user_team(index) == 2)
{
    
// this instead of else

ps. I think the online compiler supports fakemeta_util now
__________________
I am out of order!
grimvh2 is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 08-25-2008 , 14:56   Re: Ultimate Revive
Reply With Quote #4

1. Global variables - changed
2. if(!arg3[0]) - changed
3. get_player - added "b" flag
4. @ - not changed
__________________

anakin_cstrike is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 08-25-2008 , 15:23   Re: Ultimate Revive
Reply With Quote #5

FakeMeta & Fun? o_O
__________________
hleV is offline
Howdy!
Senior Member
Join Date: Feb 2007
Old 08-25-2008 , 15:24   Re: Ultimate Revive
Reply With Quote #6

You credited wrong person imo. give_item stock credit should go for VEN?

@
Quote:
Originally Posted by grimvh2 View Post
ps. I think the online compiler supports fakemeta_util now
Why include both if you can do the same with fakemeta only?
__________________
[IMG]http://img221.**************/img221/5608/howdyfinnishhq2.jpg[/IMG]

Last edited by Howdy!; 08-25-2008 at 15:30.
Howdy! is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 08-25-2008 , 20:11   Re: Ultimate Revive
Reply With Quote #7

@ grimvh2 : changed
@ hleV : only fakemeta
__________________

anakin_cstrike is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 08-26-2008 , 17:50   Re: Ultimate Revive
Reply With Quote #8

1.0 -> 1.1...check first post!
__________________

anakin_cstrike is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-29-2008 , 14:45   Re: Ultimate Revive
Reply With Quote #9

Waiting for a confirmation that works.
Alka is offline
Gyuky
Junior Member
Join Date: Jul 2008
Old 09-29-2008 , 15:39   Re: Ultimate Revive
Reply With Quote #10

I've tested and it works fine
Gyuky is offline
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 19:35.


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