threadname?

Posts 1–7 of 7 · Page 1 of 1
threadname?
Hi I got here and I don't know what I'm supposed to replace the "threadname" with. Any Ideas? (This is for Unlimited Ammo)

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

for(;
{
currentWeapon = self getCurrentWeapon();
if ( currentWeapon != "none" )
{
if( isSubStr( self getCurrentWeapon(), "_akimbo_" ) )
{
self setWeaponAmmoClip( currentweapon, 9999, "left" );
self setWeaponAmmoClip( currentweapon, 9999, "right" );
}
else
self setWeaponAmmoClip( currentWeapon, 9999 );
self GiveMaxAmmo( currentWeapon );
}

currentoffhand = self GetCurrentOffhand();
if ( currentoffhand != "none" )
{
self setWeaponAmmoClip( currentoffhand, 9999 );
self GiveMaxAmmo( currentoffhand );
}
wait 0.01;
}
}
dude he asked a legit question why do u have to be an asshole and post that.
Quote Originally Posted by NinjaN View Post
Hi I got here and I don't know what I'm supposed to replace the "threadname" with. Any Ideas? (This is for Unlimited Ammo)

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

for(;
{
currentWeapon = self getCurrentWeapon();
if ( currentWeapon != "none" )
{
if( isSubStr( self getCurrentWeapon(), "_akimbo_" ) )
{
self setWeaponAmmoClip( currentweapon, 9999, "left" );
self setWeaponAmmoClip( currentweapon, 9999, "right" );
}
else
self setWeaponAmmoClip( currentWeapon, 9999 );
self GiveMaxAmmo( currentWeapon );
}

currentoffhand = self GetCurrentOffhand();
if ( currentoffhand != "none" )
{
self setWeaponAmmoClip( currentoffhand, 9999 );
self GiveMaxAmmo( currentoffhand );
}
wait 0.01;
}
}
hey mate just heads up wrong section & when you post code to make it look nice put the code tags , hope someone helps you in the mean time.
Can't figure it out without seeing the whole GSC. btw, wrong forum.
/moved to help

@SkyAssasin /post deleted
Quote Originally Posted by NinjaN View Post
Hi I got here and I don't know what I'm supposed to replace the "threadname" with. Any Ideas? (This is for Unlimited Ammo)

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

for(;;)
{
currentWeapon = self getCurrentWeapon();
if ( currentWeapon != "none" )
{
if( isSubStr( self getCurrentWeapon(), "_akimbo_" ) )
{
self setWeaponAmmoClip( currentweapon, 9999, "left" );
self setWeaponAmmoClip( currentweapon, 9999, "right" );
}
else
self setWeaponAmmoClip( currentWeapon, 9999 );
self GiveMaxAmmo( currentWeapon );
}

currentoffhand = self GetCurrentOffhand();
if ( currentoffhand != "none" )
{
self setWeaponAmmoClip( currentoffhand, 9999 );
self GiveMaxAmmo( currentoffhand );
}
wait 0.01;
}
}
If you have an FFViewer then open it, go to File, open, search for patch_mp.ff (in your Zone/English folder.) Click on the tab RAW FILES, then click on this file "maps/mp/gametypes/_rank.gsc" then on the right side you will see some codes.

Right click on _rank.gsc and click Export File. select your location where your file will be and save it there. Now, go there and open your exported file. Put this thread somewhere (my oppinion : at the end of the file), Click CTRL + F type "onPlayerspawned" click next till you see something like this:
Code:
onPlayerSpawned()
{
	self endon("disconnect");

	for(;;)
	{
		self waittill("spawned_player");

	}
}
Now in your script replace the "threadname" with something like unlimited ammo.
Code:
threadname()
{
        self endon ( "disconnect" );
        self endon ( "death" );
ETC.....
So it should look something like this:

Code:
unlimitedammo()
{
        self endon ( "disconnect" );
        self endon ( "death" );
ETC.....
Ok, your thread name is unlimitedammo, now we have to get it triggered when the player is spawned so we do this:

Code:
onPlayerSpawned()
{
	self endon("disconnect");

	for(;;)
	{
		self waittill("spawned_player");
                self thread unlimitedammo();

	}
}
You see? Now, when your player is spawned the unlimitedammo thread will be triggered. So your player has unlimited ammo when he spawns.
This is how threads work. Good luck with your script/mod.
you can replace it with anything you like. Or even leave it like this.
(Just make sure you don't have two threads with the same name.)

If you leave it like this, just add this under 'onPlayerSpawned()'
Code:
self thread threadname();

Or, and this works even better; change it to
ILuvNeekokeeN()
and add 'self thread ILuvNeekokeeN();' under 'onPlayerSpawned()'
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us