Зарегистрировавшись у нас, вы сможете обсуждать, делиться и отправлять личные сообщения другим участникам нашего сообщества.
Зарегистрироваться!new format_string[128];
#define SCMF(%1,%2,%3) format(format_string,188,%3), SendClientMessage(%1,%2,format_string)
public OnIncomingPacket(playerid, packetid, BitStream:bs)
{
if(packetid == 220)
{
new custom;
BS_IgnoreBits(bs, 8);
BS_ReadUint8(bs, custom);
new query[128];
BS_ReadString32(bs, query);
if(custom == 18)
{
new action_id;
new data[100];
sscanf(query, "P<|>s[50]i", data, action_id);
SCMF(playerid, -1, "%s - %d", data, action_id);
}
}
}
stock ExecuteEvent(playerid, browserid, const event[]) //вывод
{
new BitStream:bs = BS_New();
new eventStrLen = strlen(event);
BS_WriteValue(bs, PR_UINT8, 220);
BS_WriteValue(bs, PR_UINT8, 17);
BS_WriteValue(bs, PR_UINT32, browserid);
BS_WriteValue(bs, PR_UINT32, eventStrLen);
BS_WriteValue(bs, PR_STRING, event, eventStrLen);
BS_WriteValue(bs, PR_UINT8, 255);
BS_WriteValue(bs, PR_UINT8, 255);
BS_WriteValue(bs, PR_UINT8, 255);
BS_WriteValue(bs, PR_UINT8, 255);
PR_SendPacket(bs, playerid);
}
stock UpdateTest(playerid, index, status) //обновление
{
new BitStream:bs = BS_New();
BS_WriteValue(bs, PR_UINT8, 220);
// 8 hud
BS_WriteValue(bs, PR_UINT8, index);
BS_WriteValue(bs, PR_UINT8, status);
PR_SendPacket(bs, playerid);
ExecuteEvent(playerid, 1, "сюда пакет");
cmd:arizona(playerid)
{
UpdateTest(playerid, 8, 2);
UpdateTest(playerid, 9, 2);
ExecuteEvent(playerid, 1, "window.executeEvent('event.hud.updateHudVisible', '[true]');");
ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.speedometerType', '[\"advanced\"]')");
ExecuteEvent(playerid, 1, "window.executeEvent('event.hudSA.updateSanAndreasHudVisible', '[true]')");
ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.hotkeysVisible', '[true]')");
ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.setFractionRadioKey', '[\"R\"]')");
ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.setPhoneKey', '[\"P\"]')");
ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.setAnimationKey', '[\"U\"]')");
ExecuteEvent(playerid, 1, "window.executeEvent('event.hudSA.updateSanAndreasHudVisible', '[true]')");
ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.serverInfo', '[{\"id\":0,\"title\":\"Test\",\"project\":\"Arizona\",\"type\":\"Role play\",\"onLine\":771,\"flag\":0,\"logo\":1,\"multiplier\":0}]')");
}
Увы, не для аризоны нужно.Вставляем это в мод:
Pawn:new format_string[128]; #define SCMF(%1,%2,%3) format(format_string,188,%3), SendClientMessage(%1,%2,format_string) public OnIncomingPacket(playerid, packetid, BitStream:bs) { if(packetid == 220) { new custom; BS_IgnoreBits(bs, 8); BS_ReadUint8(bs, custom); new query[128]; BS_ReadString32(bs, query); if(custom == 18) { new action_id; new data[100]; sscanf(query, "P<|>s[50]i", data, action_id); SCMF(playerid, -1, "%s - %d", data, action_id); } } } stock ExecuteEvent(playerid, browserid, const event[]) //вывод { new BitStream:bs = BS_New(); new eventStrLen = strlen(event); BS_WriteValue(bs, PR_UINT8, 220); BS_WriteValue(bs, PR_UINT8, 17); BS_WriteValue(bs, PR_UINT32, browserid); BS_WriteValue(bs, PR_UINT32, eventStrLen); BS_WriteValue(bs, PR_STRING, event, eventStrLen); BS_WriteValue(bs, PR_UINT8, 255); BS_WriteValue(bs, PR_UINT8, 255); BS_WriteValue(bs, PR_UINT8, 255); BS_WriteValue(bs, PR_UINT8, 255); PR_SendPacket(bs, playerid); } stock UpdateTest(playerid, index, status) //обновление { new BitStream:bs = BS_New(); BS_WriteValue(bs, PR_UINT8, 220); // 8 hud BS_WriteValue(bs, PR_UINT8, index); BS_WriteValue(bs, PR_UINT8, status); PR_SendPacket(bs, playerid);
После вставляем наш пакет:
Pawn:ExecuteEvent(playerid, 1, "сюда пакет");
Если желаете, можете добавить тест команду для вывода худа, радара и т.д.:
Pawn:cmd:arizona(playerid) { UpdateTest(playerid, 8, 2); UpdateTest(playerid, 9, 2); ExecuteEvent(playerid, 1, "window.executeEvent('event.hud.updateHudVisible', '[true]');"); ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.speedometerType', '[\"advanced\"]')"); ExecuteEvent(playerid, 1, "window.executeEvent('event.hudSA.updateSanAndreasHudVisible', '[true]')"); ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.hotkeysVisible', '[true]')"); ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.setFractionRadioKey', '[\"R\"]')"); ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.setPhoneKey', '[\"P\"]')"); ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.setAnimationKey', '[\"U\"]')"); ExecuteEvent(playerid, 1, "window.executeEvent('event.hudSA.updateSanAndreasHudVisible', '[true]')"); ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.serverInfo', '[{\"id\":0,\"title\":\"Test\",\"project\":\"Arizona\",\"type\":\"Role play\",\"onLine\":771,\"flag\":0,\"logo\":1,\"multiplier\":0}]')"); }
Автор: cute_filatov
Нужно не для мода аризоны.ну или не слит, если что на ссылку не реклама
способ не рабочий уже как год.. ну ладно саня мари принс про тебя речи нет.. xDВставляем это в мод:
Pawn:new format_string[128]; #define SCMF(%1,%2,%3) format(format_string,188,%3), SendClientMessage(%1,%2,format_string) public OnIncomingPacket(playerid, packetid, BitStream:bs) { if(packetid == 220) { new custom; BS_IgnoreBits(bs, 8); BS_ReadUint8(bs, custom); new query[128]; BS_ReadString32(bs, query); if(custom == 18) { new action_id; new data[100]; sscanf(query, "P<|>s[50]i", data, action_id); SCMF(playerid, -1, "%s - %d", data, action_id); } } } stock ExecuteEvent(playerid, browserid, const event[]) //вывод { new BitStream:bs = BS_New(); new eventStrLen = strlen(event); BS_WriteValue(bs, PR_UINT8, 220); BS_WriteValue(bs, PR_UINT8, 17); BS_WriteValue(bs, PR_UINT32, browserid); BS_WriteValue(bs, PR_UINT32, eventStrLen); BS_WriteValue(bs, PR_STRING, event, eventStrLen); BS_WriteValue(bs, PR_UINT8, 255); BS_WriteValue(bs, PR_UINT8, 255); BS_WriteValue(bs, PR_UINT8, 255); BS_WriteValue(bs, PR_UINT8, 255); PR_SendPacket(bs, playerid); } stock UpdateTest(playerid, index, status) //обновление { new BitStream:bs = BS_New(); BS_WriteValue(bs, PR_UINT8, 220); // 8 hud BS_WriteValue(bs, PR_UINT8, index); BS_WriteValue(bs, PR_UINT8, status); PR_SendPacket(bs, playerid);
После вставляем наш пакет:
Pawn:ExecuteEvent(playerid, 1, "сюда пакет");
Если желаете, можете добавить тест команду для вывода худа, радара и т.д.:
Pawn:cmd:arizona(playerid) { UpdateTest(playerid, 8, 2); UpdateTest(playerid, 9, 2); ExecuteEvent(playerid, 1, "window.executeEvent('event.hud.updateHudVisible', '[true]');"); ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.speedometerType', '[\"advanced\"]')"); ExecuteEvent(playerid, 1, "window.executeEvent('event.hudSA.updateSanAndreasHudVisible', '[true]')"); ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.hotkeysVisible', '[true]')"); ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.setFractionRadioKey', '[\"R\"]')"); ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.setPhoneKey', '[\"P\"]')"); ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.setAnimationKey', '[\"U\"]')"); ExecuteEvent(playerid, 1, "window.executeEvent('event.hudSA.updateSanAndreasHudVisible', '[true]')"); ExecuteEvent(playerid, 1, "window.executeEvent('event.arizonahud.serverInfo', '[{\"id\":0,\"title\":\"Test\",\"project\":\"Arizona\",\"type\":\"Role play\",\"onLine\":771,\"flag\":0,\"logo\":1,\"multiplier\":0}]')"); }
Автор: cute_filatov