Send data from server to client

Hello poeple!

I am just busy with a simple admin script. But have some little questions, i’ve always make clientside script, no serverside. Untill now! I’ve have an problem, i want that the server van send a string to the client. In this case the player rank. And that string (playerrank) that has send from the server to the client i want to set it in the variable KEV_STR_RANK. Is there any tutorials about this? Or someone who can show me an example about it :)?

[SERVER] (Lol empty :P)

Regards, Kevin vd Burgt.

(PS: Sorry about my broken English, i am a dutch guy. And need to learn more English at school )

usermessages, or SetNWString I believe.

[editline]28th December 2010[/editline]

[lua]Msg("= * BlackHawk23, Learning me LUA =")[/lua]

You might want to change that to “Teaching me LUA”

Sorry, your right. My English isn’t that good haha :frowning:

Editing now, thanks!

lol, anyways I think that’s how most admin systems work, I have never looked into them. Just set the NWString or Int to Admin or Super admin or w/e.

aha, right. I an try now to use datastream :slight_smile: hopes that will work!

To send a short? Bad idea.

Oh, ok. it is just better to use NWstring?


Yeah, usmg works fine! Thank you all. umsg supports max 255 chars, right? and if it is larger than 255 chars using datastream?

Or two usermessages

There is no good reason to use datastream. If the stuff you need to send doesn’t fit in a single user message, send more.

En hoe oud ben jij, Kevin?

Yeah. One umsg. Or TWO Umsgs. Easy as that.

Yeah, i understand. thx :slight_smile:

Ik ben momenteel 17 jaar, 2 jan. word ik eindelijk 18