Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define MAX_POINTS (40001)
- #define MAX_POINTS_TO_STREAM (200)
- //#define PointWorld (10)
- //#define PointInterior (10)
- #define DeBug
- #include "D:\SA-MP_0.3X\include\Core\W_PS"
- #include "D:\CR-MP_Server\include\Core\streamer"
- public OnFilterScriptInit()
- {
- //==Test 1
- new tick=GetTickCount();
- for(new x=-1000; x < 1000;x+=10)for(new y=-1000; y < 1000;y+=10)CreatePoint(x, y, 10.0, 20.0);
- printf("Create W_Point %d",GetTickCount()-tick);
- tick=GetTickCount();
- for(new i; i < 1000;i++)GetPlayerPoint(0, 2);
- printf("GetW_Point %d",GetTickCount()-tick);
- //==Test 2
- tick=GetTickCount();
- for(new x=-1000; x < 1000;x+=10)for(new y=-1000; y < 1000;y+=10)CreateDynamicSphere(x, y, 10.0, 20.0);
- printf("Create Streamer %d",GetTickCount()-tick);
- tick=GetTickCount();
- for(new i; i < 1000;i++)IsPointInAnyDynamicArea(0.0, 0.0, 0.0);
- printf("GetStreamerPoint %d",GetTickCount()-tick);
- //==Test 3
- tick=GetTickCount();
- new Float:x=1000.0,Float:y,Point;
- for(new i; i < 1000;i++)
- for(new P=MAX_POINTS-Point_Points; P<MAX_POINTS;P++)
- {
- y=GetPlayerDistanceFromPoint(0, PointX[P], PointY[P], PointZ[P]);
- if(y < x)
- {
- x=y;
- Point=P;
- }
- }
- printf("GetClassicPoint %d",GetTickCount()-tick);
- //==
- DestroyAllPoint();
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement