Advertisement
RoksasNunes

NewVersionINVASION

Apr 16th, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. function onSay(cid, words, param)
  2.  
  3. local t = string.explode(param, ",")
  4.  
  5.         if(param == '') then
  6.             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires a amount to raid.")
  7.                 return true
  8.             end
  9.        
  10.         if not tonumber(t[2]) or not tonumber(t[3]) or not tonumber(t[4]) or not tonumber(t[5]) then
  11.             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Check if placed correctly the amount and location.")
  12.                 return true
  13.             end
  14.        
  15.         if not tostring(t[1]) then
  16.             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The first parameter is the name of the monster, place it correctly.")
  17.                 return true
  18.             end
  19.        
  20.         for i = 1, t[2] do
  21.             doCreateMonster(t[1], {x = t[3], y = t[4], z = t[5]})
  22.         end
  23.  
  24.         doBroadcastMessage("A new invasion began, run to kill the "..t[2].." "..t[1].."'s!")
  25.             return true
  26.         end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement