Advertisement
Snowsz

Untitled

Jan 31st, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. local cost = 1000 -- Valor a se pagar
  2.  
  3. function creatureSayCallback(cid, type, msg)
  4. if not npcHandler:isFocused(cid) then
  5. return false
  6. end
  7.  
  8. if msgcontains(msg, 'male') then
  9. npcHandler:say('are you sure you want to give your sex ?' ,cid)
  10. npcHandler.topic[cid] = 1
  11. if msgcontains(msg, 'yes') --[[and npcHandler.topic[cid] == 1 ]]then
  12. if doPlayerRemoveMoney(cid, cost) then
  13. doPlayerSetSex(cid, 1)
  14. npcHandler:say('You successfully changed sex.', cid)
  15. doRemoveCreature(cid)
  16. else
  17. npcHandler:say('You no have money.', cid)
  18. npcHandler.topic[cid] = 0
  19. end
  20. end
  21. else
  22. npcHandler:say('Sorry is not possible.', cid)
  23. end
  24.  
  25. return true
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement