|
|
| (5 intermediate revisions by 2 users not shown) |
| Line 1: |
Line 1: |
| <table witdh="100%" height="70px">
| | Just a quick note: the cl_guid in userinfo is pretty easy to spoof. -[[User:ReyalP|ReyalP]] 15:18, 20 April 2007 (PDT) |
| <tr><td width="100px" align="center" valign="center">http://forums.acidrainclan.com/uploads/MajorZeman/2006-04-26_152247_avatar_zeman.jpg</td>
| |
| <td align="left" valign="center">Major Zeman can be currently (= for about last 3 years) found at [http://forums.acidrainclan.com forums.acidrainclan.com].</td>
| |
| </tr></table>
| |
|
| |
|
| | | :- Is that the etpro one or the pb's one? Thought it was pb's one :S (fortunately I don't use it for anything important) Any suggestions what would be better there? Anyways, thanks for the warning --[[User:Major Zeman|Major Zeman]] 15:28, 20 April 2007 (PDT) |
| ---- | | :: cl_guid is the pb GUID. If you are just using it for stats restore or something like that, it's not an issue. If you are using it for authentication, you should be aware of this. You could get it from sending PB commands (which get it internally rather than from userinfo AFAIK) to the console and reading it back from the log file, but this is a serious pain. It is also still possible to spoof, although much harder. Even if you are using it for authentication, to steal someone elses ID would require knowing their full PB GUID, which isn't normally visible to other players. Of course, server logs and PB screenshots can leak this information out. -[[User:ReyalP|ReyalP]] 18:32, 20 April 2007 (PDT) |
| | | :::- Thanks, I see where's the problem now. --[[User:Major Zeman|Major Zeman]] 23:49, 22 April 2007 (PDT) |
| | |
| __TOC__
| |
| | |
| | |
| == LUA Code fragments ==
| |
| During my first adventure into the world of LUA+ETPro, I ran into several problems. Here are a few functions/code fragments that I think are worth mentioning or could be useful to someone in future:
| |
| | |
| | |
| === get GUID ===
| |
| A simple function that gives you guid of the player in given slot. The function performs some checks and converts the guid to uppercase for exact matches.
| |
| -- gets user's guid
| |
| -- returns nil if not applicable to entity number
| |
| function getguid(targetID)
| |
| if (targetID == nil) or (targetID > tonumber(et.trap_Cvar_Get("sv_maxclients"))) or (not et.gentity_get(targetID,"inuse")) then
| |
| return nil
| |
| end
| |
|
| |
| local userinfo = et.trap_GetUserinfo( targetID )
| |
| local guid = et.Info_ValueForKey( userinfo, "cl_guid" )
| |
| -- upcase for exact matches
| |
| guid = string.upper(guid)
| |
|
| |
| return guid
| |
| end
| |
| | |
| | |
| | |
| | |
| | |
| | |
| == MZ's TJ mod ==
| |
| version: 1.5<br />
| |
| released: 25.3.2007<br />
| |
| [[http://etdl.phpnet.us/ download zip] | [http://etdl.phpnet.us/TJmod_mz.lua lua]]
| |
| | |
| | |
| === Description ===
| |
| Yet another /save /load mod - this one should be useful for learning and teaching how to trickjump, for ''pro TJ servers'' it's probably rather useless.
| |
| | |
| The mod is based on Kyoko's HSP_TJmod, with fragments of code (sometimes big fragments eh) from ==FF==im2good4u, Furion and robably also from ReyalP. Feengur's ZeN mod was a source of inspiration for me, too.
| |
| | |
| | |
| === Key features (as found in Kyoko's TJmod) ===
| |
| * '''/save''' and '''/load''' - stores your possition on map for each team separately and allows you to teleport back
| |
| * '''/gotohell''' - server console command, gibs player
| |
| * '''/goto''' and '''/iwant''' - server console commands, teleport one person to another
| |
| * '''/goback''' - if the person was teleported using /iwant, this server console command moves them back to original location
| |
| | |
| | |
| === New features (differences from original mod) ===
| |
| * some code cleanup and formating, parameter checks blah blah blah etc.
| |
| * '''/save2''' and '''/load2''' - second save slot. This one is common for both teams and you can /save2 and /load2 also as spectator
| |
| * easy jump skipping using /save2 as spectator (here you'll have to decide whether this mod is good or bad for your server)
| |
| * some more administrative commands: '''/rmsaves''', '''/sdisable''', '''/senable''' (inspired by ZeN)
| |
| * all commands allow ''partial name match'' as player identification in parameters (altered code from im2good4u)
| |
| * saves and /sdisable are persistent across player's reconnects (as long as the script is not reloaded by loading other map etc. the saves persist - ''the save slots are indexed by guid not player slot'')
| |
| * /iwant and /goback print explanatory script to target
| |
| * /gotohell (and alias '''/gib''') play a sound (again a bit of code from im2good4u) and print a message to everyone
| |
| * '''/disarm''' command strips a player off all weapons except syringes, knife, binocs and pliers (maybe some more but no shooting weapons) - either for current life or permanently (again altered im2good4u's code)
| |
| * '''/dist''' gives you distance from others - rather useless but fun command that I found has one practical use after all - you can see who specs you
| |
| * '''/realsay''' and '''/realvsay''' - sends message only to players close to you - this sounds pretty weird but it's useful if you want to explain a trickjump in one room and don't want to confuse those at other jumps
| |
| * '''/TJplayers''' server console command gives admins overview of info held about the connected players
| |
| * '''/TJhelp''' gives overview of client commands, '''/rcon TJhelp''' gives help for server console commands
| |
| * all server commands behave properly and print their output back to caller's console even if used through SemiAdmin command (found a workaround :)
| |
| | |
| | |
| === Drawbacks ===
| |
| * ''no support for etadmin'' - never worked with that and don't know how it works
| |
| * tried to make users stop on load and failed just like all before me did :D
| |
| * the workaround to print output back to semiadmin is a bit messy and uses et_Print callback (possible server performance decrease)
| |
| * ''not good for pro TJ servers and seevers without active admins'' - you can really skip jumps easily and eventually end maps in no time
| |
| | |
| | |
| === Thank you ===
| |
| Kyoko / Kotoko<br />
| |
| im2good4u<br />
| |
| Furion<br />
| |
| ReyalP<br />
| |
| Feengur<br />
| |
| All the guys who wrote LUA API description and code examples on http://wolfwiki.anime.net/
| |
Just a quick note: the cl_guid in userinfo is pretty easy to spoof. -ReyalP 15:18, 20 April 2007 (PDT)
- - Is that the etpro one or the pb's one? Thought it was pb's one :S (fortunately I don't use it for anything important) Any suggestions what would be better there? Anyways, thanks for the warning --Major Zeman 15:28, 20 April 2007 (PDT)
- cl_guid is the pb GUID. If you are just using it for stats restore or something like that, it's not an issue. If you are using it for authentication, you should be aware of this. You could get it from sending PB commands (which get it internally rather than from userinfo AFAIK) to the console and reading it back from the log file, but this is a serious pain. It is also still possible to spoof, although much harder. Even if you are using it for authentication, to steal someone elses ID would require knowing their full PB GUID, which isn't normally visible to other players. Of course, server logs and PB screenshots can leak this information out. -ReyalP 18:32, 20 April 2007 (PDT)
- - Thanks, I see where's the problem now. --Major Zeman 23:49, 22 April 2007 (PDT)