#include <a_samp>
#define TIMER 400
forward Update(); forward IsMesto(playerid, Float:r, Float:x, Float:y, Float:z); forward mIsPlayerConnected(playerid); forward mDestroyVehicle(vehicleid); forward mGetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); forward mCreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay);
native UpdateStrimer();
native UpdatePos(playerid,Float:x,Float:y,Float:z);
native mStreamerCheck();
native IsEnterInMysanVehicle(vehicleid);
native AddMysanVehicle(modelid,Float:x,Float:y,Float:z,Float:a,c1,c2);
native DeleteMysanVehicle(vehicleid);
native SetSpawnDist(Float:dist);
native GetMysanVehCount();
native GetMysanCash(playerid);
native GiveMysanCash(playerid, money);
native RemoveMysanCash(playerid);
native MysanOnline();
//public OnPlayerExitVehicle2(playerid, vehicleid, ispassenger)return DeleteMysanVehicle(vehicleid);
public Update(){
UpdateStrimer();for(new i = 0; i < MAX_PLAYERS; i++){if(IsPlayerConnected(i)){
new Float:x,Float:y,Float:z;GetPlayerPos(i,x,y,z);UpdatePos(i,x,y,z);}}return 1;}
public mDestroyVehicle(vehicleid)return DestroyVehicle(vehicleid);
public mIsPlayerConnected(playerid)return IsPlayerConnected(playerid);
public mCreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay)return CreateVehicle(vehicletype, x, y, z, rotation, color1, color2, respawn_delay);
public mGetPlayerPos(playerid, &Float:x, &Float:y, &Float:z)return GetPlayerPos(playerid, x, y, z);
public IsMesto(playerid, Float:r, Float:x, Float:y, Float:z)return IsPlayerInRangeOfPoint(playerid, r, x, y, z);
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)return IsEnterInMysanVehicle(vehicleid);
stock OGMI(){
SetTimer("Update",TIMER,1); //Обновление
mStreamerCheck(); //Проверка на наличие инклуда
GetMysanVehCount(); //Узнает количество транспорта на сервере и пишет в "черное окно"
SetSpawnDist(200);  //Дистранция видимости транспорта (чем меньше тем больше тачек,но рекомендуется 100-200).
return 1;
}
