Jump to content

Delete unneeded functions


12p

Recommended Posts

Posted (edited)

getAlivePlayers

getRandomPlayer

These functions can be easily done by using table functions. I think aren't necessary and could be deleted. I know there are some more, but I don't remember them now.

---------------------------

set/getPedRotation

set/getVehicleRotation

Why to use them? There is getElementRotation and setElementRotation!

Edited by Guest
Posted

I'd agree - I'd deprecate them and remove them in a future version. They're basically just really old functions from before we had written many other functions.

Posted

And there 2:

setPedRotation

getPedRotation

This is for Z only but why to use them? You can easily use that with getElementRotation and setElementRotation!

Posted
And there 2:

setPedRotation

getPedRotation

This is for Z only but why to use them? You can easily use that with getElementRotation and setElementRotation!

AFAIK, setElementRotation only has visual effects on peds and players.

  • 2 weeks later...
Posted

Do you know how many problems it would cause for the owners of servers if suddenly half their scripts stopped working because these functions would get removed? Most server owners can't script, and there really isn't much harm in them being there.

Posted

Yes but they MUST learn how to script. If not the server is n00b.

Aaaand the scripts can be easily fixed if there is that problem. I think you're exaggerating.

Posted

OMG you don't get me. I mean we should delete them because those are unneeded, but we can make a kind of "useful function" from it (so just we add the few lines that define the function and it will work anyway)

There is no need that it be a MTA Built-In function, because, For example:

getAlivePlayers can be easily made with the functions:

table = {} --table creating 
getElementsByType 
getElementHealth 
table.insert 

Posted

We've done that before - a lot more of MTA used to be hard coded. For example, the scoreboard used to be in C++, now it's in Lua.

Posted
I still don't see no point in deleting functions on C++ and then rewriting them in Lua...

I just wanna say 1 thing: Why to use those MTA functions if you can script them (and those functions are so easy to script...)? It would be like SA:MP, using functions like the "driving licenses system" I heard's, it can be done in MTA by scripting, no need it be a built-in function. As easy as that!

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...