Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

Refill script

Here you can find answered ScriptAPI topics.
Forum rules
By using the forum you agree to the following rules.
Post Reply
aBraM
Fighter
Fighter
Posts: 10
Joined: Tue Dec 27, 2016 8:12 pm

Refill script

Post by aBraM » Sat Dec 31, 2016 10:43 pm

a script for a button to refill ammo
0 x

Dumby Eggy
Superfighter
Superfighter
Posts: 66
Joined: Wed Dec 21, 2016 4:22 am
SFD Account: Huevon NEO
SFD Alias: Huevon SFD
Started SFD: PreAlpha 1.8.8
Location: Honduras
Gender:
Age: 21

Post by Dumby Eggy » Sun Jan 01, 2017 2:47 am

I mean you are doing a teams map (which is the same I'm doing, but like HoTH And Capture Point).

Alright: here's the script:

Code: Select all

public void refil(TriggerArgs args)
{
        	IPlayer ply = (IPlayer)args.Sender;
	        ply.GiveWeaponItem(ply.CurrentPrimaryWeapon.WeaponItem);
	        ply.GiveWeaponItem(ply.CurrentSecondaryWeapon.WeaponItem);
	        ply.GiveWeaponItem(ply.CurrentMeleeWeapon.WeaponItem);
	        ply.GiveWeaponItem(ply.CurrentThrownItem.WeaponItem);
}


this one works 100% perfect for me :D
1 x
HINT: You will not surprise me if you are good with snipers and magnums and katanas; but I will give my respect for someone who is a weapon-master. So don't wait any cheer marksmen...8-)

Post Reply