ANTICHAT

ANTICHAT (https://forum.antichat.xyz/index.php)
-   Общие вопросы программирования (https://forum.antichat.xyz/forumdisplay.php?f=206)
-   -   создание света Plugin SDK (https://forum.antichat.xyz/showthread.php?t=1422575)

Pavel_Antonov 16.02.2022 23:13

Как создать свет в радиусе? что-то похожее как в МТА.

Пример в МТА:

Lua:





Код:

local
light
=
createLight
(
0
,
2
,
3
,
4
)
addCommandHandler
(
"setradiusoflight"
,
function
(
cmd
,
radius
)
if
radius
then
if
tonumber
(
radius
)
>
0
then
setLightRadius
(
light
,
tonumber
(
radius
)
)
else
outputChatBox
(
"Radius must be greater than 0."
)
end
else
outputChatBox
(
"You must specify a radius."
)
end
end
)


Dark_Knight 17.02.2022 00:45

Цитата:

Сообщение от Pavel_Antonov

Как создать свет в радиусе? что-то похожее как в МТА.
Пример в МТА:

Lua:





Код:

local
light
=
createLight
(
0
,
2
,
3
,
4
)
addCommandHandler
(
"setradiusoflight"
,
function
(
cmd
,
radius
)
if
radius
then
if
tonumber
(
radius
)
>
0
then
setLightRadius
(
light
,
tonumber
(
radius
)
)
else
outputChatBox
(
"Radius must be greater than 0."
)
end
else
outputChatBox
(
"You must specify a radius."
)
end
end
)



Берешь МТА Blue и оттуда достаешь все виртуальные функции на плюсах.


Время: 21:55