LuaAPI.wiki
changeset 622 d7c2a5db19a4
parent 616 51fafc27af9c
child 623 704e373ae691
--- a/LuaAPI.wiki	Thu Sep 10 01:09:38 2015 +0000
+++ b/LuaAPI.wiki	Thu Sep 10 01:24:55 2015 +0000
@@ -267,21 +267,38 @@
 === <tt>onRightUp()</tt> ===
 This function is called when you release the right key.
 
-=== <tt>onSetWeapon()</tt> ===
+=== <tt>onSetWeapon(msgParam)</tt> ===
 It is get called when a weapon is selected or switched.
 
-=== <tt>onSlot()</tt> ===
-This function is called when a weapon slot (row in the weapon menu) is selected.
+`msgParam` tells you which ammo type was selected.
+
+=== <tt>onSlot(msgParam)</tt> ===
+This function is called when one of the weapon slot keys has been pressed.
+
+`msgParam` tells the slot number minus 1 (i.e. `0` is for slot number 1, `1` is for slot number 2, etc.).
 
 === <tt>onSwitch()</tt> ===
 This function is called when a hog is switched to another.
 
-=== <tt>onTaunt()</tt> ===
+=== <tt>onTaunt(msgParam)</tt> ===
 This function is called when the player uses an animated emote for example by using the chat commands `/wave`, `/juggle`, etc.
 
-=== <tt>onTimer()</tt> ===
+`msgParam` tells you which animation was played:
+
+|| *`msgParam`* || *Animation* || *Associated chat command*
+|| 0 || Rolling up || `/rollup`
+|| 1 || Sad face || `/sad`
+|| 2 || Waving hand || `/wave`
+|| 3 || Stupid winner's grin / “Awesome” face || `/hurrah`
+|| 4 || Peeing || `/ilovelotsoflemonade`
+|| 5 || Shrug || `/shrug`
+|| 6 || Juggling || `/juggle`
+
+=== <tt>onTimer(msgParam)</tt> ===
 This function is called when one of the timer keys is pressed.
 
+`msgParams` tells the set timer in seconds (i.e. `3` for the 3 seconds timer key).
+
 === <tt>onUpUp()</tt> ===
 This function is called when you release the up key.