Author Topic: Lua  (Read 711 times)

0 Members and 1 Guest are viewing this topic.

Offline zippo

  • Newbie
  • *
  • Posts: 40
  • Karma: +4/-13
  • Gender: Male
  • A smile, results in two smiles. :)
    • View Profile
Lua
« on: November 27, 2009, 07:39:50 PM »
So i just found this combine sound menu, for roleplaying. but it only works on TnB, if annyone knows how to recode this, so you can use it in cider... Il give them admin and donator for free, on my server...

link: http://www.garrysmod.org/downloads/?a=view&id=82466


// Zippo
When a clock is hungry it goes back four seconds.

Offline Philliam

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Lua
« Reply #1 on: November 27, 2009, 07:53:33 PM »
What makes it only work in TnB?

Offline Ruben

  • Loobin
  • Regular Member
  • ***
  • Posts: 174
  • Karma: +31/-2
  • Gender: Male
  • I is going to hax joo
    • View Profile
    • My Blog
Re: Lua
« Reply #2 on: November 29, 2009, 08:22:55 PM »
Well its rly simple :/

The code you give here its only client o:

that script just make the player Run a console command that send integer info to the server.

gets the player who call the command and play like.

With this u can get that sounds working but you need to make your own Sound table. ;)

Server side:

Code: [Select]
--Just Small Example
local sndIndex = { "SoundPath1", "SoundPath2", "SoundPath3" }

function PlayShizOnPlayer(p,c,a)

if a[1] then
if a[1] > 0 && a[1] <= 3 then
p:EmitSound(sndIndex[tonumber(a[1])], 70, 100)
else
p:PrintMessage( HUD_PRINTTALK, "You Have Written an Incorrect Sound Please try another" )
end
else
p:PrintMessage( HUD_PRINTTALK, "You Didnt Give Arguments Sorry, Try Again" )
end
end

concommand.Add("rp_playline", PlayShizOnPlayer)

-- Sound Path means the Path of the local sound You want to play, this Table will have 3 index values 1,2,3

btw i dunno wut u mean with TnB? o.o
« Last Edit: March 22, 2010, 05:43:27 AM by Ruben »

Offline Banana Hat

  • Übermensch
  • *****
  • Posts: 725
  • Karma: +124/-83
  • Gender: Male
    • View Profile
    • Banana Hat
Re: Lua
« Reply #3 on: November 29, 2009, 08:40:10 PM »
taco and banana script.
it's a private rp script held by tnb servers.

Offline Ruben

  • Loobin
  • Regular Member
  • ***
  • Posts: 174
  • Karma: +31/-2
  • Gender: Male
  • I is going to hax joo
    • View Profile
    • My Blog
Re: Lua
« Reply #4 on: November 29, 2009, 08:52:14 PM »
Well i can say i have no words for that derma panel code xD.

Haf funz =D

Offline zippo

  • Newbie
  • *
  • Posts: 40
  • Karma: +4/-13
  • Gender: Male
  • A smile, results in two smiles. :)
    • View Profile
Re: Lua
« Reply #5 on: December 03, 2009, 08:40:22 AM »
you sure its client only? line in the "Taco'n'banana" servers, i can hear the combine use voice commands like "Move along" etc.
When a clock is hungry it goes back four seconds.

Offline Ruben

  • Loobin
  • Regular Member
  • ***
  • Posts: 174
  • Karma: +31/-2
  • Gender: Male
  • I is going to hax joo
    • View Profile
    • My Blog
Re: Lua
« Reply #6 on: January 09, 2010, 09:03:28 AM »
Yes... Lua need clientside to server side interaction, well depends how you use lua, at least this gaiz made a derma so they need to send client commands through it.

You will be able to recreate that with Mah Server Side Lua shiz.

if you try to use without any server script, this going to send u go eat shiz so :/.

Offline Frank

  • No.
  • WaffleBBQrz
  • ******
  • Posts: 4058
  • Karma: +94/-45
  • Gender: Male
    • View Profile
Re: Lua
« Reply #7 on: January 09, 2010, 11:32:05 AM »
OMg... Ruben is ALIVE!

Offline Ruben

  • Loobin
  • Regular Member
  • ***
  • Posts: 174
  • Karma: +31/-2
  • Gender: Male
  • I is going to hax joo
    • View Profile
    • My Blog
Re: Lua
« Reply #8 on: January 09, 2010, 12:24:40 PM »
LoLWut o,o :C ya i R

Offline » Magic «

  • Who dares wins
  • WaffleBBQrz
  • ******
  • Posts: 4020
  • Karma: +101/-34
  • Gender: Male
  • Prepare for the worst :D
    • View Profile
Re: Lua
« Reply #9 on: January 10, 2010, 04:59:24 AM »
noda  he r dead
Copyright© .:~`=-rANdOm-=`~:. GameServer's Administration Team 2008/2009/2010


bubbly bubbly so darn bubbly

Offline ¦FlapJack¦

  • Newbie
  • *
  • Posts: 26
  • Karma: +0/-1
    • View Profile
Re: Lua
« Reply #10 on: January 11, 2010, 10:47:44 AM »
Ruben, why are you making a table every time the command gets used? Its just adding more to what needs to be collected when its out of scope.


I reckon I've got OCD with tabbing too. Your tabbing makes me want to fix it...

Offline Ruben

  • Loobin
  • Regular Member
  • ***
  • Posts: 174
  • Karma: +31/-2
  • Gender: Male
  • I is going to hax joo
    • View Profile
    • My Blog
Re: Lua
« Reply #11 on: January 11, 2010, 07:26:11 PM »
lol my mistake, just need to take out the table out the function. I'm agree with that.

Anyway do w/e you want, every people work in their own way so... idk.

if you don't like it I'm sooooooooooooo sorry :). Luck with OCD xD.

Offline xxMingebaggerxx

  • Mingekillah :P
  • Übermensch
  • *****
  • Posts: 1362
  • Karma: +36/-74
  • Gender: Male
  • DR33M FTW!
    • View Profile
    • DR33M
Re: Lua
« Reply #12 on: February 10, 2010, 11:46:28 AM »
I kan c u luben.. xD
"Name doesent define who we are, it is our actions and our creations"  -  Mingebagger (2009)
http://www.dr33m.co.cc visit it


mm.. me2

Offline =-Mastgrr-=

  • Critical hit!
  • Übermensch
  • *****
  • Posts: 990
  • Karma: +21/-27
  • Gender: Male
  • Respect: <9000
    • View Profile
Re: Lua
« Reply #13 on: March 23, 2010, 10:59:15 AM »
Look at my fail lua !!

Code: [Select]
function Fail(F)

if a[1] then Fail
if a[1] > 0 && a[1] <= 3 then
p:EmitSound(Fail, 70, 100)
else
p:FailMessage( HUD_PRINTTALK, "You Have Written an Incorrect Sound Please try another" )
end
else fail
p:PrintMessage( HUD_PRINTTALK, "Fail" )
end
end
fail
concommand.Add("rp_playfail", Fail)
.:~`=-rANdOm-=`~:. Game Server's Respected Team