• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

there is command /addpoints ??? to add points to players??

LUA:
function onSay(cid, words, param)
	local Data = string.explode(param, ",")
	if Data then
		local Target = db.getResult("SELECT `name` FROM `players` WHERE `name` = " .. db.escapeString(Data[1]) .. ";")
		if (Target:getID() ~= -1) then
			if Data[2] then
				if (words:sub(2, 2) == "a") then
					if isNumber(Data[2]) == TRUE then
						db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + ".. Data[2] .." WHERE `accounts`.`id` = ".. getAccountIdByName(Data[1]) .." LIMIT 1;")
						doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Was added ".. Data[2] .." points to ".. Data[1] ..".")
					else
						doPlayerSendCancel(cid, "Enter only numbers.")
					end
				else
					doPlayerSendCancel(cid, "To check the amount of points not need to enter numbers.")
				end
			else
				if (words:sub(2, 2) == "c") then
					if premiumPointsByName(Data[1]) == 0 then
						doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This player ".. Data[1] .." has no points.")
					elseif premiumPointsByName(Data[1]) == 1 then
						doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This player ".. Data[1] .." have ".. vipDaysByName(Data[1]) .." point.")
					else
						doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This player ".. Data[1] .." have ".. vipDaysByName(Data[1]) .." points.")
					end
				else
					doPlayerSendCancel(cid, "Enter the amount of points.")
				end
			end
		else
			doPlayerSendCancel(cid, "This player ".. Data[1] .." does not exist.")
		end
	else
		doPlayerSendCancel(cid, "Enter a name.")
	end
	return TRUE
end
 
Back
Top