local config = {
chopy_w_srodku = { red = 0, green = 0, max = 10 },
[1] = { value = 1, color = (int)czejwony, pos = { x = x, y = y, z = z },
[2] = { value = 2, color = (int)ziejony, pos = { x = x, y = y, z = z }
}
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local team = 0
if(config.chopy_w_srodku.red < config.chopy_w_srodku.max or config.chopy_w_srodku.green < config.chopy_w_srodku.max < config.chopy_w_srodku.max)then
if(config.chopy_w_srodku.red < config.chopy_w_srodku.green)then
team = 1
elseif(config.chopy_w_srodku.red > config.chopy_w_srodku.green)then
team = 2
else
team = math.random(1, 2)
end
team = config[team]
if(team)then
doPlayerSetStorageValue(cid, 50000, team.value)
--NIE PAMIETAM OD OUTFITA KUWA MA
doTeleportThing(cid, team.pos, TRUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "SORKS, BUG :(")
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "JUZ JE FULL, IDZ SOBIE!")
doTeleportThing(cid, fromPosition, TRUE)
end
end