31.03.2009, 18:44
This code is good
Quote:
/* xStreamer by Boylett */ #if defined _xstreamer_included #endinput #endif #define _xstreamer_included #pragma library xstreamer #include <a_samp> //------------------------------------------------------------------------------ #if !defined OBJECT_TIMER #define OBJECT_TIMER 350 #endif //------------------------------------------------------------------------------ native ConnectPlayer(playerid); native DisconnectPlayer(playerid); native StreamObjects(playerid,Float,Float:y,Float:z,vir tualworld,interior); native UpdateMovingObjects(); native xStreamer_Filterscript(); //------------------------------------------------------------------------------ forward sampCreatePlayerObject(playerid,modelid,Float,Fl oat:y,Float:z,Float:rx,Float:ry,Float:rz); forward sampDestroyPlayerObject(playerid,objectid); forward sampMovePlayerObject(playerid, objectid, Float:X, Float:Y, Float:Z, Float:Speed); forward sampStopPlayerObject(playerid,objectid); forward xStreamer_Run(); //------------------------------------------------------------------------------ public sampCreatePlayerObject(playerid,modelid,Float,Fl oat:y,Float:z,Float:rx,Float:ry,Float:rz) { //printf("CreatePlayerObject(%d,%d,%f,%f,%f,%f,%f,%f )",playerid,modelid,x,y,z,rx,ry,rz); CreateObject(8420, 1449.627441, -2437.310303, 12.577723, 0.0000, 0.0000, 0.0000); CreateObject(13645, 1731.734131, -2408.580566, 13.347546, 0.0000, 0.0000, 0.0000); CreateObject(13641, 1476.793091, -2533.844482, 14.266119, 0.0000, 0.0000, 0.0000); CreateObject(13641, 1477.230835, -2548.088623, 14.266119, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1443.581299, -2431.836426, 11.623968, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1456.222412, -2435.685059, 11.255226, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1447.109619, -2424.892334, 11.749369, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1443.084717, -2427.723877, 11.449373, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1438.554565, -2429.532959, 11.799367, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1429.948364, -2433.836670, 11.549371, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1436.023438, -2446.686768, 11.074379, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1423.596313, -2437.940918, 11.499373, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1419.057129, -2446.821777, 11.424374, 0.0000, 0.0000, 0.0000); CreateObject(17852, 1559.105713, -2631.316162, 17.038256, 0.0000, 0.0000, 0.0000); CreateObject(1634, 1700.639160, -2483.820068, 13.702007, 0.0000, 0.0000, 270.0000); CreateObject(1634, 1700.490601, -2502.650635, 13.852005, 0.0000, 0.0000, 270.0000); CreateObject(14637, 1412.737915, -2438.244629, 14.606047, 0.0000, 0.0000, 0.0000); CreateObject(9241, 1482.537720, -2405.896484, 14.071001, 0.0000, 0.0000, 0.0000); CreateObject(14467, 1415.955933, -2438.031006, 14.563492, 0.0000, 0.0000, 90.0000); CreateObject(10281, 1599.817139, -2628.308594, 14.860140, 0.0000, 0.0000, 180.0000); CreateObject(2745, 1580.119629, -2432.880127, 15.301968, 0.0000, 0.0000, 0.0000); CreateObject(967, 1428.246338, -2459.563965, 12.454689, 0.0000, 0.0000, 0.0000); CreateObject(13666, 1787.816162, -2492.823730, 17.360014, 0.0000, 0.0000, 90.0000); CreateObject(13592, 1988.770752, -2544.188477, 22.617504, 0.0000, 0.0000, 0.0000); CreateObject(10281, 2531.421143, -2338.737305, 24.229187, 0.0000, 0.0000, 78.7500); CreateObject(10281, 2540.855713, -2328.938477, 24.197447, 0.0000, 0.0000, 22.5000); CreateObject(16635, 2315.271240, -2120.542480, 13.162540, 0.0000, 0.0000, 33.7500); CreateObject(16635, 2317.924316, -2118.164795, 12.978258, 0.0000, 0.0000, 33.7500); CreateObject(16635, 2321.009277, -2116.168945, 12.991394, 0.0000, 0.0000, 33.7500); CreateObject(16635, 2324.108398, -2114.103516, 12.991394, 0.0000, 0.0000, 33.7500); CreateObject(13666, 1637.387939, -2586.846924, 16.902208, 0.0000, 0.0000, 101.2500); CreateObject(13666, 1692.322388, -2585.987305, 17.252203, 0.0000, 0.0000, 101.2500); CreateObject(13666, 1769.870117, -2583.136719, 17.152205, 0.0000, 0.0000, 90.0000); CreateObject(13666, 1864.417480, -2584.961426, 16.827209, 0.0000, 0.0000, 90.0000); CreateObject(13666, 2005.332642, -2583.370605, 17.227203, 0.0000, 0.0000, 90.0000); CreateObject(13666, 2002.181763, -2599.256348, 17.977192, 0.0000, 0.0000, 270.0000); CreateObject(13666, 1872.000122, -2602.058105, 16.802210, 0.0000, 0.0000, 270.0000); CreateObject(13666, 1769.648682, -2602.074707, 16.927208, 0.0000, 0.0000, 270.0000); CreateObject(13666, 1690.405396, -2600.334473, 17.102205, 0.0000, 0.0000, 270.0000); CreateObject(13666, 1637.881470, -2602.727539, 18.127190, 0.0000, 0.0000, 270.0000); CreateObject(1655, 1992.915771, -2493.549072, 13.389236, 0.0000, 0.0000, 270.0000); CreateObject(7979, 2128.414063, -2495.803955, 15.558836, 0.0000, 0.0000, 270.0000); CreateObject(18449, 1260.704224, -2740.842773, 900.024719, 0.0000, 0.0000, 0.0000); CreateObject(18449, 1193.718262, -2740.885986, 900.001648, 0.0000, 0.0000, 0.0000); CreateObject(8420, 1128.023071, -2728.945068, 900.165649, 0.0000, 0.0000, 0.0000); CreateObject(8040, 1611.608032, -3695.859375, 241.453094, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.751343, -3548.259277, 240.267303, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.809082, -3617.588623, 240.353836, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.778564, -3469.115967, 240.489960, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.788574, -3390.145020, 240.596344, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.772949, -3310.067383, 240.663681, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.764893, -3231.102295, 240.643082, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.879517, -3151.189697, 240.705109, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.848389, -3071.528564, 240.743713, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.871826, -2991.685303, 240.951813, 0.0000, 0.0000, 90.0000); CreateObject(1632, 1610.149658, -2958.567139, 241.945831, 0.0000, 0.0000, 0.0000); CreateObject(1632, 1614.271973, -2958.566162, 241.945648, 0.0000, 0.0000, 0.0000); return CreatePlayerObject(playerid,modelid,x,y,z,rx,ry,rz ); } public sampDestroyPlayerObject(playerid,objectid) { //printf("DestroyPlayerObject(%d,%d)",playerid,objec tid); return DestroyPlayerObject(playerid,objectid); } public sampMovePlayerObject(playerid, objectid, Float:X, Float:Y, Float:Z, Float:Speed) { //printf("MovePlayerObject(%d,%d,%f,%f,%f,%f)",playe rid, objectid, X, Y, Z, Speed); return MovePlayerObject(playerid, objectid, X, Y, Z, Speed); } public sampStopPlayerObject(playerid,objectid) { printf("StopPlayerObject(%d,%d)",playerid,objectid ); return StopPlayerObject(playerid,objectid); } public xStreamer_Run() { UpdateMovingObjects(); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { new Float, Float:y, Float:z; GetPlayerPos(i,x,y,z); StreamObjects(i,x,y,z,GetPlayerVirtualWorld(i),Get PlayerInterior(i)); } } return 1; } public OnFilterScriptInit() { SetTimer("xStreamer_Run",OBJECT_TIMER,1); xStreamer_Filterscript(); CreateObject(8420, 1449.627441, -2437.310303, 12.577723, 0.0000, 0.0000, 0.0000); CreateObject(13645, 1731.734131, -2408.580566, 13.347546, 0.0000, 0.0000, 0.0000); CreateObject(13641, 1476.793091, -2533.844482, 14.266119, 0.0000, 0.0000, 0.0000); CreateObject(13641, 1477.230835, -2548.088623, 14.266119, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1443.581299, -2431.836426, 11.623968, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1456.222412, -2435.685059, 11.255226, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1447.109619, -2424.892334, 11.749369, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1443.084717, -2427.723877, 11.449373, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1438.554565, -2429.532959, 11.799367, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1429.948364, -2433.836670, 11.549371, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1436.023438, -2446.686768, 11.074379, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1423.596313, -2437.940918, 11.499373, 0.0000, 0.0000, 0.0000); CreateObject(16135, 1419.057129, -2446.821777, 11.424374, 0.0000, 0.0000, 0.0000); CreateObject(17852, 1559.105713, -2631.316162, 17.038256, 0.0000, 0.0000, 0.0000); CreateObject(1634, 1700.639160, -2483.820068, 13.702007, 0.0000, 0.0000, 270.0000); CreateObject(1634, 1700.490601, -2502.650635, 13.852005, 0.0000, 0.0000, 270.0000); CreateObject(14637, 1412.737915, -2438.244629, 14.606047, 0.0000, 0.0000, 0.0000); CreateObject(9241, 1482.537720, -2405.896484, 14.071001, 0.0000, 0.0000, 0.0000); CreateObject(14467, 1415.955933, -2438.031006, 14.563492, 0.0000, 0.0000, 90.0000); CreateObject(10281, 1599.817139, -2628.308594, 14.860140, 0.0000, 0.0000, 180.0000); CreateObject(2745, 1580.119629, -2432.880127, 15.301968, 0.0000, 0.0000, 0.0000); CreateObject(967, 1428.246338, -2459.563965, 12.454689, 0.0000, 0.0000, 0.0000); CreateObject(13666, 1787.816162, -2492.823730, 17.360014, 0.0000, 0.0000, 90.0000); CreateObject(13592, 1988.770752, -2544.188477, 22.617504, 0.0000, 0.0000, 0.0000); CreateObject(10281, 2531.421143, -2338.737305, 24.229187, 0.0000, 0.0000, 78.7500); CreateObject(10281, 2540.855713, -2328.938477, 24.197447, 0.0000, 0.0000, 22.5000); CreateObject(16635, 2315.271240, -2120.542480, 13.162540, 0.0000, 0.0000, 33.7500); CreateObject(16635, 2317.924316, -2118.164795, 12.978258, 0.0000, 0.0000, 33.7500); CreateObject(16635, 2321.009277, -2116.168945, 12.991394, 0.0000, 0.0000, 33.7500); CreateObject(16635, 2324.108398, -2114.103516, 12.991394, 0.0000, 0.0000, 33.7500); CreateObject(13666, 1637.387939, -2586.846924, 16.902208, 0.0000, 0.0000, 101.2500); CreateObject(13666, 1692.322388, -2585.987305, 17.252203, 0.0000, 0.0000, 101.2500); CreateObject(13666, 1769.870117, -2583.136719, 17.152205, 0.0000, 0.0000, 90.0000); CreateObject(13666, 1864.417480, -2584.961426, 16.827209, 0.0000, 0.0000, 90.0000); CreateObject(13666, 2005.332642, -2583.370605, 17.227203, 0.0000, 0.0000, 90.0000); CreateObject(13666, 2002.181763, -2599.256348, 17.977192, 0.0000, 0.0000, 270.0000); CreateObject(13666, 1872.000122, -2602.058105, 16.802210, 0.0000, 0.0000, 270.0000); CreateObject(13666, 1769.648682, -2602.074707, 16.927208, 0.0000, 0.0000, 270.0000); CreateObject(13666, 1690.405396, -2600.334473, 17.102205, 0.0000, 0.0000, 270.0000); CreateObject(13666, 1637.881470, -2602.727539, 18.127190, 0.0000, 0.0000, 270.0000); CreateObject(1655, 1992.915771, -2493.549072, 13.389236, 0.0000, 0.0000, 270.0000); CreateObject(7979, 2128.414063, -2495.803955, 15.558836, 0.0000, 0.0000, 270.0000); CreateObject(18449, 1260.704224, -2740.842773, 900.024719, 0.0000, 0.0000, 0.0000); CreateObject(18449, 1193.718262, -2740.885986, 900.001648, 0.0000, 0.0000, 0.0000); CreateObject(8420, 1128.023071, -2728.945068, 900.165649, 0.0000, 0.0000, 0.0000); CreateObject(8040, 1611.608032, -3695.859375, 241.453094, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.751343, -3548.259277, 240.267303, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.809082, -3617.588623, 240.353836, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.778564, -3469.115967, 240.489960, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.788574, -3390.145020, 240.596344, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.772949, -3310.067383, 240.663681, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.764893, -3231.102295, 240.643082, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.879517, -3151.189697, 240.705109, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.848389, -3071.528564, 240.743713, 0.0000, 0.0000, 90.0000); CreateObject(18450, 1611.871826, -2991.685303, 240.951813, 0.0000, 0.0000, 90.0000); CreateObject(1632, 1610.149658, -2958.567139, 241.945831, 0.0000, 0.0000, 0.0000); CreateObject(1632, 1614.271973, -2958.566162, 241.945648, 0.0000, 0.0000, 0.0000); return 1; } public OnPlayerConnect(playerid) { ConnectPlayer(playerid); return 1; } public OnPlayerDisconnect(playerid,reason) { DisconnectPlayer(playerid); return 1; } |