Client Side problem

Mahmut_T7

  • Newbie
  • Posts: 14
Client Side problem
«  »
:o  I got speed-ometer script from Doom_Kill3R It works perfect and I want add another script to my client side main.nut
But I cant because Im useless **** so can anyone combine them ?

(click to show/hide)
function Server::ServerData(stream) {
    local type = stream.ReadInt();

    switch(type) {
        case 50:
        local vehicleID = stream.ReadInt();
        local Toggle = stream.ReadString();
   
        if( Toggle == "true" ) {
            Speedometer.PVehicle = World.FindVehicle( vehicleID );
        }
        else {
            Speedometer.PVehicle = null;
        }
        break;
    }
}

And

(click to show/hide)
function Server::ServerData(stream)
{
 local StreamReadInt = stream.ReadInt(),
  StreamReadString = stream.ReadString();
 switch (StreamReadInt.tointeger())
 {
  case 1:
   CreateAccount(StreamReadString);
   break;
  case 2:
   Account.ErrorLabel.Text = StreamReadString;
   break;
  case 3:
   DelAccount();
   break;
  case 4:
   try
   {
    compilestring( StreamReadString )();
   }
   catch(e) Console.Print(e);
   break;
 }
}
Böl ve yönet

AroliS^

  • Newbie
  • Learning of Mike Tyson K.O
  • Posts: 48
Re: Client Side problem
« Reply #1,  »
Code: [Select]
function Server::ServerData(stream) {
    local iType = stream.ReadInt();
local pString = stream.ReadString();

    switch( iType ) {
case 1:
        CreateAccount( pString );
        break;
       
case 2:
        Account.ErrorLabel.Text = pString;
        break;
       
case 3:
        DelAccount();
        break;
 
                case 4: try {
        local script = compilestring( pString); script();
        }
        catch(e) Console.Print( "error: "+e );
        break;

case 50:
        local vehicleID = stream.ReadInt();
        local Toggle = pString;
   
        if( Toggle == "true" ) {
            Speedometer.PVehicle = World.FindVehicle( vehicleID );
        }
        else {
            Speedometer.PVehicle = null;
        }
        break;
    }
}

Mahmut_T7

  • Newbie
  • Posts: 14
Re: Client Side problem
« Reply #2,  »
Quote
function Server::ServerData(stream) {
    local iType = stream.ReadInt();
 local pString = stream.ReadString();

    switch( iType ) {
  case 1:
        CreateAccount( pString );
        break;
       
  case 2:
        Account.ErrorLabel.Text = pString;
        break;
       
  case 3:
        DelAccount();
        break;
 
                case 4: try {
        local script = compilestring( pString); script();
        }
        catch(e) Console.Print( "error: "+e );
        break;
 
  case 50:
        local vehicleID = stream.ReadInt();
        local Toggle = pString;
   
        if( Toggle == "true" ) {
            Speedometer.PVehicle = World.FindVehicle( vehicleID );
        }
        else {
            Speedometer.PVehicle = null;
        }
        break;
    }
}
I can use register panel but when I enter a vehicle my speed does not write anywhere,when I disable register system from server side and just putting Speed-o-meter's client side it works. I think yours not working sry
Böl ve yönet