- Версия SA-MP
-
- Любая
Нужно чтобы скрипт нажимал клавишу при открытии телефона (CEF) Arizona RP, к примеру кнопку меню.
Сделал так, но не работает.
Сделал так, но не работает.
Lua:
function onReceivePacket(id, bitStream)
if id == 220 then
raknetBitStreamIgnoreBits(bitStream, 8)
if(raknetBitStreamReadInt8(bitStream) == 17) then
raknetBitStreamIgnoreBits(bitStream, 32)
if(raknetBitStreamReadString(bitStream, raknetBitStreamReadInt32(bitStream)):match("window%.executeEvent%('event%.setActiveView', '%[\"Phone\"%]'%);")) then
local bs = raknetNewBitStream()
raknetBitStreamWriteInt8(bs, 220)
raknetBitStreamWriteInt8(bs, 18)
raknetBitStreamWriteInt8(bs, string.len("menu"))
raknetBitStreamWriteInt8(bs, 0)
raknetBitStreamWriteInt8(bs, 0)
raknetBitStreamWriteInt8(bs, 0)
raknetBitStreamWriteString(bs, "menu")
raknetBitStreamWriteInt32(bs, 1)
raknetBitStreamWriteInt8(bs, 0)
raknetBitStreamWriteInt8(bs, 0)
raknetSendBitStreamEx(bs, 1, 7, 1)
raknetDeleteBitStream(bs)
end
end
end
end