10.08.2016, 16:35
According to this from YSF:
What should i put for rename my file:
The path ? because i tried and it didn't rename
Код:
// 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; }
The path ? because i tried and it didn't rename