vlad333000,
init.sqf
if (!isDedicated) then {execVM "countms.sqf"};
if (!isDedicated) then {execVM "counting.sqf"};
//if (!isDedicated) then {execVM "scounting.sqf"};
if (!isDedicated) then {execVM "scountme.sqf"};
countms.sqf
_countm = createMarkerLocal ["countmn", getMarkerPos "countmp"];
_countm setMarkerTypeLocal "hd_dot";
_countingm = createMarkerLocal ["countingmn", getMarkerPos "countingmp"];
_countingm setMarkerTypeLocal "hd_dot";
_scountm = createMarkerLocal ["scountmn", getMarkerPos "scountmp"];
_scountm setMarkerTypeLocal "hd_dot";
_Scountingm = createMarkerLocal ["scountingmn", getMarkerPos "scountingmp"];
_Scountingm setMarkerTypeLocal "hd_dot";
countwest = 20;
counteast = 15;
countingwestv = 1;
countingeastv = 1;
scountwest = 35;
Scounteast = 20;
while {true}
do {
_countmt = switch (playerSide)
do {
case blufor: {str (countwest)};
case opfor: {str (counteast)};
default {""};
};
_countm setMarkerTextLocal _countmt;
_countingmt = switch (playerSide)
do {
case blufor: {"+" + str (countingwestv)};
case opfor: {"+" + str (countingeastv)};
default {""};
};
_countingm setMarkerTextLocal _countingmt;
scountingwestv = west countSide allUnits;
scountingeastv = east countSide allUnits;
_scountmt = switch (playerSide)
do {
case blufor: {str (scountwest)};
case opfor: {str (scounteast)};
default {""};
};
_scountm setMarkerTextLocal _scountmt;
_scountingmt = switch (playerSide)
do {
case blufor: {str (scountingwestv)};
case opfor: {str (scountingeastv)};
default {""};
};
_scountingm setMarkerTextLocal _scountingmt;
sleep 1;
};
conting.sqf
scountwestsv = 0;
scounteastsv = 0;
while {true}
do {
sleep 1200;
countwest = countwest + countingwestv;
counteast = counteast + countingeastv;
switch (playerSide)
do {
case blufor: {
if (scountwest > scountingwestv or scountwest == scountingwestv) then {
scountwest = scountwest - scountingwestv;
scountwestsv = 0;
}
else {
_hint "Need supply";
scountwestsv = scountwestsv + 1;
};
};
case opfor: {
if (scounteast > scountingeastv or scounteast == scountingeastv) then {
scounteast = scounteast - scountingeastv;
scounteastsv = 0;
}
else {
_hint "Need supply";
scounteastsv = scounteastsv + 1;
};
};
};
};
scountme.sqf
while {true}
do {
sleep 300;
switch (playerSide)
do {
case blufor:
{
if (scountwest < scountingwestv or scountwest == scountingwestv)
then {
{playerSide,"HQ"} commandChat "We out of supplyes, You have lover then 15 minutes to deliver it.";
}
else
{
if (scountwest < (2 * scountingwestv) or scountwest == (2 * scountingwestv))
then {
{playerSide,"HQ"} commandChat "Supplyes is low, You have lover then 35 minutes to deliver it.";
{
else
}
if (scountwest < (3 * scountingwestv) or scountwest == (3 * scountingwestv))
then {
{playerSide,"HQ"} commandChat "Supplyes is lover then for 55 minutes";
};
};
};
};
case opfor:
{
if (scounteast < scountingeastv or scounteast == scountingeastv)
then {
{playerSide,"HQ"} commandChat "We out of supplyes! \nYou have lover then 15 minutes to deliver it.";
}
else
{
if (scounteast < (2 * scountingeastv) or scounteast == (2 * scountingeastv))
then {
{playerSide,"HQ"} commandChat "Supplyes is low /nYou have lover then 35 minutes to deliver it.";
}
else
{
if (scounteast < (3 * scountingeastv) or scounteastt == (3 * scountingeastv))
then {
{playerSide,"HQ"} commandChat "Supplyes is lover then for 55 minutes";
};
};
};
};
};
};
Что то не так, подсчёт остановился после добавления визуализаций.
Сообщение отредактировал Ilias: 07 September 2015 - 18:28