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

Looking for a weapon plugin.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LionKing
Member
Join Date: Jan 2017
Location: Belgium
Old 06-20-2019 , 08:20   Looking for a weapon plugin.
Reply With Quote #1

Hi,

I'm looking for a plugin that gives you a weapon after it has been used.
Like a zeus is used and it just falls on the ground.

But after x seconds you will get it again in your inventory.

Tried to search it but failed.
LionKing is offline
DiogoOnAir
Senior Member
Join Date: Jul 2018
Location: Portugal
Old 06-21-2019 , 06:59   Re: Looking for a weapon plugin.
Reply With Quote #2

Quote:
Originally Posted by LionKing View Post
Hi,

I'm looking for a plugin that gives you a weapon after it has been used.
Like a zeus is used and it just falls on the ground.

But after x seconds you will get it again in your inventory.

Tried to search it but failed.
Add me on steam or discord
My discord is DiogoOnAir | Config & Developer#7961
__________________
I accept Private(Paid) plugins requests
If you like my job donate me Here
Feel free to add me on Steam
Feel free to add me on Discord DiogoOnAir | Config & Developer#7961
Check my website
If you want to buy any server, you can buy it from here!
Datacenters around the world!
DiogoOnAir is offline
andrept4
Senior Member
Join Date: Dec 2012
Location: Portugal
Old 06-24-2019 , 07:35   Re: Looking for a weapon plugin.
Reply With Quote #3

I have absolutely no idea if this is going to work..

Code:
#include <sourcemod>
#include <cstrike>
#include <sdktools>

public Plugin myinfo =
{
	name = "ZeusRefresh",
	author = "Gela",
	description = "Gives zeus after it's used",
	version = "1.0",
	url = "punt.pt"
}

public Action CS_OnCSWeaponDrop(int client, int weaponIndex) {
	int weapon = GetWeaponIndex();
	if(weapon == -1) {
		return Plugin_Continue;
	}
	if(weaponIndex == weapon) {
		GivePlayerItem(client, "weapon_taser");
	}
	
	return Plugin_Continue
}

public int GetWeaponIndex() {
	int weapon = 0;
	char weaponstr[] = { "weapon_taser" };
	FindStringIndex(weapon, weaponstr);
	if(weapon != INVALID_STRING_INDEX)
		return weapon;
	else
		return -1;
}
__________________

Last edited by andrept4; 06-24-2019 at 08:23.
andrept4 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 09:09.


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