narko
vertrauenswürdig ~
I have been adapting some scripts from 0.4 to 1.0 and never have any problem but when I was trying to adapt Rush Event i've got some issues here there are:
The problem is when the event starts everybody are from the Red Team and starts at the same position
(No console bugs btw)
This setStorage function supposes to set a storage or team to the player depending on the Players Count
function:
The whole RushLib.lua:
http://pastebin.com/u22Ja0dz
The problem is when the event starts everybody are from the Red Team and starts at the same position
(No console bugs btw)
This setStorage function supposes to set a storage or team to the player depending on the Players Count
Code:
setPlayerStorageValue(cid, configRushEvent.storages.player, doCountPlayersRushEvent()[3] >= doCountPlayersRushEvent()[2] and 'blue' or 'red')
function:
Code:
function doCountPlayersRushEvent()
local x, blue, red = 0,0,0
for _, cid in ipairs(Game.getPlayers()) do
local p = tostring(getPlayerStorageValue(cid, configRushEvent.storages.player))
if p ~= '' then
if p ~= 'blue' then
red = red + 1
else
blue = blue + 1
end
x = x + 1
end
end
return {x, blue, red}
end
The whole RushLib.lua:
http://pastebin.com/u22Ja0dz