function onSay(cid,words,param)
local requiredGroup = 1
local promotionStorageValue = (Put here storge of the Promotion)
local target = getPlayerByNameWildcard(param)
if words == '/addpromotion' then
if target > 0 then
if getPlayerGroupId(cid) >= requiredGroup and param ~= "" and getPlayerStorageValue(target, promotionStorageValue) == -1 then
adminName = getPlayerName(cid)
setPlayerStorageValue(target, PromotionStorageValue, 1)
doPlayerSendTextMessage(target, MESSAGE_STATUS_CONSOLE_BLUE, 'You are now Promoted')
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You made a Promoted to "..param..".")
elseif getPlayerGroupId(cid) < requiredGroup then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't make Promotion to anyone.")
elseif getPlayerStorageValue(target, PromotionStorageValue) ~= -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This player is already promoted")
end
else
doPlayerSendTextMessage(cid, 21, "This player doesn't exists or is not online.")
end
elseif words == '/removepromotion' then
if target > 0 then
if getPlayerGroupId(cid) >= requiredGroup and param ~= "" and getPlayerStorageValue(target, promotionStorageValue) == 1 then
adminName = getPlayerName(cid)
setPlayerStorageValue(target, promotionStorageValue, -1)
doPlayerSendTextMessage(target, MESSAGE_STATUS_CONSOLE_BLUE, 'You are now Not Promoted player.')
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You took the Promotion of "..param..".")
elseif getPlayerGroupId(cid) < requiredGroup then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't take the Promotion of anyone.")
elseif getPlayerStorageValue(target, promotionStorageValue) ~= 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This player is not a Promoted member.")
end
else
doPlayerSendTextMessage(cid, 21, "This player doesn't exists or is not online.")
end
end
return TRUE
end