1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 16:57:16 +01:00
Commit Graph

158 Commits

Author SHA1 Message Date
Sandu Liviu Catalin
e9b6d9765b Implement a new event to receive notifications when a player money has changed. 2016-08-17 15:55:59 +03:00
Sandu Liviu Catalin
16f35cbef6 Implement a new event to receive notifications when a player skin has changed. 2016-08-17 15:52:22 +03:00
Sandu Liviu Catalin
ad774fcb3f Implement a new event to receive notifications when a player team has changed. 2016-08-17 15:49:08 +03:00
Sandu Liviu Catalin
84bae9432a Implement a new event to receive notifications when a player world has changed. 2016-08-17 15:45:44 +03:00
Sandu Liviu Catalin
c5ef8018ae Implement a new event to notify on player admin status change. 2016-08-17 15:40:48 +03:00
Sandu Liviu Catalin
b4abe9dfc7 Fix the SetOption methods on the Player type which did not validate the managed player identifier and neither create a guard to prevent recursive event calls. Also, reduce duplicate code. 2016-08-17 15:31:45 +03:00
Sandu Liviu Catalin
c4e82d6756 Add the ability to specify a custom header/payload when kicking/banning a player. 2016-08-17 13:48:29 +03:00
Sandu Liviu Catalin
65b3482828 Don't validate the instance when setting the spectator so null instances can be used and disable the spectating. 2016-08-07 01:56:11 +03:00
Sandu Liviu Catalin
29b0f8d4c9 Add the possibility to have null entity instances intentionally. 2016-08-07 01:54:33 +03:00
Sandu Liviu Catalin
f7b0909ed7 Expose functionality to emit custom entity events. 2016-07-27 00:13:50 +03:00
Sandu Liviu Catalin
3cea68bdca Improve the Color4 registration code to avoid using overloads where not necessary.
Also restructured the registration code a bit.
2016-07-24 23:18:12 +03:00
Sandu Liviu Catalin
6be526924d Add the option to specify a header and payload when tracking player position changes. 2016-07-14 19:52:14 +03:00
Sandu Liviu Catalin
1d5b12f11f Add a helper member function to the vehicle class to fix the managed vehicle. 2016-07-13 01:47:36 +03:00
Sandu Liviu Catalin
953ef30c17 Remove leftover parenthesis from previous commit. 2016-07-09 17:14:09 +03:00
Sandu Liviu Catalin
7bb0d5f947 Adjust the code to use the .what() method from the Sqrat exception. 2016-07-09 14:18:09 +03:00
Sandu Liviu Catalin
4e93e58397 Initial revision of the buffer implementation. 2016-07-08 00:56:54 +03:00
Sandu Liviu Catalin
254bd9eee6 Avoid creating checkpoints for invalid player instances. 2016-06-25 00:08:16 +03:00
Sandu Liviu Catalin
8e0a9edb3e Update the checkpoint creation process to allow creating checkpoints for all players as well as dedicated to a certain player. Should close #10 2016-06-24 23:37:58 +03:00
Sandu Liviu Catalin
66e604cec7 Add back some of the entity search functions. 2016-06-21 16:15:25 +03:00
Sandu Liviu Catalin
29af51c518 Improve entity searching algorithms. 2016-06-21 15:17:08 +03:00
Sandu Liviu Catalin
1d12ddd60d Improve searching for active entities. Also fix a possible crash because the entity instance pushed on the stack was appending to itself instead of the array. 2016-06-21 09:02:44 +03:00
Sandu Liviu Catalin
933522f2a4 Add a method to the player class that plays a sound which follows the player character. 2016-06-20 08:27:39 +03:00
Sandu Liviu Catalin
e6213d0932 Fix the player alpha modification. 2016-06-20 08:08:33 +03:00
Sandu Liviu Catalin
dae66ca39f Export the function that must be used to obtain unused keybind slots. 2016-06-20 08:01:59 +03:00
Sandu Liviu Catalin
6ec8ca620f Update the player mesage broadcasting to also be more flexible and dynamic when detecting the message color.
Move the shared code that identifies the message color outside the player class source file.
2016-06-19 19:06:24 +03:00
Sandu Liviu Catalin
f26ab29a14 Improve the player messaging functions to be more flexible and dynamic when detecting the message color. 2016-06-19 18:39:12 +03:00
Sandu Liviu Catalin
4dc36b9889 Update player messaging to support alpha/transparency in the specified color. 2016-06-19 08:13:02 +03:00
Sandu Liviu Catalin
bca0e1f3c6 More validations on identifiers obtained from the server.
Prevent out_of_range exceptions leak into the script as it would end up in a crash since Sqrat doesn't know how to handle them.
2016-06-15 06:11:47 +03:00
Sandu Liviu Catalin
ef41d0d243 Improve the SetAnimation method on player class.
Make it so that the animation group is optional.
2016-06-15 06:06:03 +03:00
Sandu Liviu Catalin
7391d9391e Prevent triggering the player option change event value din not change.
If the value for the specified option would not be changed then there's no point in triggering any event or attempting to set it again only and have the same effect.
Fixed minor misspelling in the player class source.
2016-06-14 04:42:18 +03:00
Sandu Liviu Catalin
5a225a70b9 Validate identifiers obtained from the server before using them.
Prevent aout_of_range exceptions from leaking to the script in case the server returns a negative identifier. Thus, resulting in a server crash since Squirrel would not know how to handle them.
2016-06-14 02:34:04 +03:00
Sandu Liviu Catalin
a71b45567a Added LastArmor alias to the player class for consistency. 2016-06-14 00:50:20 +03:00
Sandu Liviu Catalin
9c547ae8a8 Add the Colour alias when retrieving the color from Checkpoints. 2016-06-13 01:33:52 +03:00
Sandu Liviu Catalin
67d0360fb3 Add the Colour alias when retrieving the color from Blips. 2016-06-13 00:23:30 +03:00
Sandu Liviu Catalin
bc1e7dbde6 Implement the option to specify how many times you want to allow intensive entity events to be forwarded to script callbacks.
Also expose several properties for the vehicle entity type that I forgot about.
2016-06-08 16:53:16 +03:00
Sandu Liviu Catalin
0c92601362 Update the module API and merge shared code between modules and host plugin. 2016-06-03 21:26:19 +03:00
Sandu Liviu Catalin
423bdfcdab Remove duplicate property from player class. 2016-05-26 08:55:48 +03:00
Sandu Liviu Catalin
86a4933525 Release script callbacks properly in main plugin. 2016-05-24 21:36:49 +03:00
Sandu Liviu Catalin
d7c4d389eb Throw an error if the given player name is invalid. 2016-05-24 08:26:47 +03:00
Sandu Liviu Catalin
3ed0b22426 Make the function environment optional in entity callbacks. 2016-05-24 07:29:14 +03:00
Sandu Liviu Catalin
f2361a27c3 Untested update to the new plugin API.
Various other changes to the plugin as well.
2016-05-22 06:20:38 +03:00
Sandu Liviu Catalin
b818a162ee Initial implementation of the standard math library.
Implemented utilities to convert between fundamental types.
Implemented helper functions to retrieve numeric values from the stack at all costs.
Implemented various delegates on the long integer types to mimic the standard types.
Moved most of the stack utilities in a separate source.
Various other fixes and improvements.
2016-04-14 03:08:06 +03:00
Sandu Liviu Catalin
b5215b38e3 Implement function to retrieve all active vehicles. 2016-03-26 18:17:38 +02:00
Sandu Liviu Catalin
aeba86bddf Implement function to retrieve all active textdraws. 2016-03-26 18:17:31 +02:00
Sandu Liviu Catalin
5d15342342 Implement function to retrieve all active sprites. 2016-03-26 18:17:21 +02:00
Sandu Liviu Catalin
c79598d843 Implement function to retrieve all active players. 2016-03-26 18:17:12 +02:00
Sandu Liviu Catalin
1472594c7f Implement function to retrieve all active pickups. 2016-03-26 18:17:05 +02:00
Sandu Liviu Catalin
6683930250 Implement function to retrieve all active objects. 2016-03-26 18:16:58 +02:00
Sandu Liviu Catalin
534a582561 Implement function to retrieve all active keybinds. 2016-03-26 18:16:50 +02:00
Sandu Liviu Catalin
054b4f080e Implement function to retrieve all active forcefields. 2016-03-26 18:16:41 +02:00
Sandu Liviu Catalin
ea9a370471 Implement function to retrieve all active checkpoints. 2016-03-26 18:16:32 +02:00
Sandu Liviu Catalin
067693d250 Implement function to retrieve all active blips. 2016-03-26 18:16:18 +02:00
Sandu Liviu Catalin
8088ba94c2 Updated the exception system in the main plugin to also include the location in the source files in debug builds.
Moved the functions that extract base types from strings as static functions under the associated type.
Revised some of the base shared code.
Fixed some of the functions in the String library that did not take into account the null terminator.
2016-03-21 22:37:58 +02:00
Sandu Liviu Catalin
5c81af5026 Minor changes in the entity types code style. 2016-03-12 22:51:44 +02:00
Sandu Liviu Catalin
58891f1e8b Implemented searching entities by ID and Tag. 2016-03-10 06:18:39 +02:00
Sandu Liviu Catalin
70e5f0ba21 Migrated the host module to C++ exceptions as well.
Also enabled the latest C++ revision in the project.
Replaced the Random library with the one provided by C++11.
Implemented a simple AES256 encryption class.
Various other fixes and improvements.
2016-03-10 05:57:13 +02:00
Sandu Liviu Catalin
06e598acfb Dumped the old implementation. Started with a more simple approach. 2016-02-21 00:25:00 +02:00
Sandu Liviu Catalin
3b729cd73d Added several aliases and short notations for members in vehicle entity type. 2015-11-11 11:36:37 +02:00
Sandu Liviu Catalin
9c5205d03b Minor adjustment in debugging information for sprite entity type. 2015-11-11 11:31:35 +02:00
Sandu Liviu Catalin
f3b7f35055 Minor adjustment in debugging information for textdraw entity type. 2015-11-11 11:31:26 +02:00
Sandu Liviu Catalin
09ef3f43a3 Update vehicle entity to use the new debugging implementation. 2015-11-11 11:30:50 +02:00
Sandu Liviu Catalin
f426b282ae Registered the reference for the vehicle entity type with the script. 2015-11-11 10:56:02 +02:00
Sandu Liviu Catalin
fc603053dd Aliased several methods for textdraw entity type. Also a minor fix in debuggin information during registration. 2015-11-11 09:55:38 +02:00
Sandu Liviu Catalin
ba1f933e7b Aliased several methods for sprite entity type. 2015-11-11 09:54:44 +02:00
Sandu Liviu Catalin
ae1ec72715 Update textdraw entity to use the new debugging implementation. 2015-11-11 09:52:16 +02:00
Sandu Liviu Catalin
69c991167d Update sprite entity to use the new debugging implementation. 2015-11-11 09:26:36 +02:00
Sandu Liviu Catalin
66d7421373 Update sphere entity to use the new debugging implementation. 2015-11-11 09:07:42 +02:00
Sandu Liviu Catalin
cdd5cb2050 Update player entity to use the new debugging implementation. And create alternative version of several member functions. 2015-11-11 09:02:42 +02:00
Sandu Liviu Catalin
a6ded15aaa Update pickup entity to use the new debugging implementation. 2015-11-11 08:57:34 +02:00
Sandu Liviu Catalin
fc2ecea7b9 Update object entity to use the new debugging implementation. 2015-11-11 08:57:26 +02:00
Sandu Liviu Catalin
cd86375bd2 Update keybind entity to use the new debugging implementation. 2015-11-11 08:57:18 +02:00
Sandu Liviu Catalin
6a50e21f75 Update checkpoint entity to use the new debugging implementation. 2015-11-11 08:57:10 +02:00
Sandu Liviu Catalin
ec21e52353 Update blip entity to use the new debugging implementation. 2015-11-11 08:57:03 +02:00
Sandu Liviu Catalin
bcf9d603e7 Implemented global and local player messaging customization. 2015-11-09 05:54:03 +02:00
Sandu Liviu Catalin
3c3e67bdaa Implement message prefixing and other style customization. 2015-11-09 04:32:32 +02:00
Sandu Liviu Catalin
8b9d46d9a9 Implemented player messaging. 2015-11-09 03:29:04 +02:00
Sandu Liviu Catalin
3206d49404 Implemented a simple command system. Added a custom buffer class. Implemented reconnection for IRC sessions. Various other adjustments and additions. 2015-11-07 12:17:39 +02:00
Sandu Liviu Catalin
46801b1ce8 Discarded the noexcept specifier entirely. 2015-11-01 05:48:01 +02:00
Sandu Liviu Catalin
11c3533917 Implemented functions to create vehicle entities and added constructor to create an entity reference from a base reference. 2015-11-01 01:33:12 +02:00
Sandu Liviu Catalin
eb730a6ff3 Implemented functions to create textdraw entities and added constructor to create an entity reference from a base reference. 2015-11-01 01:33:04 +02:00
Sandu Liviu Catalin
997cdc2fce Implemented functions to create sprite entities and added constructor to create an entity reference from a base reference. 2015-11-01 01:32:57 +02:00
Sandu Liviu Catalin
0d5dd53984 Implemented functions to create sphere entities and added constructor to create an entity reference from a base reference. 2015-11-01 01:32:50 +02:00
Sandu Liviu Catalin
b0c174e75e Added constructor to create a player entity reference from a base reference. 2015-11-01 01:32:41 +02:00
Sandu Liviu Catalin
8d8c9be2fd Implemented functions to create pickup entities and added constructor to create an entity reference from a base reference. 2015-11-01 01:32:16 +02:00
Sandu Liviu Catalin
6c308ee85c Implemented functions to create object entities and added constructor to create an entity reference from a base reference. 2015-11-01 01:31:57 +02:00
Sandu Liviu Catalin
78c72399db Implemented functions to create keybind entities and added constructor to create an entity reference from a base reference. 2015-11-01 01:31:46 +02:00
Sandu Liviu Catalin
986fc5769e Implemented functions to create checkpoint entities and added constructor to create an entity reference from a base reference. 2015-11-01 01:31:38 +02:00
Sandu Liviu Catalin
2a3cef8318 Implemented functions to create blip entities and added constructor to create an entity reference from a base reference. 2015-11-01 01:31:28 +02:00
Sandu Liviu Catalin
1a34efb45b Fix debugging messages in Keybind type. 2015-10-30 15:22:35 +02:00
Sandu Liviu Catalin
d3d247b5f9 Simlified the buffer size calculation in Player type.
Fixed bug which multiplied by the type size instead of dividing. thanks @VRocker
2015-10-30 15:22:23 +02:00
Sandu Liviu Catalin
c2e62af14c Documented the Textdraw type. 2015-10-29 23:14:17 +02:00
Sandu Liviu Catalin
72677546a7 Documented the Sprite type. 2015-10-29 23:10:46 +02:00
Sandu Liviu Catalin
c8907b8ea2 Fixed the keybind documentation. 2015-10-29 23:06:20 +02:00
Sandu Liviu Catalin
7c337e49cb Documented the Keybind type. 2015-10-29 23:05:25 +02:00
Sandu Liviu Catalin
56170f5304 Fixed documentation of the Blip type. 2015-10-29 23:03:58 +02:00
Sandu Liviu Catalin
9abb596aa8 Documented the Blip type. 2015-10-29 23:02:55 +02:00
Sandu Liviu Catalin
4b71f2006f Update the sprite reference type to use the short notation of squirrel's 32bit unsigned integer. 2015-10-29 22:56:40 +02:00
Sandu Liviu Catalin
e111cd0ccc Untested implementation of the Vehicle type. 2015-10-29 22:56:07 +02:00
Sandu Liviu Catalin
6050f6e725 Untested implementation of the Textdraw type. 2015-10-29 22:55:36 +02:00
Sandu Liviu Catalin
df0eaf8515 Untested implementation of the Sprite type. 2015-10-29 22:41:20 +02:00