Advertisement
Eliaseeg

Capitalizar nombres.

Feb 7th, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.39 KB | None | 0 0
  1. eventChatCommand = function(player, command)
  2.         local args = {}
  3.         for arg in command:gmatch ("[^%s]+") do
  4.                 table.insert (args, arg)
  5.         end
  6.  
  7.  if args[1] == "perfil" and tfm.get.room.playerList[capitalize(args[2])] then
  8. -- función acá
  9.     end
  10. end
  11.  
  12.  
  13.  
  14. capitalize = function(word)
  15.         return string.upper (word:sub(1,1)) .. string.lower (word:sub(2));
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement