• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Blog Post] Scripting API blog post discussion
#8
(2020-04-29, 02:16 PM)Expert* Wrote: Is GetPlayerVehicleID Player_ or Vehicle_ module ?

And how about SetVehicleParamsForPlayer, IsPlayerInAnyVehicle, IsPlayerInVehicle or SetVehicleParamsForPlayer ?



Vehicle_IsPlayerInside works fine, but Vehicle_IsPlayerInAny doesn't sound right.

Maybe we could use the first parameter to guess the moduel type when possible ?



And how about consistency ?

If we dont want to shorten names SetPlayerPos becomes Player_SetPosition, and i've used 'Pos' so many times that it just doesn't sound right.



You need to find out who is the 'subject' for the function to find out which to use.



1.?Player_GetVehicle sound's much better because you care more about the player being in a vehicle, not vehicle having that player in it.

2. Vehicle_SetParams (ForPlayer) (Whether it is merged or not is up to devs, but you are more interested about VEHICLE having these parameters, not player.)





Shortened names are not that good idea tbh. Yes, it is convenient saying Pos instead of position, but at the same time, it can easily turn into weird abbreviations that are non-descriptive.??

"SCM" and "SCMF" are some of the worst I have seen. It pretty much boils down to lazyness of typing a few more characters. If you wanna shorten it, you can always make your own macros, but I don't advise it.
[Image: qPwh60X.png]

  Reply


Messages In This Thread
Scripting API blog post discussion - by Y_Less - 2020-04-14, 07:00 PM
RE: API blog post discussion - by dreftas - 2020-04-14, 09:47 PM
RE: API blog post discussion - by Polygon - 2020-04-15, 12:24 AM
RE: API blog post discussion - by Riddick - 2020-04-15, 08:25 AM
RE: Scripting API blog post discussion - by EvilShadeZ - 2020-04-29, 04:00 PM
RE: Scripting API blog post discussion - by Josh - 2021-01-07, 04:44 PM

Forum Jump: