-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.pwn
40 lines (29 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
// generated by "sampctl package init"
#include <a_samp>
#include <itemtasks>
main() {}
public OnGameModeInit() {
new ItemType:item_Marijuana = DefineItemType("Marijuana", "Marijuana", 3027, 1, 0.0);
new ItemType:item_Toolbox = DefineItemType("Toolbox", "Toolbox", 19921, 1, 0.0);
new ItemType:item_Tire = DefineItemType("Tire", "Tire", 1098, 1, 0.0);
ItemTasks_DefineItemType(item_Marijuana, 20);
ItemTasks_DefineItemType(item_Toolbox, 5);
ItemTasks_DefineItemType(item_Tire, 2);
ItemTasks_SetPlayerRandomTask(0);
printf("----------------------------------------");
ItemTasks_SetPlayerRandomTask(1);
printf("----------------------------------------");
ItemTasks_SetPlayerRandomTask(2);
printf("----------------------------------------");
new ItemType:items[3];
items[0] = item_Marijuana;
items[1] = item_Marijuana;
items[2] = item_Toolbox;
ItemTasks_SetPlayerTask(3, items);
new ItemType:arr[ITEMTASKS_MAX_ITEMS_PER_TASK];
ItemTasks_GetPlayerTaskItems(1, arr);
for (new i = 0; i < sizeof(arr); i++) {
printf("Item: %d", _:arr[i]);
}
ItemTasks_CompletePlayerTask(1);
}