-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.pwn
49 lines (44 loc) · 1.05 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
#include < a_samp >
#define AUTO_OBJECT_ALIAS_ON
#include < YSI_Data\y_iterate >
#include < automatic-objects>
#include < YSI_Visual\y_commands >
main()
{
return;
}
new idd;
public OnGameModeInit()
{
idd = CreateAutomaticObject(19870, 35, -7, 10, 15, -30, 55, 14, 0, 0, 0, 0, 0, 0, 35, -7, 29, 1, 0, 0);
idd = CreateAutomaticObject(19870, 35, -7, 10, 15, -30, 55, 14, 0, 0, 0, 0, 0, 0, 35, -7, 29, 1, 0, 0);
return 1;
}
public OnAutomaticObjectStateChange(objectid, oldstate, newstate)
{
if(newstate == AUTOMATIC_OBJECT_STATE_CREATED)
{
return print("Working");
}
return 1;
}
CMD:test(playerid, params[])
{
if(IsPlayerInAnyAutomaticArea(playerid)) {
SendClientMessage(playerid, -1, "Test true");
}
else {
SendClientMessage(playerid, -1, "Test false");
}
return 1;
}
CMD:testany(playerid, params[])
{
if(IsPlayerInAutomaticArea(playerid, idd)) {
SendClientMessage(playerid, -1, "Test true");
}
else {
SendClientMessage(playerid, -1, "Test false");
}
return 1;
}