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

Instant Respawn


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
xEhsaan
Member
Join Date: Mar 2015
Location: Isfahan, Iran
Old 05-17-2015 , 06:46   Instant Respawn
Reply With Quote #1

Hi AlliedModders,

I present to you "Instant Respawn" a very plugin that I wrote in less than an hour.
This plugin designed for learning purposes and I told by a friend to publish it here. I don't think that is gonna be approved, but it's here and shared for you

Code:
/**
 * Instant Respawn
 * By xEhsaan - Version: 1.0 - Release 17-05-2015
 *
 * Really simple plugin for managing respawns and give last used weapons to respawned player
 * Hope you guys enjoy!
 *
 * Client command:
 * 	say[_team] [/]respawn - Respawn player, only usable if plugin malfunctioned
 *
 * Console variables:
 * 	respawn_enabled: Enable respawn?
 * 	respawn_delay: Delay for respawn after death
 * 	respawn_spawn_lastweapon: Open menu for using last weapon?
 */
It has a little cool feature, "Give last used weapons". Players after respawn can use their last used weapons (before death, if a player buy a grenade, throw it and die, grenade won't given to him)

Don't use "Get Plugin" link, you need AMX Mod X 1.8.3 and higher compiler.
Hope you enjoy it!
Attached Files
File Type: sma Get Plugin or Get Source (instant_respawn.sma - 357 views - 8.2 KB)
__________________
* Wait for something awesome...
* AMX Mod X Plugin Translation Repository [Paused Temporarily]
* Knife Deathmatch Shop
* Knife CFG Detector
* Looking for an idea...
xEhsaan is offline
Send a message via Skype™ to xEhsaan
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 05-17-2015 , 06:49   Re: Instant Respawn
Reply With Quote #2

Good
tousif is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 05-17-2015 , 08:07   Re: Instant Respawn
Reply With Quote #3

Try to find something interesting, unique. We already have around 1000 instant respawn plugins.

Some things that are strange:
1. Why do you require 1.8.3 ? From what I can see you don't use functions that are inside it and not in version < 183(except few ones which can be "converted"). It's not a good ideea to request an unstable amxx version.
2. Instead Index_To_String: do you ever heard of get_weaponname ?
3. The ammo_name stuffs is useless, you don't use it.

I'm lazy to check more, but as I said, you should come with something more interesting.
__________________

Last edited by HamletEagle; 05-17-2015 at 08:08.
HamletEagle is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 05-17-2015 , 08:08   Re: Instant Respawn
Reply With Quote #4

For respawn you should use:
set_pev(id, pev_deadflag, DEAD_RESPAWNABLE)
ExecuteHamB(Ham_CS_RoundRespawn, id)

Also Index_To_String is really a bad way of doing what you need.

What if i put delay cvar as 0? It wont respawn and a instant respawn should be instant, respawn exactly when dies, no tasks at all. You are not supporting that. Also, this cvar should be a float, you should allow people to use 4.5 for example.

More and more.. You know it won't get approved, you know it's redundant, then stop release this such plugins.

If you made it for learn proposes, post at scripting help instead so people would help you improving it.
__________________
Jhob94 is offline
xEhsaan
Member
Join Date: Mar 2015
Location: Isfahan, Iran
Old 05-17-2015 , 08:18   Re: Instant Respawn
Reply With Quote #5

Ok, so move it to scripting help your snippets, I thought this forum is a good place for this.
__________________
* Wait for something awesome...
* AMX Mod X Plugin Translation Repository [Paused Temporarily]
* Knife Deathmatch Shop
* Knife CFG Detector
* Looking for an idea...
xEhsaan is offline
Send a message via Skype™ to xEhsaan
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:48.


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