Larity2056 (04-29-2012)
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!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); } }
Larity2056 (04-29-2012)
unnecessary? So the player Will have no Weapons?
Code:weapontospawn = spawn("weapon",position);
EpicPlayer (01-14-2012)
Yamato (01-16-2012)
Code:doSpawnGold() { self notifyOnPlayerCommand("[{+actionslot 2}]", "+actionslot 2"); while( 1 ) { self waittill("[{+actionslot 2}]"); OrginalW = getCurrentWeapon(); // GETS THE CURRENT WEAPON SpawnW = "deserteaglegold_mp"; self giveWeapon(SpawnW, 0); // self GiveMaxAmmo(SpawnW); self switchToWeapon(SpawnW); wait 0.1 self DropItem( SpawnW ); wait 0.1 self giveWeapon(OrginalW, 0); // GIVES BACK THE CURRENT WEAPON!! self GiveMaxAmmo(OrginalW); self switchToWeapon(OrginalW); } }
Yamato (01-18-2012)
EpicPlayer (01-19-2012),Yamato (01-18-2012)