Client Side problem

Started by Mahmut_T7, Jun 22, 2019, 07:27 PM

Previous topic - Next topic

Mahmut_T7

: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 ?

[spoiler]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;
    }
}[/spoiler]

And

[spoiler]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;
 }
}[/spoiler]
Böl ve yönet

AroliS^

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;
    }
}
Lemme love ya

Mahmut_T7

Quotefunction 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