Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - [R3V]Kelvin

#1
v2.0.0 Update (2024-12-11)
  • Reimplemented almost all definitions for consistency with those from the official Squirrel module (SetPlayerBleeding() and IsPlayerBleeding() become a single property: Player.IsBleeding, etc.).
  • Due to the above change, support for functions to affect all entities on server in a single function call has been dropped (i.e. passing -1 where a valid entity ID was expected).
  • Send a warning message instead of an error message if we fail to hook Squirrel.

No new functionalities have been added.

This update breaks compatibility with older versions of the plugin, so please take a look at the documentation once again for changes that may be relevant to you:
https://github.com/sfwidde/vcmp-latest-features-for-squirrel

If nothing of what has been said above is relevant to you, you can safely ignore this update and continue to use older versions of this plugin.
#2
Snippet Showroom / Steam-like Notifications
Oct 21, 2024, 08:30 AM

This is a snippet I had worked on in September 2020 that I lost track of and recently found motivation to start working on it again.

As per usual, installation, documentation and more can be found on project's own GitHub repository: https://github.com/sfwidde/vcmp-steam-like-notifications

The code targets Squirrel but can be adapted to any language supporting streams in VC:MP.

Thanks.
#3
Quote from: MEGAMIND on Oct 04, 2024, 09:45 AMis it right  or em a not aware of docs? wiki
Here is plugin's full documentation: https://github.com/sfwidde/vcmp-latest-features-for-squirrel
The plugin does not call any sort of custom events at all. However, what you want to do is achievable manually. Here's a quick example which worked for me pretty good:
// Grab internal function from sqlatestfeatures plugin.
local fn = SetVehicle3DArrowEnabled;
// Overwrite SetVehicle3DArrowEnabled function with our own.
function SetVehicle3DArrowEnabled(vehicleId, playerToShowId, enable)
{
// Call internal plugin function.
fn(vehicleId, playerToShowId, enable);
// Call our custom event.
onVehicle3DArrowSet(FindVehicle(vehicleId), FindPlayer(playerToShowId), enable);
}

/* CVehicle, CPlayer/null, bool */
function onVehicle3DArrowSet(vehicle, playerToShow, enable)
{
print("3D arrow " + (enable ? "enabled" : "disabled") + " " +
"for vehicle " + GetVehicleNameFromModel(vehicle.Model) + " (ID: " + vehicle.ID + "), " +
"which is shown to " + (playerToShow ? playerToShow.Name : "everyone") + ".");
}
which will call onVehicle3DArrowSet custom event every time you call SetVehicle3DArrowEnabled.

Also thanks @habi2 for providing a correct example on the usage of this function.
#4


Hi
With VC:MP's latest update (v0.4.7), there are new functionalities that were added to the server through the new plugin SDK. Unfortunately, official Squirrel module has not been updated in a while (6 years!), making these features inaccessible for Squirrel server developers. So, as a temporary solution to this problem, I've decided to make this plugin so that they can enjoy from these features on their servers too!

Downloads, documentation and more can be found here:
https://github.com/sfwidde/vcmp-latest-features-for-squirrel