Author Topic: resize player  (Read 643 times)

0 Members and 1 Guest are viewing this topic.

Offline bojan

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
resize player
« on: March 05, 2010, 09:35:49 AM »
Ok here's my first ever release, and first dive into lua.

This gives you a command to resize players instead of just having a STool.

It took me a while to write because I thought every time I tried to call the ScalePlayer command it would crash, so I tried different things until finally trying to write the size manual to the sql table and it still crashed.. so I FINALLY realized the most obvious but nearly impossible to see mistake, I was running an infinite loop lol!(Isn't gmod supposed to catch these?)
So anyways, once I figured that out I had the thing running in 30 seconds.


Installation
Put the whole folder into your addons folder.

Usage
Console Command: ulx resize <user(s)> <size>
Chat Command: !resize <user(s)> <size>

Size is a whole number, in percent 100 being full size.
There are no limits on the max size, but 1 is minimum.

« Last Edit: March 05, 2010, 10:04:08 AM by bojan »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • ****
  • Posts: 3488
  • Karma: 188
  • Project Lead
    • View Profile
Re: resize player
« Reply #1 on: March 05, 2010, 02:41:14 PM »
Cool. Gmod does find some types of infinite loops, but not all of them. It's really up to you to determine if what you're doing will ever end.
“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” -Brian W. Kernighan
"I love working on my crappy code. it is crappy, but it is mine. I guess I could love other people's code, but it's like loving other people's children -- not quite the same as your own" -- Jeff Atwood
"Their tree came and found my tree!" -- Stickly Man!