Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.09 KB | None | 0 0
  1. function onSay(cid, words, param)
  2. local config = {
  3. Saffari_Pos = {Exit = {x=1339,y=1471,z=7}},
  4. Storages = {874547,874548},
  5. Level = 50,
  6. Price = 2000,
  7. Time = 30,
  8. }
  9. if (words == "") then
  10. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"invalid command, for more information enter !saffari info")
  11. elseif(param == "!saffari info") then
  12. doShowTextDialog(cid,2160,"Saffari Info:\n\nLevel Minimum: "..config.Level.."\nSaffari Cost: "..config.Price.."\nTime Limit: "..config.Time.." minutes\n\nThe safari is home to rare creatures, some are dangerous and others not\n[*Warning*]\nis only allowed to enter with saffari balls.\n\nTo leave enter command:\n!saffari leave")
  13. elseif(param == "!saffari leave") then
  14. if getPlayerStorageValue(cid, config.Storages[1]) >= 1 then
  15. doTeleportThing(cid, config.Saffari_Pos.Exit)
  16. setPlayerStorageValue(cid, config.Storages[1], -1)
  17. setPlayerStorageValue(cid, config.Storages[2], -1)
  18. doPlayerSendTextMessage(cid,22,'you left the saffari zone.')
  19. else
  20. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not in Saffari")
  21. end
  22. end
  23. return true
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement