02.09.2016, 15:46
Just replacing those two with these two will affect your performance greatly.
However judging by this piece of your code, I would say your whole GM is just as poorly-optimized as these.
PHP Code:
Float:GetDistanceBetweenPlayers(playerid,secondplayerid)
{
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(secondplayerid, pX, pY, pZ);
return GetPlayerDistanceFromPoint(playerid, pX, pY, pZ);
}
PHP Code:
GetPlayerSpeed(playerid)
{
new Float:ST[4];
if(IsPlayerInAnyVehicle(playerid))
GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
return Floatround(VectorSize(ST[0],ST[1],ST[2])*179.28625);
}