Raised This Month: $9 Target: $400
 2% 

Reset Player


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Admin Commands       
Kristaps08
Junior Member
Join Date: Jun 2010
Old 05-16-2012 , 03:12   Reset Player
Reply With Quote #1

Reset Player


Description:

With this plugin you can reset players items/money/health/armor/deaths and frags.


Cvars:

None.


Admin Commands:

amx_reset_player <target> <reset money> <reset weapons> <reset health> <reset armor> <reset frags> <reset deaths>


Credits:

ConnorMcLeod: For his suggestions.


Changelog:

Code:
- v1.0
* First public release.

- v1.1
* Added reset_player_frags to reset frags for player.
* Added reset_player_deaths to reset deaths for player.
* Added reset_player_again to reset again the player in the same round.

- v1.2
* Changed from set_user_armor to cs_set_user_armor
* Changed from give_item to cs_set_user_bpammo

- v1.3
* Code changes and cleanup.
* Changed cvars from reset_player_ to rp_

- v1.4
* Added support for amx_show_activity.
* Changed and cleaned up some code.

- v1.5
* Optimized code.
* Added get_cvar_pointer.

- v1.6
* Added description.
* Optimized a little bit of the code.

- v1.7
* Removed rp_again so admins could reset player all the time.
* Optimized code again.

- v1.8 (8 May 2013)
* Added pev_max_health.
* Removed all the cvars except rp_version.
* Changed the command amx_reset_player so the player could reset different parts of the player's stats.
Attached Files
File Type: txt reset_player.txt (117 Bytes, 171 views)
File Type: sma Get Plugin or Get Source (reset_player.sma - 671 views - 3.8 KB)

Last edited by Kristaps08; 05-08-2013 at 11:21. Reason: Updates
Kristaps08 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-16-2012 , 03:44   Re: Reset Player
Reply With Quote #2

Consider cs_set_user_armor in order to reset armor type
Consider cs_set_user_bpammo instead of giving multiple time the same weapon
Use mp_startmoney cvar pointer
Don't declare names variables and retrieve names before you actually need it.
Consider pev_max_health just in case some mod wouldn't set 100 HPs at spawn.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
rocofelu
Member
Join Date: Nov 2010
Old 05-16-2012 , 06:13   Re: Reset Player 1.2
Reply With Quote #3

make a command like:

amx_reset_player <target> <@team> <@all>

eg: amx_reset_player @all
amx_reset_player @ct
amx_reset_player @t


Gj
rocofelu is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-02-2012 , 13:25   Re: Reset Player 1.0
Reply With Quote #4

No changes done as stated by Connor above, at least not all.

Unapproved for now, since author you seem inactive.
__________________
Arkshine 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 06:46.


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