Skip to content

Commit

Permalink
Finish The Base
Browse files Browse the repository at this point in the history
  • Loading branch information
Batfoxkid committed Feb 15, 2023
1 parent 059b216 commit 06c404e
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 895 deletions.
7 changes: 5 additions & 2 deletions scripting/filenetwork.sp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ enum struct FileEnum
char Filename[PLATFORM_MAX_PATH];
Handle Plugin;
Function Func;
any Data;
}

Handle SDKGetPlayerNetInfo;
Expand Down Expand Up @@ -154,7 +155,7 @@ public Action Command_Test(int client, int args)
return Plugin_Handled;
}

public void OnClientDisconnect(int client)
public void OnClientDisconnect_Post(int client)
{
static FileEnum info;

Expand Down Expand Up @@ -194,7 +195,7 @@ public Action Timer_SendingClient(Handle timer, int client)
CallSentFileFinish(info, true);
FileListing.Erase(i);
break;
}
}
}

CurrentlySending[client][0] = 0;
Expand Down Expand Up @@ -235,6 +236,7 @@ static void CallSentFileFinish(const FileEnum info, bool success)
Call_PushCell(info.Client);
Call_PushString(info.Filename);
Call_PushCell(success);
Call_PushCell(info.Data);
Call_Finish();
}
}
Expand Down Expand Up @@ -312,6 +314,7 @@ public any Native_SendFile(Handle plugin, int params)

info.Plugin = plugin;
info.Func = GetNativeFunction(3);
info.Data = GetNativeCell(4);

FileListing.PushArray(info);

Expand Down
Loading

0 comments on commit 06c404e

Please sign in to comment.