
Originally Posted by
ShitFucks
Alright, I know I'm asking a lot of questions but this is my last and I've done most of it myself I just need help on these few things to perfect what I'm making. How can I go about setting a variable from ingame without reloading the file? So instead of using "local myvar = myvalue" I could set myvar from ingame.
I suppose that you could just define a global, example:
number = 100
Print that, and it's 100. Since you did not specify "local" in front of it, it is a global. You applied a number as well, which makes the var an integer.
Then later on, you could simply do:
number = 50, and print(number) again. The variable remains global to you, and call-able in all client-side files.
I guess you want to do this with the playername however?
Edit: If you want the variable to not reload to its default:
Code:
if !playername then
playername = "Name"
end
if LocalPlayer():GetEyeTrace().Entity:Nick() == playername then
print("1234")
else
print("4321")
end
Then simply call: playername = "Whatevernameyouwant" (Tested now)