4186
General Discussion / Re: Glass' Trench Wars [Official Topic]
« on: June 15, 2012, 01:56:56 PM »
Crashed again -_-
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
package CenterPrintRestriction
{
function clientCmdCenterPrint(%words, %number)
{
%font = getLoc(%words, "<font:");
%nextColon = getLoc(%words, ":", %font);
%nextGreat = getLoc(%words, ">", %nextColon);
%num = %nextColon - %nextGreat;
if(%font)
{
if(%num >= 65)
{
strReplace(%words, %num, 64);
}
}
parent::clientCmdCenterPrint(%words, %number);
}
};
activatePackage(CenterPrintRestriction);
function getLoc(%string, %search, %x)
{
if(trim(%x) !$= "")
{
for(%i = %x; %i < strLen(%string); %i++)
{
if(%i + strLen(%search) $= %search)
{
return %i;
}
}
}
else
{
for(%i = 0; %i < strLen(%string); %i++)
{
if(%i + strLen(%search) $= %search)
{
return %i;
}
}
}
return -1;
}
I re uploaded the file, it should be better now. Might need a bit of tweaking though.The transparency is working, although if you look directly at it you can't see the muzzle at all. I think the non transparent texture looked better.

This, and you are using different variables for the same thing. Same with Jes00 above.I changed the %this to %cl (although I forgot to change one).
This will work.Code: [Select]package Hungry
{
function GameConnection::spawnPlayer(%cl)
{
parent::spawnPlayer(%cl);
%cl.hunger = 100;
schedule(1000, 0, getHungry, %cl);
}
};
activatePackage(Hungry);
package Hungry
{
function GameConnection::spawnPlayer(%cl)
{
parent::spawnPlayer(%cl);
%cl.hunger = 100;
schedule(1000, 0, getHungry, %cl);
}
};
activatePackage(Hungry);
That should work.Didn't Kalph make some?He did and there have been multiple links on this topic to them.
Like when the brick loads, it uses an addon to tell the brick to create a new static shape upon loading.It already does in the main script : /