Aller au contenu

Photo

Custom Action in radial menu?


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
Buddywarrior

Buddywarrior
  • Members
  • 256 messages
My lack of correct terminology is holding me back from explaining my question correctly so please bare with me as I 
give an example of what I'm looking to do.

 If a new player logs into a server, the F4 on the hotbar may be unassigned. If you Right Click on F4 a radial menu shows with Action options to place into F4. If I recall correctly, one of these can be assigned from the server side without a hak that could trigger a script. If this is correct, what term can I use to look up how to do this?

#2
Pattycake1

Pattycake1
  • Members
  • 49 messages
Yes you can. its called player tools. You would write something like this or add this to your onmodenter event script:

#include "x2_inc_itemprop"

void main()
{
object oPC = GetEnteringObject();
object oSkin = GetItemInSlot (INVENTORY_SLOT_CARMOUR, oPC);
itemproperty ipSkin = ItemPropertyBonusFeat (IP_CONST_FEAT_PLAYER_TOOL_01);
IPSafeAddItemProperty(oSkin, ipSkin, 0.0f, X2_IP_ADDPROP_POLICY_KEEP_EXISTING, FALSE, FALSE);
}

Then there is a script called x3_pl_tool01 that you would modify to do what ever it was you wanted the players to do. I believe there are a total of 9 or 10 of these player tools you can use.

#3
Buddywarrior

Buddywarrior
  • Members
  • 256 messages
Fantastic Pattycake! Thank you kindly.

#4
Pattycake1

Pattycake1
  • Members
  • 49 messages
I forgot to point this out..
IP_CONST_FEAT_PLAYER_TOOL_01 is tied to x3_pl_tool01
IP_CONST_FEAT_PLAYER_TOOL_02 is tied to x3_pl_tool02
IP_CONST_FEAT_PLAYER_TOOL_03 is tied to x3_pl_tool03
and so on...