AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Detecting Offset Change (https://forums.alliedmods.net/showthread.php?t=98908)

hleV 07-30-2009 17:22

Detecting Offset Change
 
Is it possible to detect the change of specific offset data and block/change it like in message?

It's for ESF. Offset 1420 holds the name of model player currently has applied.

These are the stocks to get/set model in ESF:
Code:
stock GetModel(Client, Model[], Lenght)         get_pdata_string(Client, 1420, Model, Lenght, 0, 20);   stock SetModel(Client, Model[]) {         static Location[64];         formatex(Location, 63, "models/player/%s/%s.mdl", Model, Model);           set_pdata_string(Client, 1420, Model, -1, 20);         engfunc(EngFunc_SetModel, Client, Location); }
There's no good way on detecting when the game changes player's model in ESF. And if I do that in prethink or server frame, the model is still applied for 1 client's frame and only gets changed back in the second frame. That sucks (imagine a player with low FPS).


All times are GMT -4. The time now is 18:21.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.