Zeex / sampgdk

Write SA-MP gamemodes in C/C++
http://zeex.github.io/sampgdk
Apache License 2.0
153 stars 83 forks source link

OnVehicleSirenStateChange change type from int to bool #209

Closed ghost closed 1 year ago

ghost commented 4 years ago

Hello See the documentation samp https://wiki.sa-mp.com/wiki/OnVehicleSirenStateChange

Method OnVehicleSirenStateChange has boolean parameter "new state" 0 - false 1 - true

Can you replace the type from an integer to a boolean?

Zeex commented 1 year ago

IIRC newstate was made an integer so that it could handle other values in the future besides 0 and 1. Like the name implies, it's not really a boolean but rather a state index. For example, at some point, the SA-MP devs could introduce newstate = 2 to handle a different state. I have no idea if this ever happens (probably not), but I'd like to not lock the parameter to just 0/1.

So I'll leave it as int. But thank you for the suggestion.