Admin only characters?

KevTSP

Member
I want to know how to make a character exclusive to an admin in a server like the mod skin from the admin tools addon, but I don't know how to make script determine and prevent non admins from choosing the character, so does anybody know how to do this?
Post automatically merged:

Never mind I was able to find out how to do it
 
Last edited:
how did you do it?
i simply used a part of lua from the broken modskin and put it in other characters via a lua script to make it so that anybody who uses a character that only the admin can use, they instantly die

addHook("MobjThinker", function(mo) local player = mo.player if player.mo.skin == "ExanpleCharacter" and not (player == server or player == admin) then COM_BufInsertText(player, "cecho \"This skin is reserved for admins.\\Switch to someone else!\"") P_DamageMobj(player.mo, nil, nil, 0, DMG_INSTAKILL) end end
 
thanks, didnt think you would reply that quick
Post automatically merged:

small problem, where do i put it?
 
Last edited:
I'm trying to do this too I want characters only admin can use but don't know where to put the lua script
you just simply need to put it in an empty lua script
then name ExampleCharacter in player.mo.skin == "ExanpleCharacter" to the character you want only admins to use
 
Then do I put the lua script into the lua file?
Post automatically merged:

I keep getting this error expected (to close '(' at line 2) near '<eof>'
Post automatically merged:

Ok I fixed the first error by putting a ) at the right of the last end but now I'm getting another error
Post automatically merged:

error is attempt to index local 'player' (a nil value)
 
Last edited:

Who is viewing this thread (Total: 0, Members: 0, Guests: 0)

Back
Top