forked from Amagida/EVENT-FRAMEWORK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.pwn
68 lines (60 loc) · 1.66 KB
/
example.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
Example Script For EVENT System FrameWork
Created By Amagida
*/
#include <a_samp>
#include <zcmd> //https://pastebin.com/SbJc7iXa
#include <event> //https://github.com/Amagida/EVENT-FRAMEWORK
new DeagleEvent;
public event_OnCreate(eventid, Float:x, Float:y, Float:z, Float:SpawnX, Float:SpawnY, Float:SpawnZ, Float:range, vw, int, style, MaxPlayers)
{
printf("TEST DEBUG FOR EVENT ID %d", eventid);
printf("%f", x);
printf("%f", y);
printf("%f", z);
printf("%f", SpawnX);
printf("%f", SpawnY);
printf("%f", SpawnZ);
printf("%d", vw);
printf("%d", int);
printf("%d", style);
printf("%d", MaxPlayers);
return 1;
}
public event_OnStart(eventid, style)
{
new eventname[126], string[126];
event_GetInfo(eventid, "name", eventname);
format(string, sizeof(string), "%s Started! For Joining Event Write /joindglevent!", eventname);
SendClientMessageToAll(-1, string);
return 1;
}
public eventp_OnPlayerJoin(playerid, eventid, style)
{
new eventname[126], string[126];
event_GetInfo(eventid, "name", eventname);
format(string, sizeof(string), "You Joined Event: %s! You got desert eagle for playing on event!",eventname);
SendClientMessage(playerid, -1, string);
GivePlayerWeapon(playerid, 24, 9999);
return 1;
}
public eventp_OnPlayerWin(playerid, eventid)
{
SendClientMessage(playerid, 64, "You won event!");
return 1;
}
public OnGameModeInit()
{
DeagleEvent = event_Create("Deagle Event", 837.5248, -2011.0693 ,12.8672, 837.5248, -2011.0693, 12.8672, 30.0, 0, 0, 1, 2);
return 1;
}
CMD:startdeaglevent(playerid, params[])
{
event_Start(DeagleEvent, 5);
return 1;
}
CMD:joindglevent(playerid, params[])
{
eventp_Join(DeagleEvent, playerid);
return 1;
}