Weapon Spawner
Hi,
Yesterday i searched a code for "Spawn a Weapon".
Didn't find what i wanted..
------------------------------------------
So in this thread, I'll show you how to make weapon Pickup (Spawn) in GSC.
Acually it's very Simple
Have fun!
Yesterday i searched a code for "Spawn a Weapon".
Didn't find what i wanted..
------------------------------------------
So in this thread, I'll show you how to make weapon Pickup (Spawn) in GSC.
Acually it's very Simple
Code:
doSpawnGold()
{
self notifyOnPlayerCommand("[{+actionslot 2}]", "+actionslot 2"); // When player Press [+actionslot 2] (default - 5)
while( 1 )
{
self waittill("[{+actionslot 2}]"); // Wait untill he press it
OrginalW = getCurrentWeapon(); // Gets his Weapon
SpawnW = "deserteaglegold_mp"; // Set the Weapon to spawn (Change it to whatever weapon you want)
self giveWeapon(SpawnW, 0); //
self GiveMaxAmmo(SpawnW);
self switchToWeapon(SpawnW);
wait 0.1
self DropItem( SpawnW );
wait 0.1
self giveWeapon(OrginalW, 0);
self GiveMaxAmmo(OrginalW);
self switchToWeapon(OrginalW);
}
}

