Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Feb 9th, 2010 | Syntax: Lua | Size: 0.47 KB | Hits: 186 | Expires: Never
Copy text to clipboard
  1. function getPlayerFrags(name)
  2.                    return db.getResult("SELECT frags FROM players WHERE name="..db.escapeString(name)..""):getDataInt("frags")
  3. end
  4.  
  5. function onLook(cid, thing, position, lookDistance)
  6.         if isPlayer(thing.uid) then
  7.                 doPlayerSendTextMessage(cid, 25, (thing.uid == cid and "You have" or getPlayerSex(thing.uid) == 0 and "She has" or "He has") .. " " .. getPlayerFrags(getCreatureName(thing.uid)) .. " frags.")
  8.         end          
  9.         return true
  10. end