Author Topic: GameConnection::onDeath(read last post, variable issue)  (Read 1763 times)

Edited, nevermind, I just said what was already answered.
« Last Edit: January 12, 2009, 04:59:39 PM by Truce »

$Variables are global scope. %variables are local.

Ok, ::onDeath is requesting %client.something, when serverCmdWhatever creates, and makes the variable %client.something. Doesn't seem to carry from fuction to function...

There may be some factor if I spelled god "gode", as in I just found. If there's an answer still post it.
« Last Edit: January 12, 2009, 05:05:29 PM by Kalphiter »

Unfortunately torque doesn't have that cool new psychic variable matching technology yet, so any variable assignments will have to be referred to using the same name...

For example you cant do

%crap.stuff = "crud";

And expect %crap.monday to be crud just because you want it to.

What is the extent of the isHost()?

Does it work on Dedicated servers?



How can I retrieve a person's official name(Kalphiter for me) using a parameter in a serverCmd?

In a client message?
" @ findClientByName(%client) @"
« Last Edit: January 12, 2009, 05:41:34 PM by Kalphiter »

Now you're just abusing the generosity of the kind people in the Coding Help forum. This is undoubtedly something you can figure out for yourself.

I think GameConnection::isHost() was only added by IGSO, it isn't in the game by default.

I think GameConnection::isHost() was only added by IGSO, it isn't in the game by default.

Correct. Even so, it only used getNumKeyID, which isn't totally accurate.
The best alternative would probably be to use this simple support script:

Code: [Select]
package isHost {
function GameConnection::autoAdminCheck(%cl) {
if(($Server::LAN&&!$Server::Dedicated&&%cl.getID()==localClientConnection.getID())||%cl.bl_id==getNumKeyID())
%cl.isHost=1;
return Parent::autoAdminCheck(%cl);
}
};
activatePackage(isHost);

Sets %client.isHost field to 1 in the same manner it does .isAdmin and .isSuperAdmin.

The second thing you need help with is pathetic of you to ask for. Its obvious what you need to do.

Thank-you, no more help needed.