thx, i found some amxx functions like force_unmodified(), but i was talking about simple check if file exist
i looked into amxx code and found function for forcing consistency
Code:
static cell AMX_NATIVE_CALL force_unmodified(AMX *amx, cell *params)
{
int a;
cell *cpVec1 = get_amxaddr(amx, params[2]);
cell *cpVec2 = get_amxaddr(amx, params[3]);
Vector vec1 = Vector((float)cpVec1[0], (float)cpVec1[1], (float)cpVec1[2]);
Vector vec2 = Vector((float)cpVec2[0], (float)cpVec2[1], (float)cpVec2[2]);
char* filename = get_amxstring(amx, params[4], 0, a);
ForceObject* aaa = new ForceObject(filename, (FORCE_TYPE)((int)(params[1])), vec1, vec2, amx);
if (aaa)
{
if (stristr(filename, ".wav"))
g_forcesounds.put(aaa);
else if (stristr(filename, ".mdl"))
g_forcemodels.put(aaa);
else
g_forcegeneric.put(aaa);
return 1;
}
return 0;
}
class ForceObject
{
String filename;
FORCE_TYPE type;
Vector mins;
Vector maxs;
AMX* amx;
public:
ForceObject(const char* n, FORCE_TYPE c, Vector& mi, Vector& ma, AMX* a) : filename(n), type(c), mins(mi), maxs(ma), amx(a) {}
inline const char* getFilename() { return filename.c_str(); }
inline AMX* getAMX() { return amx; }
Vector& getMin() { return mins; }
Vector& getMax() { return maxs; }
inline FORCE_TYPE getForceType() { return type; }
};
*will appreciate any help
with force_unmodified() you can check any files and it works perfectly, so it gets crc32 from client file then it gets crc32 from server file and compares them, in my case i need to stop at getting crc32 for client file and know if file exist but amxx source looks so confusing =\