Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. local ITEM = Clockwork.item:New()
  2. ITEM.name = "Red Line Passport"
  3. ITEM.model = "models/cmz/passport/redline.mdl"
  4. ITEM.weight = 0.1
  5. ITEM.category = "Identity"
  6. ITEM.business = false
  7. ITEM.description = "A slim . No information is stored in it yet."
  8.  
  9. ITEM:AddData("description", "A slim passport. No information is stored in it yet.", true)
  10. ITEM:AddQueryProxy("description", "description")
  11. ITEM:AddData("name", "Red Line Passport", true)
  12. ITEM:AddQueryProxy("name", "name")
  13.  
  14. function ITEM:OnUse(player, itemEntity)
  15. if (self:GetData("description") == "A slim passport. No information is stored in it yet.") and (self:GetData("name") == "Red Line Passport") then
  16. local CID = player:GetSharedVar("citizenID")
  17.  
  18. if string.match(CID, "%d+") then
  19. self:SetData("description", "A slim Red Line passport, bearer ", player:Name()..". The issuing number is #"..CID)
  20. player:EmitSound("buttons/button19.wav")
  21. else
  22. player:Notify("You don't have a passport!")
  23. end
  24. else
  25. player:Notify("This passport already has information stored in it!")
  26. end
  27.  
  28. return false
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement