Skip to content

Commit c7fbbb8

Browse files
Add /checkskin testing client command
1 parent 103fb61 commit c7fbbb8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

newmodels/testing_client.lua

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
Commands:
77
/allocatedids
88
/selements
9+
/checkskin
910
]]
1011

1112

@@ -289,3 +290,20 @@ function table.size ( tab )
289290
end
290291
return length
291292
end
293+
294+
addCommandHandler("checkskin", function(cmd, name)
295+
if not name then
296+
return outputChatBox("SYNTAX: /"..cmd.." [partial or full player name]", 255,194,14)
297+
end
298+
local foundPlayer = nil
299+
for k, player in ipairs(getElementsByType("player")) do
300+
if string.find(string.lower(getPlayerName(player)), string.lower(name)) then
301+
foundPlayer = player
302+
break
303+
end
304+
end
305+
if not foundPlayer then
306+
return outputChatBox("No player found with that name", 255,0,0)
307+
end
308+
outputChatBox("Clientside skin model of #ffff00'"..getPlayerName(foundPlayer).."'#ffffff is#ffff00 "..getElementModel(foundPlayer), 255, 255, 255, true)
309+
end, false, false)

0 commit comments

Comments
 (0)