-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.pwn
52 lines (44 loc) · 1.15 KB
/
test.pwn
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
52
// generated by "sampctl package generate"
#include "Rewind.inc"
main() {
// write tests for libraries here and run "sampctl package run"
}
public OnPlayerRewindForPlayer(playerid, forplayerid)
{
new Rewind_String[40];
format(Rewind_String, sizeof(Rewind_String), "%d Is rewinding for %d", playerid, forplayerid);
SendClientMessageToAll(-1, Rewind_String);
return 1;
}
public OnPlayerStartRewind(playerid)
{
new Rewind_String[40];
format(Rewind_String, sizeof(Rewind_String), "%d Is rewinding", playerid);
SendClientMessageToAll(-1, Rewind_String);
return 1;
}
public OnPlayerFinishRewind(playerid)
{
new Rewind_String[40];
format(Rewind_String, sizeof(Rewind_String), "%d Is finished rewinding", playerid);
SendClientMessageToAll(-1, Rewind_String);
return 1;
}
public OnPlayerConnect(playerid)
{
ShowTimeMachineSynced(playerid);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
HideTimeMachineSynced(playerid);
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(!IsPlayerInvolvedInRewind(playerid) && !IsPlayerRewinding(playerid) && newstate == PLAYER_STATE_ONFOOT)
{
StartRewinding(playerid);
}
return 1;
}