function isDonator(cid)
local storage = x -- StorageValue which just a Donator will have
local text = "You have to be a Donator." -- Error text if the player isn't a Donator
if getPlayerStorageValue(cid,storage) == 1 then
return TRUE
else
doPlayerSendCancel(cid, text)
end
end
function setPlayerDonator(cid)
local storage = x -- Use the same storage, like you used at the isDonator function
if getPlayerStorageValue(cid,storage) == 1 then
doPlayerSendCancel(cid,"You're already a Donator.")
elseif getPlayerStorageValue(cid,storage) == -1 then
doPlayerSendTextMessage(cid,24,"Congratulations! You are a Donator now.")
setPlayerStorageValue(cid,storage,1)
end
return TRUE
end