-
Notifications
You must be signed in to change notification settings - Fork 3
/
rpg_devzones.inc
71 lines (61 loc) · 2.18 KB
/
rpg_devzones.inc
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
69
70
71
/** Double-include prevention */
#if defined _rpg_devzones_included_
#endinput
#endif
#define _rpg_devzones_included_
/**
* Check if a player are there in a zone
*
* @param client Player for check
* @String zone Zone name
* @bool equal Check exact zone name or parcial name
* @bool caseSensitive If true, comparison is case sensitive. If false, comparison is case insensitive.
* @return true if player are there in the zone given in Zone String
*/
native bool:Zone_IsClientInZone(client, String:zone[], bool:equal = true, bool:caseSensitive = false);
/**
* Check if a position is in a zone
*
* @param client Player for check
* @String zone Zone name
* @float posx X-Pos
* @float posx Y-Pos
* @float posx Z-Pos
* @return true if position is in a zone or not
*/
native bool Zone_isPositionInZone(char[] zone, float posx, float posy, float posz, bool equal = true);
/**
* Check if zone exists
*
* @String zone Zone name
* @bool equal Check exact zone name or parcial name
* @bool caseSensitive If true, comparison is case sensitive. If false, comparison is case insensitive.
* @return true if zone exist
*/
native bool:Zone_CheckIfZoneExists(String:zone[], bool:equal = true, bool:caseSensitive = false);
/**
* Called when a player has entered in a zone.
* @param client client that has entered in the zone.
* @String zone Zone name.
*/
forward Zone_OnClientEntry(client, String:zone[]);
/**
* Called when a player has left a zone.
* @param client client that has left the zone.
* @String zone Zone name.
*/
forward Zone_OnClientLeave(client, String:zone[]);
/**
* Get a zone position
* @String zone Zone name to search position.
* @bool caseSensitive If true, comparison is case sensitive. If false, comparison is case insensitive.
* @Float Position Array when the zone position will be copied
* @return true on successfully, false otherwise
*/
native Zone_GetZonePosition(String:zone[], bool:caseSensitive = false, Float:Position[3]);
/*
@Param1 -> int client
@Param2 -> char[64] zoneBuffer
@return true if zone found false if not
*/
native bool Zone_getMostRecentActiveZone(int client, char zoneBuffer[64]);