Advertisement
RoksasNunes

Change_color

Apr 21st, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. function onSay(cid, words, param)
  2.  
  3. local t = string.explode(param, " ")
  4. local out = {
  5. lookType = getCreatureOutfit(cid).lookType,
  6.     lookHead = t[1],
  7.     lookLegs = t[1],
  8.     lookFeet = t[1],
  9.     lookBody = t[1],
  10. }
  11.  
  12. if not t[1] then
  13.     doPlayerSendTextMessage(cid, 20, "Insert a color in command!")
  14.         return true
  15.     end
  16.  
  17. if tonumber(t[1]) > 900 then return doPlayerSendTextMessage(cid, 20, "Colors limit is 900.") end
  18.  
  19. doSetCreatureOutfit(cid, out, -1)
  20.     doSendAnimatedText(getCreaturePosition(cid), "COLOR!", math.random(1, 255))
  21.         return true
  22.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement