Help to understand the native of a plugin
#1

According to this from YSF:

Код:
// native frename(const oldname[], const newname[]);
static cell AMX_NATIVE_CALL Natives::frename(AMX *amx, cell *params)
{
	// Creates a directory
	CHECK_PARAMS(2, "frename");
	char
		*szOld,
		*szNew;
	// Get the search pattern
	amx_StrParam(amx, params[1], szOld);
	amx_StrParam(amx, params[2], szNew);
	if (szOld && szNew)
	{
		char
			*szO = (char *)alloca(strlen(szOld) + 16),
			*szN = (char *)alloca(strlen(szNew) + 16);
		strcpy(szO, "./scriptfiles/");
		strcpy(szO + 14, szOld);
		strcpy(szN, "./scriptfiles/");
		strcpy(szN + 14, szNew);
		return (cell)rename(szO, szN);
	}
	return 0;
}
What should i put for rename my file:
The path ? because i tried and it didn't rename
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)