PtokaX forum

PtokaX => Support => Topic started by: Enuri on 07 December, 2009, 17:13:36

Title: Core.SetUserValue, is it possible?
Post by: Enuri on 07 December, 2009, 17:13:36
Hello.

Is is possible to add function for modify user data to lua api?

I tried write my own Core.SetUserValue function based on Core.GetUserValue. I changed switch(ui8DataId), for example, at case 2:
I use memcpy to copy a "test" string to u->Description.
Then i call a my function from script, and view a result using Core.GetUser(nick,true);
But only sMyInfoString and sTag have changed (sDescription haven't changed).
And i believe data changed only in lua table, because hub sends old $MyInfo string to new connecting users.

Help me write a correct function, please :)
I need only a correct code to modify data in "real" user table, not only lua table. I want to use my SetUserValue in UserConnected to add some description tags.

Regards, Denis.