feat: Модифицирована Squirrel сторона под новый формат сообщений
This commit is contained in:
@@ -8,7 +8,7 @@ addEventHandler("onPlayerUseCheat", function(playerid, type)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onBan", function(banInfo)
|
||||
@@ -25,7 +25,7 @@ addEventHandler("onBan", function(banInfo)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onExit", function()
|
||||
@@ -35,7 +35,7 @@ addEventHandler("onExit", function()
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onTick", function()
|
||||
@@ -45,7 +45,7 @@ addEventHandler("onTick", function()
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onTime", function(day, hour, min)
|
||||
@@ -58,7 +58,7 @@ addEventHandler("onTime", function(day, hour, min)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onUnban", function(banInfo)
|
||||
@@ -75,7 +75,7 @@ addEventHandler("onUnban", function(banInfo)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onNpcActionFinished", function(npc_id, action_type, action_id, result)
|
||||
@@ -89,7 +89,7 @@ addEventHandler("onNpcActionFinished", function(npc_id, action_type, action_id,
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onNpcActionSent", function(npc_id, action_type, action_id)
|
||||
@@ -102,7 +102,7 @@ addEventHandler("onNpcActionSent", function(npc_id, action_type, action_id)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onNpcChangeHostPlayer", function(npc_id, current_id, previous_id)
|
||||
@@ -115,7 +115,7 @@ addEventHandler("onNpcChangeHostPlayer", function(npc_id, current_id, previous_i
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onNpcCreated", function(npc_id)
|
||||
@@ -126,7 +126,7 @@ addEventHandler("onNpcCreated", function(npc_id)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onNpcDestroyed", function(npc_id)
|
||||
@@ -137,7 +137,7 @@ addEventHandler("onNpcDestroyed", function(npc_id)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerChangeColor", function(playerid, r, g, b)
|
||||
@@ -151,7 +151,7 @@ addEventHandler("onPlayerChangeColor", function(playerid, r, g, b)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerChangeFocus", function(playerid, oldFocusId, newFocusId)
|
||||
@@ -164,7 +164,7 @@ addEventHandler("onPlayerChangeFocus", function(playerid, oldFocusId, newFocusId
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerChangeHealth", function(playerid, previous, current)
|
||||
@@ -177,7 +177,7 @@ addEventHandler("onPlayerChangeHealth", function(playerid, previous, current)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerChangeMana", function(playerid, previous, current)
|
||||
@@ -190,7 +190,7 @@ addEventHandler("onPlayerChangeMana", function(playerid, previous, current)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerChangeMaxHealth", function(playerid, previous, current)
|
||||
@@ -203,7 +203,7 @@ addEventHandler("onPlayerChangeMaxHealth", function(playerid, previous, current)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerChangeMaxMana", function(playerid, previous, current)
|
||||
@@ -216,7 +216,7 @@ addEventHandler("onPlayerChangeMaxMana", function(playerid, previous, current)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerChangeWeaponMode", function(playerid, previous, current)
|
||||
@@ -229,7 +229,7 @@ addEventHandler("onPlayerChangeWeaponMode", function(playerid, previous, current
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerChangeWorld", function(playerid, previous, current)
|
||||
@@ -242,7 +242,7 @@ addEventHandler("onPlayerChangeWorld", function(playerid, previous, current)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerCommand", function(playerid, command, params)
|
||||
@@ -255,7 +255,7 @@ addEventHandler("onPlayerCommand", function(playerid, command, params)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerDamage", function(playerid, killerid, description)
|
||||
@@ -271,7 +271,7 @@ addEventHandler("onPlayerDamage", function(playerid, killerid, description)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerDead", function(playerid, killerid)
|
||||
@@ -283,7 +283,7 @@ addEventHandler("onPlayerDead", function(playerid, killerid)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerDisconnect", function(playerid, reason)
|
||||
@@ -295,7 +295,7 @@ addEventHandler("onPlayerDisconnect", function(playerid, reason)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerDropItem", function(playerid, itemGround)
|
||||
@@ -310,7 +310,7 @@ addEventHandler("onPlayerDropItem", function(playerid, itemGround)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerEnterWorld", function(playerid, world)
|
||||
@@ -322,7 +322,7 @@ addEventHandler("onPlayerEnterWorld", function(playerid, world)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerEquipAmulet", function(playerid, instance)
|
||||
@@ -334,7 +334,7 @@ addEventHandler("onPlayerEquipAmulet", function(playerid, instance)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerEquipArmor", function(playerid, instance)
|
||||
@@ -346,7 +346,7 @@ addEventHandler("onPlayerEquipArmor", function(playerid, instance)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerEquipBelt", function(playerid, instance)
|
||||
@@ -358,7 +358,7 @@ addEventHandler("onPlayerEquipBelt", function(playerid, instance)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerEquipHandItem", function(playerid, hand, instance)
|
||||
@@ -371,7 +371,7 @@ addEventHandler("onPlayerEquipHandItem", function(playerid, hand, instance)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerEquipHelmet", function(playerid, instance)
|
||||
@@ -383,7 +383,7 @@ addEventHandler("onPlayerEquipHelmet", function(playerid, instance)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerEquipMeleeWeapon", function(playerid, instance)
|
||||
@@ -395,7 +395,7 @@ addEventHandler("onPlayerEquipMeleeWeapon", function(playerid, instance)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerEquipRangedWeapon", function(playerid, instance)
|
||||
@@ -407,7 +407,7 @@ addEventHandler("onPlayerEquipRangedWeapon", function(playerid, instance)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerEquipRing", function(playerid, handId, instance)
|
||||
@@ -420,7 +420,7 @@ addEventHandler("onPlayerEquipRing", function(playerid, handId, instance)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerEquipShield", function(playerid, instance)
|
||||
@@ -432,7 +432,7 @@ addEventHandler("onPlayerEquipShield", function(playerid, instance)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerEquipSpell", function(playerid, slotId, instance)
|
||||
@@ -445,7 +445,7 @@ addEventHandler("onPlayerEquipSpell", function(playerid, slotId, instance)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerJoin", function(playerid)
|
||||
@@ -456,7 +456,7 @@ addEventHandler("onPlayerJoin", function(playerid)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerMessage", function(playerid, message)
|
||||
@@ -468,7 +468,7 @@ addEventHandler("onPlayerMessage", function(playerid, message)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerMobInteract", function(playerid, from, to)
|
||||
@@ -481,7 +481,7 @@ addEventHandler("onPlayerMobInteract", function(playerid, from, to)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerRespawn", function(playerid)
|
||||
@@ -492,7 +492,7 @@ addEventHandler("onPlayerRespawn", function(playerid)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerShoot", function(playerid, munition)
|
||||
@@ -504,7 +504,7 @@ addEventHandler("onPlayerShoot", function(playerid, munition)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerSpellCast", function(playerid, instance, spellLevel)
|
||||
@@ -517,7 +517,7 @@ addEventHandler("onPlayerSpellCast", function(playerid, instance, spellLevel)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerSpellSetup", function(playerid, instance)
|
||||
@@ -529,7 +529,7 @@ addEventHandler("onPlayerSpellSetup", function(playerid, instance)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerTakeItem", function(playerid, itemGround)
|
||||
@@ -544,7 +544,7 @@ addEventHandler("onPlayerTakeItem", function(playerid, itemGround)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerTeleport", function(playerid, vobName)
|
||||
@@ -556,7 +556,7 @@ addEventHandler("onPlayerTeleport", function(playerid, vobName)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerToggleFaceAni", function(playerid, aniName, toggle)
|
||||
@@ -569,7 +569,7 @@ addEventHandler("onPlayerToggleFaceAni", function(playerid, aniName, toggle)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerSpawnForPlayer", function(playerid, spawnid)
|
||||
@@ -581,7 +581,7 @@ addEventHandler("onPlayerSpawnForPlayer", function(playerid, spawnid)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerUnspawnForPlayer", function(playerid, spawnid)
|
||||
@@ -593,7 +593,7 @@ addEventHandler("onPlayerUnspawnForPlayer", function(playerid, spawnid)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
addEventHandler("onPlayerChangeChunk", function(playerid, chunk_index)
|
||||
@@ -605,5 +605,5 @@ addEventHandler("onPlayerChangeChunk", function(playerid, chunk_index)
|
||||
}
|
||||
|
||||
if (_globalInstance != -1)
|
||||
_globalInstance._send("event", data);
|
||||
_globalInstance._send(data);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user