[QUOTE=NewDude;49122672]actually it should be Lua :v
comes from the creator's name[/QUOTE]
It is always a shame to see John Lua go uncredited
[QUOTE=NewDude;49122672]comes from the creator's name[/QUOTE]
uhh no it doesn't
[quote=http://www.lua.org/about.html]
[IMG]http://img.tylerbundy.me/qO49p2S5.png[/IMG]
[/quote]
[QUOTE=Netheous;49107738]Yeah, because my post was ALL ABOUT semantics and not about him using lua tags so it's more readable.
Good job being an asshat.[/QUOTE]
To be honest I wasn't exactly sure what you meant by [lua] tags and it took me a while to realize what you meant. I don't think OP understands what you meant either since he's still posting w/o them.
[QUOTE=NewDude;49122672]actually it should be Lua :v
comes from the creator's name[/QUOTE]
No, the creators are: Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes.
Lua's logo show an orbiting moon around earth.
[t]https://dl.dropboxusercontent.com/u/14214411/pics/Lua-logo-nolabel.svg.png[/t]
Even the wiki say its 'moon': "[i]Lua (/ˈluːə/ loo-ə, from Portuguese: lua [ˈlu.(w)ɐ] meaning moon)[/i]".
Regardless. Its true that it should be 'Lua'. Its a name.
[QUOTE=Nak;49123378]No, the creators are: Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes.
Lua's logo show an orbiting moon around earth.
[t]https://dl.dropboxusercontent.com/u/14214411/pics/Lua-logo-nolabel.svg.png[/t]
Even the wiki say its 'moon': "[i]Lua (/ˈluːə/ loo-ə, from Portuguese: lua [ˈlu.(w)ɐ] meaning moon)[/i]".
Regardless. Its true that it should be 'Lua'. Its a name.[/QUOTE]
As far as I remember it's from Luiz's name. But I might be wrong.
[QUOTE=Nak;49123378]
[t]https://dl.dropboxusercontent.com/u/14214411/pics/Lua-logo-nolabel.svg.png[/t][/QUOTE]
I didn't know the moon was made out of America
[QUOTE=NewDude;49125074]As far as I remember it's from Luiz's name. But I might be wrong.[/QUOTE]
Might had been a nickname or something. But can't find any source on it.
[QUOTE=MPan1;49125082]I didn't know the moon was made out of America[/QUOTE]
That's why they got a flag up there :v
Thanks guys.
So, for example if I want kick a player when his ping is 200 or +, the script have to be like this?:
addons\script\client
[CODE]
local maxping = 200
local ply = LocalPlayer()
timer.Create("pingcheck", 1, 0, function()
if ply:Ping() >= maxping then
net.Start("KickThePlayer")
net.SendToServer()
else
end
end )
[/CODE]
addons\script\server
[CODE]
local ply = LocalPlayer()
net.Receive("KickThePlayer", function()
ply:Kick("You was kicked")
end)
[/CODE]
[QUOTE=Predda;49151315]Thanks guys.
So, for example if I want kick a player when his ping is 200 or +, the script have to be like this?:
addons\script\server
[CODE]
local ply = LocalPlayer()
net.Receive("KickThePlayer", function()
ply:Kick("You was kicked")
end)
[/CODE][/QUOTE]
No. LocalPlayer is a client only function. When using net.Receive server side the second argument is the player that sent the net request.
Please read more here: [URL]http://wiki.garrysmod.com/page/Net_Library_Usage[/URL]
[QUOTE=Predda;49151315]Thanks guys.
So, for example if I want kick a player when his ping is 200 or +, the script have to be like this?:
addons\script\client
[CODE]
local maxping = 200
local ply = LocalPlayer()
timer.Create("pingcheck", 10, 0, function() -- expanded the time because what if the player has a
if ply:Ping() >= maxping then -- highping when they first join
net.Start("KickThePlayer")
net.SendToServer()
end -- I removed the empty else statement here you do not need a else statement
end )
[/CODE]
addons\script\server
[CODE]
-- Removed local ply = localplayer | because localplayer is clientside only.
util.AddNetworkString("KickThePlayer") -- This registers "KickThePlayer" as a valid network string
net.Receive("KickThePlayer", function(_,ply) -- Put ply here to get it to register
ply:Kick("You got kicked!")
end)
[/CODE][/QUOTE]
[QUOTE=DiscoKnight;49151816][/QUOTE]
[CODE]
net.Receive("KickThePlayer", function(_,ply) -- Here why I have to type "_"?
ply:Kick("You got kicked!")
end)
[/CODE]
[QUOTE=Predda;49152050][CODE]
net.Receive("KickThePlayer", function(_,ply) -- Here why I have to type "_"?
ply:Kick("You got kicked!")
end)
[/CODE][/QUOTE]
It's just a way to ignore an argument, usually that argument is actually the length of the message in bytes, but since you don't really care about it, you can replace it like that.
Oh, Thank you guys.
Really this community is beautiful!
Sorry, you need to Log In to post a reply to this thread.