Hello, after most people made many awesome gungames
I am here to release:
how to make your very basic gungame
Note:this tut only show you how to make normal gungame with nothing added, just lame gungame
There is some ways to make gungame, but here I will release 2 ways
way 1:
Create 2 new call of thread and new integer
and name it anything u want, let's say for ex:
Code:
onPlayerSpawned()
{
self endon("disconnect");
self.curgun = 0;
for(;;)
{
self waittill("spawned_player");
self thread dogungame();
self thread dogivegun();
}
}
and here, let's put the dogungame() anywhere and:
Code:
dogungame
{
self endon("disconnect");
self.dogun = [];
self.dogun[0] = givegun("weaponnameher", camovalue, false);
self.dogun[1] = givegun("bleh", camo, false);
}
cangrats


, now here you have function
Code:
self giveWeapon("", ,);
this is giveweapon function, but if it assigned with array it will not give weapon until it would been called
the weapon in quote ("") is weapon name code, see:
All Weapon and Perk Names - ********* Forums
and the infront of it is camo value, it is a number, see:
give weapon camos? - ********* Forums
and after it is true/false (akimbo on/off)
about dogivegun()
Code:
dogivegun()
{
self endon("disconnect");
self endon("death");
while(1)
{
self takeAllWeapons();
self giveWeapon(self.dogun[self.curgun].name, self.dogun[self.curgun].camo, self.dogun[self.curgun].akimbo);
self waittill("killed_enemy");
self.curgun += 1;
wait 0.01;
}
while(self getCurrentWeapon != curweap)
{
self takeAllWeapons();
self giveWeapon(self.dogun[self.curgun].name, self.dogun[self.curgun].camo, self.dogun[self.curgun].akimbo);
wait 0.01;
}
}
and make a new code without calling it in spawned/connected player
Code:
self givegun(curweap, camovale, akmtrfa)
{
gun = spawnstruct();
gun.cur = curweap;
gun.camo = camovale;
gun.akimbo = akmtrfa;
return gun;
}
END
way 2:
similar to way one =\
but just put for statement
Note:The codes are little buggy