Talk:Lua Mod API

From WolfWiki
Revision as of 04:20, 6 December 2006 by FARMICEUDICAL (Talk | contribs) (Fields for the next release)

Jump to: navigation, search

- et.G_SlotSound( slotnum, soundindex ) -> Plays the sound soundindex at for the player @ slotnum only. --RoadKillPuppy 14:17, 16 December 2005 (PST)

you can do this with tempentities and SVF_SINGLECLIENT ...
--Bani 17:32, 16 December 2005 (PST)

some of this can be done via function et_Print(text).. but this would greatly simplify life,
my wish list for christmas:
- getUserEguid(cno) - get a client's etpro guid?
- repair gentity_set for vec3 - scotty fix the transporter please

fixed.--Bani 17:56, 22 December 2005 (PST)

trap sen server cmd is a ET engine trap the comand u send it send to the client and recived as a server command no a client command

to add ill well that would be al ot of coding for not much =FF=Im2good4u 12:12, 20 December 2005 (PST)

aight thnx.
heres another api request, i'd like to be able to get a clients xp directly. et.gentity_get(cno, "sess.game_points") seems to return 0 always (?)
--Hadr0 15:38, 21 December 2005 (PST)

oh nevermind, i see this can be done now with xp = et.gentity_get(cno, "ps.stats", 8)
nice... --Hadr0 16:58, 23 December 2005 (PST)

add a way to determine if a client is 999, and if possible why he's 999 (loading, connecting, loosing packets, etc)
--Gotenks

999 means: server has not been sent data from client for > 1000 ms. So there is no way to certainly tell why. The timeoutflag is stored in the pmflags IIRC. Don't know if lua can read them right now. --Deus 23:12, 22 December 2005 (PST)
Still would like access to the ping, or a dummy variable if they are 999, but also the ammount of time they are inactive.
--Gotenks (Sorry for double post) 1:53, 31 December 2005 (CST)

fixed.--Bani 02:40, 7 February 2006 (PST)

Access to weapon stats during game similar to end of round stats that are displayed.
--LethalInjection 23:52, 22 December 2005 (PST)

fixed.--Bani 02:40, 7 February 2006 (PST)

IPC stuff


i would like a et_IPCReceive whit an return value so u can send info back on a request

i would like a et_IPCSend that can send to all lua mods then them mods can decide if the wana use that message or not =FF=Im2good4u 12:35, 8 January 2006 (PST)


 et_IPCReceive wouldn't send it to the other mod... afaik... so just use another send
 just et_IPCSend to all modules (afaik, you can even send to ones not there), simple loop function

gotenks 20:04, 8 January 2006 (CST)

yeh probely but its not verry handy its better to get the good vmnumber or to e able to send on mod filenames

apart from that returning a value will be more handy since tnhe u cna contine in 1 funtion else u got to reacise it in the recieve funtion =FF=Im2good4u 10:45, 9 January 2006 (PST)


bani i need a console print function on the client that does sepport ascii plz =FF=Im2good4u 12:49, 12 January 2006 (PST)

et.trap_SendServerCommand( clientnum, "print \"hello ascii console on the client\n\" ) ) --Bani 22:33, 15 January 2006 (PST)

bani: how about a et_sound(id, sound) event? gotenks 20:45, 17 January 2006 (CST)

et.G_Sound( entnum, soundindex ) --Bani 22:07, 18 January 2006 (PST)
bani, i was referring to an on event call, so when a sound is played et_sound(id,sound) would be called.gotenks 21:45, 20 January 2006 (CST)
most sounds are clientside... this would not be of much use. --Bani 04:42, 22 January 2006 (PST)
except for checking when something like a killing spree sound is activated--gotenks 07:54, 23 January 2006 (CST)
There would be no way for you to know what sound was activated. You can't get a filename from the soundindex.--Bani 10:19, 24 January 2006 (PST)
This is a case where IPCSend/IPCReceive would be useful, so mods can notify each other of specific events.--Bani 02:40, 7 February 2006 (PST)

Fields for the next release

Is it possible to get a player's live angles? Fieldname "s.angles" only gives the spawn angles. Tried "rotate", "s.angles2", "TargetAngles", "r.currentAngles" as well but they just give 0.000000 for each element. thanks for any help --Hadr0 01:35, 25 January 2006 (PST)

This will be fixed in the next release, where you will get access to ps.viewangles--Bani 02:33, 7 February 2006 (PST)

Would it be possible to set the player's liveangle?Just like setting one's position(origin).I would also like to set player's velocities(maybe a vec3 field), 'speed' is not working. --Kotoko 06:06, 26 May 2006 (PDT)

viewangles is what you want --ReyalP 14:00, 26 May 2006 (PDT)

Seems i get it ..It WILL BE AVAILABLE at NEXT release ..not now .. right?-_- Kotoko 22:49, 26 May 2006 (PDT) I think he wants the ps.velocities field here. It would be a good idea, I think.

bani: please give access to fieldname 's.eventParm'. --pdi 01:52, 6 July 2006 (PDT)

bani: RW access to all "sess.*" fields (sess.skillpoints, sess.startskillpoints, sess.startxptotal, ...) would be great. thanx! --pdi 05:55, 2 August 2006 (PDT)

bani: please make all "pers.*" fields (pers.clientTimeNudge, pers.clientMaxPackets, ...) available. thanx! --pdi 01:04, 17 August 2006 (PDT)

you can get timenudge and maxpackets from the userinfo --ReyalP 20:19, 18 August 2006 (PDT)
i know, but i ask for all pers.* fields. pers.clientTimeNudge and pers.clientMaxPackets are only examples. :) --pdi 01:56, 21 August 2006 (PDT)

bani: will we have rw access to those fields (all sess.* and all pers.*) with next update? please!! --pdi 07:02, 19 October 2006 (PDT)

LoadLib

Add loadlib ppl it says u have lua basic included but not loadlib !!

(on windows it gives an error attept to call global load lin a nil valua)=FF=Im2good4u 05:16, 15 February 2006 (PST)


XP control not just skill

I would like to request RW access to the "sess.skillpoints" array

At least a callback on et.G_AddSkillPoints ( cno, skill, points ) =FF=Im2good4u 07:45, 8 March 2006 (PST)