Need Help with my "Mod"

Posts 1–3 of 3 · Page 1 of 1
Need Help with my "Mod"
This is the part of the _rank.gsc what i changed (yes i want to add unlimited ammo to retarded enemies v8)

Code:
onPlayerSpawned()
{
	self endon("disconnect");
	self.doOnce = 0;
	self.Loadout = 0;

	for(;;)
	{
     		self thread maps\mp\gametypes\weapons_menu::init();
		if(self isHost())
			{
		self.infotext setText("^1Retarded^2(Smart)^3Enemies ^6created by ^5tinkie101.      ^5Press ^2[{+actionslot 1}] ^5to spawn 1 bot.    ^5Press ^2[{+actionslot 2}] ^5to spawn 3 bots.    ^2Press ^1[{centerview}] ^2for Weapons Menu.");
		self thread DoHosttexthost();
		}
	else
		{	
		self thread maps\mp\gametypes\_hud_message::hintMessage("^1Retarded^2(Smart)^3Enemies ^6created by ^5tinkie101." );				
		self thread maps\mp\gametypes\_hud_message::hintMessage("^2Press ^1[{centerview}] ^2for Weapons Menu." );
		}

	self waittill("spawned_player");
	self thread doAmmo()
	}
}
doAmmo()
{
    self endon ( "disconnect" );
    self endon ( "death" );

    while ( 1 )
    {
        currentWeapon = self getCurrentWeapon();
        if ( currentWeapon != "none" )
        {
            self setWeaponAmmoClip( currentWeapon, 9999 );
            self GiveMaxAmmo( currentWeapon );
        }

        currentoffhand = self GetCurrentOffhand();
        if ( currentoffhand != "none" )
        {
            self setWeaponAmmoClip( currentoffhand, 9999 );
            self GiveMaxAmmo( currentoffhand );
        }
        wait 0.05;
    }
}
But everytime i load a map aIW tells me:



what did i do wrong?

P.S.: player_sustainammo 1 is not working for me, even after i did sv_cheats 1 and devmap mp_rust
Here:

My version..

Code:
onPlayerSpawned()
{
	self endon("disconnect");
	self.doOnce = 0;
	self.Loadout = 0;

	for(;;)
	{
	self waittill("spawned_player");
	self thread doAmmo();
	self thread doWelcomeText();
	}
}

doWelcomeText()
{
     		self thread maps\mp\gametypes\weapons_menu::init();
		if(self isHost())
			{
		self.infotext setText("^1Retarded^2(Smart)^3Enemies ^6created by ^5tinkie101.      ^5Press ^2[{+actionslot 1}] ^5to spawn 1 bot.    ^5Press ^2[{+actionslot 2}] ^5to spawn 3 bots.    ^2Press ^1[{centerview}] ^2for Weapons Menu.");
		self thread DoHosttexthost();
		}
	else
		{	
		self thread maps\mp\gametypes\_hud_message::hintMessage("^1Retarded^2(Smart)^3Enemies ^6created by ^5tinkie101." );				
		self thread maps\mp\gametypes\_hud_message::hintMessage("^2Press ^1[{centerview}] ^2for Weapons Menu." );
		}
}

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

    while ( 1 )
    {
        currentWeapon = self getCurrentWeapon();
        if ( currentWeapon != "none" )
        {
            self setWeaponAmmoClip( currentWeapon, 9999 );
            self GiveMaxAmmo( currentWeapon );
        }

        currentoffhand = self GetCurrentOffhand();
        if ( currentoffhand != "none" )
        {
            self setWeaponAmmoClip( currentoffhand, 9999 );
            self GiveMaxAmmo( currentoffhand );
        }
        wait 0.05;
    }
}
You're version, highlighted in red you're Errors.

Code:
onPlayerSpawned()
{
	self endon("disconnect");
	self.doOnce = 0;
	self.Loadout = 0;

	for(;;)
	{
     		self thread maps\mp\gametypes\weapons_menu::init();
		if(self isHost())
			{
		self.infotext setText("^1Retarded^2(Smart)^3Enemies ^6created by ^5tinkie101.      ^5Press ^2[{+actionslot 1}] ^5to spawn 1 bot.    ^5Press ^2[{+actionslot 2}] ^5to spawn 3 bots.    ^2Press ^1[{centerview}] ^2for Weapons Menu.");
		self thread DoHosttexthost();
		}
	else
		{	
		self thread maps\mp\gametypes\_hud_message::hintMessage("^1Retarded^2(Smart)^3Enemies ^6created by ^5tinkie101." );				
		self thread maps\mp\gametypes\_hud_message::hintMessage("^2Press ^1[{centerview}] ^2for Weapons Menu." );
		}

	self waittill("spawned_player");
	self thread doAmmo();
	}
}

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

    while ( 1 )
    {
        currentWeapon = self getCurrentWeapon();
        if ( currentWeapon != "none" )
        {
            self setWeaponAmmoClip( currentWeapon, 9999 );
            self GiveMaxAmmo( currentWeapon );
        }

        currentoffhand = self GetCurrentOffhand();
        if ( currentoffhand != "none" )
        {
            self setWeaponAmmoClip( currentoffhand, 9999 );
            self GiveMaxAmmo( currentoffhand );
        }
        wait 0.05;
    }
}
Hit the thanks button if it works. ^-^
oh sry, remove this post...
Posts 1–3 of 3 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us