Profiler Plugin results
#6

Just replacing those two with these two will affect your performance greatly.

PHP Code:
Float:GetDistanceBetweenPlayers(playerid,secondplayerid)
{
    new 
Float:pXFloat:pYFloat:pZ;
    
GetPlayerPos(secondplayeridpXpYpZ);
    return 
GetPlayerDistanceFromPoint(playeridpXpYpZ);

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);

However judging by this piece of your code, I would say your whole GM is just as poorly-optimized as these.
Reply


Messages In This Thread
Profiler Plugin results - by Penguin1997 - 02.09.2016, 08:10
Re: Profiler Plugin results - by PrO.GameR - 02.09.2016, 11:50
Re: Profiler Plugin results - by Penguin1997 - 02.09.2016, 12:25
Re: Profiler Plugin results - by Vince - 02.09.2016, 13:13
Re: Profiler Plugin results - by Penguin1997 - 02.09.2016, 14:57
Re: Profiler Plugin results - by PrO.GameR - 02.09.2016, 15:46
Re: Profiler Plugin results - by Penguin1997 - 03.09.2016, 06:30

Forum Jump:


Users browsing this thread: 2 Guest(s)