i have a question guys.
i tried adding new object in CPlayer class by using new slot operator before instance is created(before onPlayerJoin function is called) but i can't change its value other then the value i used while creating it. so this is what i did
i tried adding new object in CPlayer class by using new slot operator before instance is created(before onPlayerJoin function is called) but i can't change its value other then the value i used while creating it. so this is what i did
Code Select
function ScriptLoad()
{
CPlayer.Kills<-0;
// same result with rawset
}
#now when the player joins the instance is created this object is auto added to the player instance but i can't change it ( some how its read-only):(.
function onPlayerJoin(player)
{
player.Kills = 10;
}
but if i use my command "kills" it still shows 0 kills
function onPlayerCommand(player,CMD,text)
{
local cmd = CMD.tolower();
if (cmd == "kills") PrivMessage(player,"Your Kills are "+player.Kills);
}
just wondering if there was any way to change their values.