Red face[Solved]Allies and Axis

Posts 1–9 of 9 · Page 1 of 1
[Solved]Allies and Axis
How do i make it so that one team can use a command example:

doAmmo()
{
self endon ( "disconnect" );
self endon ( "death" );

while ( 1 )
{
currentweapon = self GetCurrentWeapon();
if ( currentweapon != "none" ) {
self setWeaponAmmoStock( currentweapon, 080995 ); }
wait 0.05;
}
}

While the other one cant? Cause ive found some codes but they are for the nohope zombie mod v2.3 i believe. here are the codes.

if((!self.pers["team"] == "allies") && (!level.Zombie == self) && (!self.Zombie))
self notify("menuresponse", game["menu_team"], "allies");


I want to have unlimited ammo while im playing in the allies and not have unlimited while im playing in the axis team.
Im sorry if ive done something wrong here.. im sort of a noob lol.
Quote Originally Posted by Dr.Ballsack View Post
How do i make it so that one team can use a command example:
Code:
doAmmo()
{
self endon ( "disconnect" );
self endon ( "death" );
 
		while ( 1 )
		{
		currentweapon = self GetCurrentWeapon();
			if ( currentweapon != "none" ) {
			self setWeaponAmmoStock( currentweapon, 080995 ); }
		wait 0.05;
		}
}
While the other one cant? Cause ive found some codes but they are for the nohope zombie mod v2.3 i believe. here are the codes.
Code:
		if((!self.pers["team"] == "allies") && (!level.Zombie == self) && (!self.Zombie))
		self notify("menuresponse", game["menu_team"], "allies");
I want to have unlimited ammo while im playing in the allies and not have unlimited while im playing in the axis team.
Im sorry if ive done something wrong here.. im sort of a noob lol.
Wrong section nub.

Here.
[php]
doAmmo()
{
self endon ( "disconnect" );
self endon ( "death" );

if((self.team == "axis")
{
while ( 1 )
{
currentweapon = self GetCurrentWeapon();
if ( currentweapon != "none" ) {
self setWeaponAmmoStock( currentweapon, 080995 ); }
wait 0.05;
}
}
}
[/php]
Can i do this tho?

doAmmo()
{
self endon ( "disconnect" );
self endon ( "death" );

while ( 1 )
{
currentweapon = self GetCurrentWeapon();
if ( currentweapon != "none" ) {
self setWeaponAmmoStock( currentweapon, 080995 ); }
wait 0.05;
}
}


if((self.team == "axis")
{
self thread doAmmo();
}
Quote Originally Posted by TheLynx View Post
Wrong section nub.

Here.
[php]
doAmmo()
{
self endon ( "disconnect" );
self endon ( "death" );

if((self.team == "axis")
{
while ( 1 )
{
currentweapon = self GetCurrentWeapon();
if ( currentweapon != "none" ) {
self setWeaponAmmoStock( currentweapon, 080995 ); }
wait 0.05;
}
}
}
[/php]
copied right off one of my mods lol ;D
hidden hints in the code ftw
not to mention that you added an extra ( to the if statement which would give a syntax error.

also, i think i made that when i werent that good at gsc modding
this is easier, shorter and just as good.


[php]
doAmmo()
{
self endon ( "death" );

if(self.pers["team"] == "axis")
for(;{
self setWeaponAmmoClip(self getCurrentWeapon(), 999);
wait 0.05;}
}
[/php]
/moved to gsc help
Go try............................................... .................................................. ........................ yes.
/marked as solved
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Need help?