-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrulesforvirus.sp
51 lines (35 loc) · 1005 Bytes
/
rulesforvirus.sp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//TODO building path, finish opening file and displaying menu
#include <sourcemod>
#include <sdktools>
#include <clientprefs>
Handle cookie;
public Plugin myinfo =
{
name = "",
author = "AfricanSpaceJesus",
description = "",
version = "0.5",
url = "http://steamcommunity.com/id/swagattack835/"
};
public void OnPluginStart()
{
cookie=RegClientCookie("readRules", "Used to know if client has agreed to the rules", CookieAccess_Private);
}
public OnClientPutInServer(int client){
char[128] cook;
GetClientCookie(client, cookie, cook, sizeof(cook));
if(!StrEqual(cook, "true")){
SetEntityMoveType(client, MOVETYPE_NONE);
buildMenu(client);
}
}
public buildMenu(int client){
Handle rules=CreateMenu(rulesCallback);
SetMenuTitle(rules, "Select Anywhere to Agree");
//read file and add lines
char[[PLATFORM_MAX_PATH] path;
BuildPath(Path_SM, path, sizeof(path), );
Handle file=OpenFile();
}
public int rulesCallback(Handle menu, MenuAction action, int client, int item){
}