BluetoothBoy's Scripts - isHost Bug Fix - New Script Server_VehicleFlip!

Author Topic: BluetoothBoy's Scripts - isHost Bug Fix - New Script Server_VehicleFlip!  (Read 8492 times)

Pro tip: When using a switch, you can do:
Code: [Select]
case "y" or "Y":
      //Do stuff
Instead of making a different case for both.

Also, are switches case sensitive?

Also also, does the new add-on say the UI names of the bricks used or the add-ons that the used bricks came from?
Ok, good to know.

As for the question, yes, it is the UI Name. I know this isn't quite as useful as listing the actual add-ons, but this was making my brain hurt after working on it for a while, so I'll probably just put it in an update.

Oh wow I never thought about a usedbricks add-on, nice work man.
Thanks, but the idea wasn't mine, I just made the thing. My head hurts from figuring out how to purge duplicates in an unordered list using for loops... :(

Hi, there's an issue with the UsedBricks script. When I type "/listUsed", it thinks I'm not the host and gives a message saying "You aren't host!". However, I AM the host.

Hi, there's an issue with the UsedBricks script. When I type "/listUsed", it thinks I'm not the host and gives a message saying "You aren't host!". However, I AM the host.

is the server dedicated



Hi, there's an issue with the UsedBricks script. When I type "/listUsed", it thinks I'm not the host and gives a message saying "You aren't host!". However, I AM the host.
For your problem, as a temp fix, open up the server console, if it isn't dedicated then use ~ and type in findClientByName("yourName").isHost=true;

Try changing the isHost to if(%client.bl_id==getNumKeyID()) as a fix maybe?

%client.isHost is not a default value - it's created by Slayer.

For your problem, as a temp fix, open up the server console, if it isn't dedicated then use ~ and type in findClientByName("yourName").isHost=true;
Alright, that works as a temporary fix. Thanks!

%client.isHost is not a default value - it's created by Slayer.
Wait WTH I thought was default.

What's the next best way to check for host? I have two add-ons that need fixing now...

Wait WTH I thought was default.

What's the next best way to check for host? I have two add-ons that need fixing now...
if(%client.getBLID() == getNumKeyID())
    //do stuff

if(%client.getBLID() == getNumKeyID())
    //do stuff
Oh, so it's that. Just so I know for the future, what does getNumKeyID() do? I'm assuming it's just a static value equal to the host's BL_ID, based on who started the server (I just don't want to assume incorrectly).

Oh, so it's that. Just so I know for the future, what does getNumKeyID() do? I'm assuming it's just a static value equal to the host's BL_ID, based on who started the server (I just don't want to assume incorrectly).

The ID that getNumKeyID() returns is the host's ID (based on key), so yes.

Fixed Slayer isHost bugs in Script_UsedBricks and Server_EventWhitelist. Also added a new script, Server_VehicleFlip! Useful for racing servers.