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

peticion droped weapon remove


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
danips
Junior Member
Join Date: Apr 2019
Old 04-19-2019 , 19:51   peticion droped weapon remove
Reply With Quote #1

hola nesesito que le agregue un cvar que retrase la desaparicion del arma.
ahora apenas la dropeas desaparece me gustaria que tenga un delay de 30 segundos

Code:
hello I need you to add a cvar that delays the disappearance of the weapon.
now as soon as the droppings disappears I would like it to have a delay of 30 seconds
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new cvar_removedropped 

public plugin_init() {
register_plugin(PLUGINVERSIONAUTHOR)

register_forward(FM_SetModel"fw_SetModel"
cvar_removedropped register_cvar("cs_remove_dropped""1")
}

public 
fw_SetModel(entity, const model[])
{
static 
Float:removeweapons
removeweapons 
get_pcvar_float(cvar_removedropped)

if (
removeweapons 0.0)
{
static class[
10]
pev(entitypev_classname, class, sizeof class - 1)

if (
equal(class, "weaponbox"))
{
set_pev(entitypev_nextthinkget_gametime () + removeweapons)
return;
}
}


Last edited by Bugsy; 04-20-2019 at 11:41.
danips is offline
thEsp
BANNED
Join Date: Aug 2017
Old 04-20-2019 , 04:42   Re: peticion droped weapon remove
Reply With Quote #2

This is English forum only.

Last edited by thEsp; 04-20-2019 at 04:44.
thEsp is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-20-2019 , 11:41   Re: peticion droped weapon remove
Reply With Quote #3

This plugin works for me, set cs_remove_dropped to 30.
__________________
Bugsy is offline
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 04-20-2019 , 23:40   Re: peticion droped weapon remove
Reply With Quote #4

If the plugin makes debug errors try to check if entity is valid

PHP Code:
    if(!pev_valid(entity))
        return; 
Moody92 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 20:57.


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