28.05.2011, 04:50
Hello,
I made a /v command that can spawn vehicles by entering the vehicle model ID/name.
However I find that searching for the vehicle name is so slow that it freezes my server for a while.
Code for searching in my command currently:
I've benchmarked that code and it runs at around 1 time/ms!
Therefore I'd like to know if there's any faster method.
I made a /v command that can spawn vehicles by entering the vehicle model ID/name.
However I find that searching for the vehicle name is so slow that it freezes my server for a while.
Code for searching in my command currently:
pawn Код:
for(new i = 0;i < sizeof(vehiclename);i++)//212 vehicle names
if(strfind(vehiclename[i],params,true) != -1) break;
Therefore I'd like to know if there's any faster method.