Enyone had this problem with the plugin
Locked
FLHook Development
-
not sure whats causing it but the compare aint matching
need help to fix itstring ammocomp; EXPORT void LoadSettings() { IniGetS(set_scCfgFile, "Lazer", "ammo", ammocomp); } namespace HkIServerImpl { __declspec(dllexport) void __stdcall SPMunitionCollision(struct SSPMunitionCollisionInfo const & ci, unsigned int iClientID) { uint iShip; pub::Player::GetShip(iClientID, iShip); uint ammo = ci.iProjectileArchID; uint ammocompareID = CreateID(ammocomp.c_str()); PrintUserCmdText(iClientID, L"hit detected"); PrintUserCmdText(iClientID, L"ammo hit = %d",ammo); PrintUserCmdText(iClientID, L"ammo compare = %d",ammocompareID); } } ```in the ini i have Lazer ammo=li_gun01_mark01_ammo when i shoot stuff the ids dont match yet the guns are using that ammo
-
Your code is wrong.
The last param of IniGetS is the default value.
So it would have to be something like:
ammocomp = IniGetS(set_scCfgFile, "Lazer", "ammo", "some_default_value");
You should also use %u for uints.
As an aside:
You can also use ClientInfo[iClientD].iShip.