Show Posts

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.


Messages - Crøwn

Pages: 1 ... 3 4 5 6 7 [8] 9 10 11 12 13 ... 225
106
I’m pretty sure you can call .save(filepath); on the object and it’ll save.

If you want to get console output look into using a ConsoleLogger object.

107
The addItem event foolishly uses the %client variable as the last parameter on the event when being delcared like this: Player::addItem(%player, %image, %client). This causes anyone who wants to use it outside of the event to have to do %player.addItem(wrenchItem, %player.client);

This is how I go about adding items to players:
Code: [Select]
for(%i = 0; %i < %this.getDatablock().maxTools; %i++)
{
%tool = %this.tool[%i];
if(%tool == 0)
{
%this.tool[%i] = %item;
%this.weaponCount++;
messageClient(%cl, 'MsgItemPickup', '', %i, %item);
break;
}
}
If you don't understand what that's doing I'll explain. It does a for loop for the amount of slots the player's playerType data has and looks for a slot that doesn't have an item in it (%tool being 0). If it finds one, it sets the tool to be that item data and uses messageClient so the client knows it has the item.

%this being the player object.

108
Suggestions & Requests / Re: Mod Request [WILLING TO PAY]
« on: June 11, 2017, 09:44:01 AM »
Use doPlayerTeleport instead and it should work properly. I had this issue with something before.

109
I’d just delete the screenshots and stop using the launcher, the game launches faster too.

If nobody responds with a real solution I’ll look how it works later. My guess would be it has a count and index of screenshots and when you just delete the file it’s still going to try to display it even after being removed.

EDIT: As I suspected, they're stored in mainMenuGui.screenShot[idx]. The value being the path of the image. You could do a loop using mainMenuGui.screenShotCount to locate the default ones and remove them.

110
If I have time later I'll fix it if nobody else does by then.

111
Add-Ons / Re: Blockland Glass 4.0
« on: June 05, 2017, 11:45:27 PM »
Banned White Unova.

did you know that this belongs in a place called drama
Not really. I don't think every spammer deserves their own thread.

112
Add-Ons / Re: Blockland Glass 4.0
« on: June 05, 2017, 01:18:57 PM »
Currently the way it works is if your message is 75% caps or more and longer than five characters you'll get a warning. Maybe we can relax this a bit or make it 6-7 chars.

113
Modification Help / Re: Set Default Paint Color
« on: June 04, 2017, 02:15:22 PM »
Blockland has ruined the color red for me forever.

114
Give your GuiTextListCtrl a name. You'll then be able to create a function named onSelect for the object and it'll be called when an item is selected.

function MyList::onSelect(%this, %rowID, %rowText)

115
Put this in your file somewhere:


$remapDivision[$remapCount]   = "Add-on name";
$remapName[$remapCount]      = "Keybind name";
$remapCmd[$remapCount]      = "function to call (you would put openGUI)";
$remapCount++;


So when someone sets this keybind and presses the button, it's going to automatically call your "openGUI" function with a 1 as a parameter. It's going to do openGUI(1); when you push down and openGUI(0); when you let up. This means you'll have to have a variable in your function named something like %on so you can tell the difference between it being pushed down and let up. Doing something like if(!%on) return; will prevent the function from being called twice when you only want it once.

Not sure what you're doing at the top of your code with the lonely % but if you wanted to include a variable it'll need a name.

116
pls

What does writeFuncOffCheck(%file, %fnNamespace, %fnName, %protectANY) do?
Code: [Select]
function writeFuncOffCheck(%file, %fnNamespace, %fnName, %protectANY)
{
if (getBuildString() !$= "Debug" && getBuildString() !$= "Release")
{
return;
}
%offset = getFunctionOffset(%fnNamespace, %fnName);
if (%fnNamespace $= "")
{
%file.writeLine("if(  (fnNamespace == NULL) && !dStricmp(fnName, " @ %fnName @ ") && (ip != " @ %offset @ ")  )");
%file.writeLine("   fail = true;");
}
else
{
if (%protectANY)
{
%file.writeLine("if(  fnNamespace && !dStricmp(fnName, " @ %fnName @ ") && (ip != " @ %offset @ ")  )");
%file.writeLine("   fail = true;");
}
else
{
%file.writeLine("if(  fnNamespace && !dStricmp(fnNamespace, " @ %fnNamespace @ "\") && !dStricmp(fnName, " @ %fnName @ ") && (ip != " @ %offset @ ")  )");
%file.writeLine("   fail = true;");
}
}
}

Nothing we're able to use, looks like it's only used for debugging as our buildString is "Ship". Not sure what getFunctionOffset does but it's not included with our builds.

117
Modification Help / [RESOURCE] Default functions & their parameters
« on: May 26, 2017, 12:13:12 PM »
If you need to parent something and are unsure what different parameters certain functions require or just don't know how to use a function, here is a list of each function.

Server functions
Client functions

I figured this would make things easier than having to use trace to figure out what each variable was used for.

118
For certain reasons not everyone should have the decompiler (if this goes in the wrong hands it could be spread quick or find something bad and abuse it). If you want to know a certain function you can add me on steam
It might be a good idea to post the function declarations though, so everyone knows how to parent each function. I may do that.

119
Suggestions & Requests / Re: Universal GUI API
« on: May 21, 2017, 12:26:26 AM »
With the way GUIs work in Blockland something like this wouldn't really be too helpful. If all you could do is create gui controls and menus for people with no code attached with it, the functionality would be pretty bare. The closest thing to this that we have is the "required clients" portion of Blockland Glass which hasn't really been used very much, but it basically prompts people to download an add-on and will download and execute it automatically before connecting (documentation in the manual).

I do agree that having one central key bind would be cool, having tons of binds for various servers is annoying. I like how Garry's Mod leaves F1-4 as spares.

120
Add-Ons / Re: Blockland Glass 4.0
« on: May 19, 2017, 03:54:29 PM »
one potential request for 4.1, any chance you could add a way to sticky specific notifications? I want to sticky mentions in general discussion, but don't want to sticky anything else.
In 4.1 a little icon in the bottom right of your PlayGUI will appear when you get a mention or PM and will not go away until opening the overlay.

This should help with people missing PMs, it has been in the dev version for a few months and it has helped me remember to look at messages a lot.

Pages: 1 ... 3 4 5 6 7 [8] 9 10 11 12 13 ... 225