Cmd Didn't Attach To Client-Side

Started by Saiyan Attack, Jul 20, 2016, 01:42 PM

Previous topic - Next topic

Saiyan Attack

Hello Everyone !!

I want to attach my server-side command to client-side script and it's attach well no error appear but it doesn't work !!  ...

Server-side cmd :
if (cmd == "cmds")
{
local str = Stream();
str.WriteInt(12);
str.WriteString("Command");
}

Client-side function :
function Server::ServerData(stream)
{
local stint = stream.ReadInt();
local stread = stream.ReadString();
if (stint==12) {
if (stread == "Command") {
Console.print("Working");
}
}
}

DizzasTeR

You need to send the stream, Stream.SendStream( Player Instance [ null = everyone ] );

if (cmd == "cmds")
{
    local str = Stream();
    str.WriteInt(12);
    str.WriteString("Command");
    str.SendStream( player );
}

Saiyan Attack

Thanks @Doom_Kill3R It's Working Fine Now !! :)

Topic Locked !!

MEGAMIND


Thijn