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.


Topics - Radíowave

Pages: [1] 2 3 4 5
1
Modification Help / Parent Delay
« on: January 18, 2016, 02:03:59 PM »
Code: [Select]
package hasLight{
function serverCmdLight(%client){
if(!%client.hasLight){
%client.hasLight = true;
}
else{
%client.hasLight = false;
}
schedule(5000,0,parent::serverCmdLight(%client));
}
};
activatePackage(hasLight);
So basically this code detects whether or not a player has their light out..
what I'm TRYING to make it do is have a 5 second delay so that it takes
5 seconds to turn it on/off. For some reason that won't work... how can
I fix this? Also, do I need my own code to detect players' lights? I feel like
there was already some code written in for that. If so, what is it?

2
Modification Help / Function to get current FOV?
« on: January 14, 2016, 03:40:45 PM »
What's the function to get your current FOV?

3
Modification Help / Add item to player
« on: January 02, 2016, 09:34:15 PM »
All I want to know is how to add an item, tool, or weapon to a player. For some reason I'm actually
having a difficult time figuring this out, maybe it's harder than it sounds?

4
Modification Help / VCE Variables Help
« on: January 01, 2016, 04:27:02 PM »
The VCE add-on has on option to add variables to a player. (through events)

onActivate > Player > VCE_modVariable > (variable here: money) > Add > (amount)

The only way I know how to display it is by using events.

onActivate > Client > CenterPrint > <var:pl:money>

How would I display the amount of 'money' I have through a function such as announce or echo?

I was trying
Code: [Select]
announce(findClientByName("playername").money); but that obviously didn't work.


5
Modification Help / Specifying a client's team
« on: December 30, 2015, 06:41:26 PM »
How do I get somebody's team name? What I'm trying to do is allow people to use a command
ONLY if they're on a specific team.

6
Modification Help / Saving variables using export function
« on: December 25, 2015, 09:55:29 AM »
I need to be able to save variables/info that won't erase after I shutdown my server. I know how to create and
have it write in a .txt file, but from what I'm hearing, this way is more efficient to use.

This is the demonstration we'll work with:
Code: [Select]
function serverCMDaddMoney(%client, %target, %amount)
{
%targ = findClientByName(%target);

        //Just checking things here...
if(!%client.isSuperAdmin)
{
return;
}
if(!isObject(%targ))
{
%client.chatMessage("Invalid client!");
return;
}
if(%amount <= 0)
{
%client.chatMessage("Invalid amount!");
return;
}

%targ.money = %targ.money + %amount;
announce("\c3"@%targ.name@" \c6has gained \c2$"@%amount);
}
As shown, the function has the ability to add 'money' to a client. Now all I need is for it to save
so that they'll still have their money when the server restarts (or when they leave and come back).

7
Modification Help / NEW TOPIC: Event help
« on: September 25, 2015, 09:35:41 PM »
New Topic

I need help with creating this new event...
Basically I'm trying to make the setMaxForwardSpeed function usable in terms of eventing.

Code: [Select]
function Player::setMaxForwardSpeed(%this, %x) //%this = player object and %x = the speed you put in (my understanding)
{
if(!isObject(%this))
{
return;
}
%this.setMaxForwardSpeed(%x);
}

registerOutputEvent(Player, "setMaxForwardSpeed", "int 0 999 1");

There are no syntax errors, but when I activate a brick using this output event the console says this:

Player::setMaxForwardSpeed - wrong number of arguments.
usage: ( float speed )Sets run speed
Backtrace:



Help?

-----------------------------------------------------------------------------------------------------------------------------
Old Topic

Is there any way to reset/change a player object's attributes ingame without changing their datablock?
Example: Setting their forward speed to 10.

this would be useful considering I wouldn't have to create a new datablock every time I want the player
object to act differently.

8
Suggestions & Requests / GUI For hunger mod
« on: September 23, 2015, 03:49:53 PM »
I was wondering if someone was able to add in a GUI with the add-on below.
My idea for how it should look is something like this:

Health: (health)
Hunger: (hunger)

http://forum.blockland.us/index.php?topic=207812.0
Yep, it's a hunger mod. It automatically gives you updates in the chat, but I think it would be more convenient
and efficient if it was displayed somewhere on the screen at all times. can anyone help?

9
Suggestions & Requests / Respawn Effects Block
« on: September 23, 2015, 03:50:42 AM »
Can someone make an add-on that disables the emitter and the sound that happens whenever
a player spawns/respawns?

10
Modification Help / Add delay after use of function
« on: May 30, 2015, 10:50:07 AM »
Alright, I'm just going to set an example here.

Code: [Select]
hi()
{

     echo("Hi!"); //echo only if the time delay is over
}

How do I make it so that this function can't be spammed over and over again?
Like if a player used it, how can you make them wait 5 seconds before they can
activate it again?

11
Modification Help / Custom Client Colors
« on: May 26, 2015, 08:53:41 PM »
Is there a way to customize the colors you see in other servers? I just thought it would be
really interesting to do this, and have your own little effects. Kind of like how in Minecraft
you can change your own theme, but not that advanced. (Just the colors)

My guess is that it wouldn't be simple doing this in just a regular add-on, but if anyone has
any ideas or suggestions, I'm willing to hear them.

12
Suggestions & Requests / Server-sided Radar
« on: May 25, 2015, 07:42:19 PM »
I'm pretty surprised that there hasn't been a server-sided radar released yet. (at least not
one that I can find) But I can partially understand why at the same time.

I just want to use this for TDMs and whatnot. If this isn't something that shouldn't be
handed out, that's totally acceptable.

13
Suggestions & Requests / Crown Hat
« on: May 24, 2015, 07:53:21 PM »
This is gonna sound a little funny but could some one model up a crown hat for me?
It doesn't have to be detailed, just good enough so that you could tell it's a crown.

(I've been browsing through the forums for awhile and couldn't really find it..)

thank you!

14
Help / Mouse Problems
« on: May 08, 2015, 10:09:26 PM »
My brother has a slightly new HP laptop running on the Windows 8 OS. During game-play,
the player starts looking around in random directions as if the mouse were spazzing out. It's
extremely difficult to aim at something without being messed up or misguided. I tried
disabling the touchscreen and the touchpad, and still nothing. We've even tried it out
on a different mouse, wired and wireless. Any suggestions or ideas? Tell me if you need any
computer specs, thank you.

(he claims that he's only experienced this error on Blockland)

15
Help / Event_Invisibility & Event_TakeCurrentItem
« on: April 27, 2015, 10:46:08 PM »
I would code these myself but I honestly don't have much experience with events.

The first one is simple. I just want it so that if a player clicks a block he becomes invisible.

Code: [Select]
function invisibility(%client)
{
%client.player.hideNode("ALL");
}
I don't know how much this code will help, lol. But use it for the event
(yes, I want the name to be shown still)

onActivate -> Player -> setInvisibility

Now for the more difficult one. I'd like it so that a player can click a block with
their key, and the key will be taken from them.

onKeyMatch -> client? or player? -> takeItem

Thank you guys for looking through this. If you're wondering why I need this,
I'm just trying to make it so that someone will have two choices:
(invisibility or change datablock)

They only get to pick one using their key.
I know there are other ways to do this, but I gave my reasons. It HAS to be this way.

Again thanks for looking over this.  :cookieMonster:

Pages: [1] 2 3 4 5