Author Topic: Find BL ID  (Read 1916 times)

I just need it to find the BL ID

Code: [Select]
package Script_BLOCKED
{
function serverCmdMessageSent(%client,%msg)
{
%oldSufix = %client.clanSufix;
if(%client.THE THING I NEED)
{

%client.bl_id

also %client.clanSuffix

%client.bl_id

also %client.clanSuffix

Wait, so if(%client.bl_id33750)? or if(%client.bl_id("33750")) or if(%client.33750)
« Last Edit: April 28, 2014, 05:43:16 PM by Ducky duck »

You shouldn't need to make all these help topics. If you want to find something out, look for it yourself first. Trust me, it will be a lot quicker, and easier. Here's some advice:

If its a property (variable on an object) or method (function on a object), use dump() on an object, and it will list it all in the console.

If you are looking for info about a function that already exists, use trace.

If you are trying to create a function to do something, take a look through here. There are plenty of great resources there that can help you a lot.

Use search, and use it properly (I also like to check "Search in topic subjects only" to filter out most of the unuseful stuff, but be sure to uncheck it if you couldn't find anything). 90% of the time, somebody else has asked what you want to know. If your question is partially answered, but not enough, just post on that topic. If its too old, then you can make a new topic, but put a link to the previous topic and explain that you've read through it but your question isn't answered. That way people wont reply with stuff you already know.

If your looking for some torque engine functions, take a look in here. Just wait for it to load, then ctrl+f. Note that some functions have been renamed from there, but for the most part your fine. I recommend you bookmark that too.



Wait, so if(%client.bl_id33750)? or if(%client.bl_id("33750")) or if(%client.33750)

bl_id is a property (variable). Doing %client.bl_id will give you your ID. You then want to check if that number is the same as another number, so you must use == .

Wait, so if(%client.bl_id33750)? or if(%client.bl_id("33750")) or if(%client.33750)
if(%client.bl_id == 33750)

%client.getBLID() also works, I don't understand why it is getBLID() and not getBL_ID()..

Checking if the person is the host:
Don't use if(%client.isHost)
Use if(%client.getBLID() == getNumKeyID())

Don't use if(%client.isHost)
Use if(%client.getBLID() == getNumKeyID())
Don't forget single player
Code: [Select]
function GameConnection::isHost(%this)
{
    if(%this.bl_id == getNumKeyID() || %this.bl_id == 999999)
        return 1;
    return 0;
}

Code: [Select]
function GameConnection::isHost(%this)
{
    if(%this.bl_id == getNumKeyID() || %this.bl_id == 999999)
        return 1;
    return 0;
}

Don't forget code that makes sense

function GameConnection:isHost(%this)
{
  return %this.getBLID() == getNumKeyID() || %this.isLocal();
}

Don't forget code that makes sense

function GameConnection:isHost(%this)
{
  return %this.getBLID() == getNumKeyID() || %this.isLocal();
}

:V excuse my ignorance

Don't forget code that makes sense

function GameConnection:isHost(%this)
{
  return %this.getBLID() == getNumKeyID() || %this.isLocal();
}

Don't forget people who are beginning coding

%client.bl_id will return a numerical value that is the bl_id for the clientobject %client represents.

%client.bl_id will return a numerical value that is the bl_id for the clientobject %client represents.
Actually it returns a string, all variables stored in objects are strings.

Why are you all acting so pretentious, jesus.

Why are you all acting so pretentious, jesus.
By calling other people pretentious doesn't that make you infact pretentious?

%client.getBLID() also works, I don't understand why it is getBLID() and not getBL_ID()..

Badspot is really, really inconsistent with the shorthand for blockland IDs.

GameConnection::getBLID()
GameConnection.BL_ID
banBLID()
findClientByBL_ID()
GameConnection::setBLID() [Protected]
GameConnection::getBL_IDTrustLevel()
etc..