Author Topic: [Events] Displaying the list of currently ticked items + Code Help  (Read 875 times)

Code: [Select]
]registerOutPutEvent(player,"lolEvent", "??? \ tstring" )
What would go where ??? is now to display a list of all the currently ticked add-on items?


Also, when I type /BioScan in the chat ingame, it shows me the words "Handgun Skill:" and such, but no numbers. What is the matter? Is it just a syntax thing?

(Code for BioScan)
Code: [Select]
function serverCmdBioScan(%client)
{
messageClient(%client,'','\c6ScanningBiometrics...');

if (client.skillhandguns < 1)
{
client.skillhandguns = 1;
  messageClient(%client, '','\c6Handgun Skill: \c2 %1 ', %client.skillhandguns);
}

else
{
messageClient(%client,'','\c6Handgun Skill: \c3 %1 ',client.skillhandguns);
}

if (client.skillrifles < 1)
{
client.skillrifles = 1;
  messageClient(%client,'','\c6Rifles Skill: \c3 %1 ', client.skillrifles );
}

else
{
messageClient(%client,'','\c6Rifles Skill: \c3 %1 ', client.skillrifles);
}

if (client.skillheavy < 1)
{
client.skillheavy = 1;
  messageClient(%client,'','\c6Heavy Weapons Skill: \c3 %1 ', client.skillheavy);
}
else
{
messageClient(%client,'','\c6Heavy Weapons Skill: \c3 %1 ', client.skillheavy);
}
}

« Last Edit: August 26, 2008, 07:01:00 PM by MrBobReborn »

One thing that will through of the whole code is the "[" at the begining of the first code.

What? Please explain again, perhaps in English.

Sorry, didn't understand for a second.

What '[' do you mean?

All the variables need to have %'s behind them. Places: If statements, the part at the end of the messageClient.

All the variables need to have %'s behind them. Places: If statements, the part at the end of the messageClient.

Thanks, that works.

Does anyone know the anwser to the events question?

Code: [Select]
]registerOutPutEvent(player,"lolEvent", "??? \ tstring" )needs to be
Code: [Select]
registerOutPutEvent(player,"lolEvent" TAB "tstring")

Code: [Select]
registerOutputEvent(Player,lolEvent,"datablock ItemData",1);

function Player::lolEvent(%player,%item,%client)
{
}

This gets a list of all items with a uiName in-game. I don't think there's a way to get every enabled Add-On automatically, but you could do something with the "list" argument type to make it work.