Ok so im making a gambling entity and i have it working the only thing is i dont know how i would let the server know if they won or not without the client being able to cheat. Here lies my predicament.
Edit: Thought i should clarify that it uses derma for the actual gambling.
Ill try that. Thanks.
One more question, how do i find out who sent the command?
The first parameter is the player.
[editline]20th November 2010[/editline]
[lua]
concommand.Add("teststuff",function(ply)
print(ply:Nick().." ran 'teststuff'")
end)
[/lua]
Didnt know that thanks :D
It might interest you that the second parameter is the name of the concommand and the third is a table of the values passed to it.
[lua]
function command(ply,cmd,args)
print(ply:Nick().." ran '"..cmd.."' with the arguments: "..table.concat(args,", "))
end
concommand.Add("testone",command)
concommand.Add("testtwo",command)
[/lua]
[code]
] testone herp derp slurp
> Ram ran 'testone' with the arguments: herp, derp, slurp
] testtwo banana monkey
> Ram ran 'testtwo' with the arguments: banana, monkey
[/code]
Thanks. Also may i ask how you use the lua instead of the normal "[code]"
[noparse][lua][/lua][/noparse]
And if you wonder how I can type out the tags without them becoming a text box [noparse][noparse][/noparse][/noparse]
[editline]20th November 2010[/editline]
You can also click "Reply" to see the post in plain text.
Sorry, you need to Log In to post a reply to this thread.