royalrocks

Cadastramento (Action)

Jul 21st, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.97 KB | None | 0 0
  1. function onUse(cid, item, fromPosition, itemEx, toPosition)
  2.    
  3.     local name = getPlayerName(cid)
  4.     local skey = getPlayerStorageValue(cid)
  5.        
  6.     if skey ~= 2107201401 then
  7.         setPlayerStorageValue(cid, 2107201401, 1)
  8.         if(not isPlayerGhost(cid)) then
  9.             local tname = getTownName(townId)
  10.             doPlayerSendTextMessage(cid, 22, "Voce foi registrado como morador oficial de " .. tname .. ", agora pode viajar para outras cidades sem pagar. Obrigado e boa sote " .. name .. "!")  
  11.             if (getPlayerGroupId(cid) <= 3) and isPlayer(cid) then 
  12.                 sexstatus = getPlayerSex(cid)
  13.                 if sexstatus == 0 then
  14.                     doPlayerAddOutfit(cid, 136, 1)
  15.                 else
  16.                     doPlayerAddOutfit(cid, 128, 1)
  17.                 end
  18.             else
  19.                 doPlayerSendTextMessage(cid, 22, "GMs e GODs nao podem ser cadastrados.")
  20.             end
  21.         else
  22.             doPlayerSendTextMessage(cid, 22, "Como posso saber onde um player invisivel mora?")
  23.         end
  24.     else
  25.         doPlayerSendTextMessage(cid, 22, "Voce ja esta cadastrado!")
  26.     end
  27.    
  28.     return true
  29. end
Advertisement
Add Comment
Please, Sign In to add comment