Hello,
I was wondering if any one knew of a good way to do this.
When the client is affected by a particular status, they are given a weapon which replaces their primary weapon. While that status is lasting, I do not want them to be able to drop that weapon so they could just then re-pickup their dropped weapon again.
in the search:
Code:
[...blah...]
UsedDepower[id] = 1;
depower_replace(id);
new parm[1];
parm[0] = id;
set_task( fcooldownTime, "reset_depowered", 50+id, parm, 1);
[...blah...]
in depower_replace
Code:
[...blah...]
get_user_weapons( id , wpnList , number );
for ( new i = 0; i < number; i++)
{
//Skip pistols, grenades, knife - only go for primary weapons
if ( !IsWeaponPrimary( wpnList[i] ) )
{
continue;
}
//Get the weapon name
get_weaponname( wpnList[i] , wpname , 31 );
//and make them drop it
engclient_cmd( id , "drop" , wpname );
}
give_item( id , "weapon_tmp" );
give_item( id , "ammo_9mm" );
return PLUGIN_CONTINUE;
}
So basically when afflicted they drop their weapon and are given a TMP instead. But right now there is nothing stopping them from picking it back up right away.
Is there a good way (perhaps a native?) that wont cause a lag ?
Thank you in advance.