Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ITEM = Clockwork.item:New()
- ITEM.name = "Red Line Passport"
- ITEM.model = "models/cmz/passport/redline.mdl"
- ITEM.weight = 0.1
- ITEM.category = "Identity"
- ITEM.business = false
- ITEM.description = "A slim . No information is stored in it yet."
- ITEM:AddData("description", "A slim passport. No information is stored in it yet.", true)
- ITEM:AddQueryProxy("description", "description")
- ITEM:AddData("name", "Red Line Passport", true)
- ITEM:AddQueryProxy("name", "name")
- function ITEM:OnUse(player, itemEntity)
- if (self:GetData("description") == "A slim passport. No information is stored in it yet.") and (self:GetData("name") == "Red Line Passport") then
- local CID = player:GetSharedVar("citizenID")
- if string.match(CID, "%d+") then
- self:SetData("description", "A slim Red Line passport, bearer ", player:Name()..". The issuing number is #"..CID)
- player:EmitSound("buttons/button19.wav")
- else
- player:Notify("You don't have a passport!")
- end
- else
- player:Notify("This passport already has information stored in it!")
- end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement