Skip to content

Commit 06c404e

Browse files
committed
Finish The Base
1 parent 059b216 commit 06c404e

File tree

2 files changed

+45
-895
lines changed

2 files changed

+45
-895
lines changed

scripting/filenetwork.sp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ enum struct FileEnum
1313
char Filename[PLATFORM_MAX_PATH];
1414
Handle Plugin;
1515
Function Func;
16+
any Data;
1617
}
1718

1819
Handle SDKGetPlayerNetInfo;
@@ -154,7 +155,7 @@ public Action Command_Test(int client, int args)
154155
return Plugin_Handled;
155156
}
156157

157-
public void OnClientDisconnect(int client)
158+
public void OnClientDisconnect_Post(int client)
158159
{
159160
static FileEnum info;
160161

@@ -194,7 +195,7 @@ public Action Timer_SendingClient(Handle timer, int client)
194195
CallSentFileFinish(info, true);
195196
FileListing.Erase(i);
196197
break;
197-
}
198+
}
198199
}
199200

200201
CurrentlySending[client][0] = 0;
@@ -235,6 +236,7 @@ static void CallSentFileFinish(const FileEnum info, bool success)
235236
Call_PushCell(info.Client);
236237
Call_PushString(info.Filename);
237238
Call_PushCell(success);
239+
Call_PushCell(info.Data);
238240
Call_Finish();
239241
}
240242
}
@@ -312,6 +314,7 @@ public any Native_SendFile(Handle plugin, int params)
312314

313315
info.Plugin = plugin;
314316
info.Func = GetNativeFunction(3);
317+
info.Data = GetNativeCell(4);
315318

316319
FileListing.PushArray(info);
317320

0 commit comments

Comments
 (0)