• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Long callback execution
#1
I am getting tons of long callback executions in my server logs, People told me the that I need to shorten my functions and optimize the code. This is one of the functions that also detects long callback execution. So I'm gonna need an example from this to fix the long execution. Hoping to get some help here.?



Code:
public OnPlayerExitVehicle(playerid, vehicleid)

{

? ? ? ? InCar[playerid] = 0;

? ? ? ? LastCar[playerid] = vehicleid;



? ? ? ? if(DeliveryMan[playerid])

? ? ? ? {

? ? ? ? ? ? for(new i; i<sizeof(BurritoSpawnInfo); i)

? ? ? ? ? ? {

? ? ? ? ? ? ? ? if(GetPlayerVehicleID(playerid) == Burrito_ID[i])

? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ? SendClientMessage(playerid, COLOR_COURIER, "* Press Y behind your vehicle to pickup the goods.");? ?

? ? ? ? ? ? ? ? }? ?

? ? ? ? ? ? }

? ? ? ? ? ?

? ? ? ? }

? ? ? ? return 1;

}
[Image: QIDa2vB.png]

  Reply


Messages In This Thread
Long callback execution - by Snow - 2021-05-02, 02:10 AM
RE: Long callback execution - by Y_Less - 2021-05-02, 07:29 PM
RE: Long callback execution - by kemper - 2021-05-02, 07:37 PM
RE: Long callback execution - by Y_Less - 2021-05-02, 11:32 PM
RE: Long callback execution - by Snow - 2021-05-03, 03:35 AM
RE: Long callback execution - by AbyssMorgan - 2021-05-03, 06:37 AM
RE: Long callback execution - by Y_Less - 2021-05-03, 01:19 PM
RE: Long callback execution - by Snow - 2021-05-03, 03:03 PM
RE: Long callback execution - by Y_Less - 2021-05-03, 03:48 PM
RE: Long callback execution - by Snow - 2021-05-03, 05:39 PM

Forum Jump: