Author Topic: Two things  (Read 1417 times)

How may I make a GUI pop up after I use a item that does this. V V V


/Command> Equips the item but checks for it in the inv
Equip> Equips it and makes it so it stays on so you cna use other guns
Once the item is taken off, the Gui goes away.

onEquip? onUnequip? onUse? onUnuse? etc. etc.

Ooh Trigun! You're such a scripting guru, just leaking knowledge all over the place... allow me to scoop some of it up so i may ingest it and become as omniscient as you!

How may I make a GUI pop up after I use a item that does this. V V V


/Command> Equips the item but checks for it in the inv
Equip> Equips it and makes it so it stays on so you cna use other guns
Once the item is taken off, the Gui goes away.

You'd need client commands. Clients can only call client commands if they have the file I think.

You'd need client commands.
Well, considering it's a GUI, I don't think that's a problem. But you probably would need a client command. Item::onUse/etc would do commandtoClient(%someclient,command) or such. I'm just summarizing here, though.

Note: Append .dump() to the end of a variable (such as %obj or %obj.tool[number] or such) and it'll give you a list of functions/onSomethings/variables that're associated with the thing. Very helpful.

And before anyone says anything, my brain is not in coding mode, so don't chew me out for not going into detail.

You'd need client commands to make the person open the GUI and servers can't make client commands IIRC.

You'd need client commands to make the person open the GUI and servers can't make client commands IIRC.
Servers can use commandtoclient(%client,command) which would point to clientcmdcommand(), which is why it would be possible. I'll try to get some example code up.

They can call them but not create them.

They can call them but not create them.
Create them? I'm not following what you're saying.

The client needs to download the mod to have the client commands instead of errors.