Button.DoClick = function()
Player:Kill()
end
Im attempting to make something when a player dies, they have a choice to agree to NLR or not to agree with NLR. If they press I dont agree i want it to kill them. I have tried SOOO many ways..... This just seems to give an error.
[ERROR] lua/nlrgui.lua:24: attempt to call method 'Kill'
Also, how would i do it so they are unable to close it and if they click yes they respawn.
is this running server or client side?
Aw shit, didn't think about that. Its on a single player....
:thinking:
Doesnt really matter..
Player/Kill is a server side function so it wont work on your derma unless you network to the server when pressing the button.
You need to network the selection for example.
Use a netmessage like
--Clientpart for the button press function
net.Start("killthepressingperson")
net.WriteEntity(LocalPlayer())
net.SendToServer()
Now the Serverpart
util.AddNetworkString("killthepressingperson")
net.receive("killthepressingperson", function()
Presser = net.ReadEntity()
Presser:Kill()
end)
You need to secure the net messages and so on..
important running serverside functions on the client net to be networking..
sry for this bad code.. but i guess u will understand what i mean and the other
"if they dont follow a shitty rule, kill them"
sounds good to me
wouldn't you not have to send LocalPlayer() and just use the ply argument of the receive function?
Sorry, you need to Log In to post a reply to this thread.