Система подъездов вырезана с мода GreenTech RP.
Ко всем enum добавим:
Ко всем enum добавим:
enum paInfo
{
paID,
FloataiX,
FloataiY,
FloataiZ,
FloatavX,
FloatavY,
FloatavZ,
paInt,
paWorld,
pavWorld,
pavInt,
paPic,
paPic2
};
new Padik[1000][paInfo];
new AllPadik = 0;
В public OnPlayerKeyStateChange добавим:
{
paID,
FloataiX,
FloataiY,
FloataiZ,
FloatavX,
FloatavY,
FloatavZ,
paInt,
paWorld,
pavWorld,
pavInt,
paPic,
paPic2
};
new Padik[1000][paInfo];
new AllPadik = 0;
В public OnPlayerKeyStateChange добавим:
if(newkeys & KEY_SPRINT)
{
for(new padik = 1; padik <= AllPadik; padik++)
{
if(IsPlayerInRangeOfPoint(playerid,1.0,Padik[padik][pavX],Padik[padik][pavY],Padik[padik][pavZ]) && GetPlayerVirtualWorld(playerid) == Padik[padik][pavWorld])
{
SetPlayerPos(playerid,Padik[padik][paiX],Padik[padik][paiY],Padik[padik][paiZ]);
SetPlayerVirtualWorld(playerid,padik);
SetPlayerInterior(playerid,Padik[padik][paInt]);
return true;
}
}
for(new padik = 1; padik <= AllPadik; padik++)
{
if(IsPlayerInRangeOfPoint(playerid,1.0,Padik[padik][paiX],Padik[padik][paiY],Padik[padik][paiZ]) && GetPlayerVirtualWorld(playerid) == padik)
{
SetPlayerPos(playerid,Padik[padik][pavX],Padik[padik][pavY],Padik[padik][pavZ]);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
return true;
}
}
}
В public OnGameModeInit добавим:
{
for(new padik = 1; padik <= AllPadik; padik++)
{
if(IsPlayerInRangeOfPoint(playerid,1.0,Padik[padik][pavX],Padik[padik][pavY],Padik[padik][pavZ]) && GetPlayerVirtualWorld(playerid) == Padik[padik][pavWorld])
{
SetPlayerPos(playerid,Padik[padik][paiX],Padik[padik][paiY],Padik[padik][paiZ]);
SetPlayerVirtualWorld(playerid,padik);
SetPlayerInterior(playerid,Padik[padik][paInt]);
return true;
}
}
for(new padik = 1; padik <= AllPadik; padik++)
{
if(IsPlayerInRangeOfPoint(playerid,1.0,Padik[padik][paiX],Padik[padik][paiY],Padik[padik][paiZ]) && GetPlayerVirtualWorld(playerid) == padik)
{
SetPlayerPos(playerid,Padik[padik][pavX],Padik[padik][pavY],Padik[padik][pavZ]);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
return true;
}
}
}
В public OnGameModeInit добавим:
LoadPadik();
CreateObject(19456,2404.0556640,-2501.5244140,-49.9512590,0.0000000,0.0000000,0.0000000);
CreateObject(19456,2399.2790520,-2502.3972160,-49.5013040,0.0000000,0.0000000,90.0000680);
CreateObject(19456,2395.8164060,-2502.3913570,-46.0407210,0.0000000,0.0000000,90.0000610);
CreateObject(19456,2399.4208980,-2504.6062010,-46.3607210,0.0000000,0.0000000,0.0000000);
CreateObject(19456,2399.4221190,-2504.4069820,-42.9960210,0.0000000,0.0000000,0.0000000);
CreateObject(19456,2399.4416500,-2503.6320800,-39.8466410,0.0000000,0.0000000,0.0000000);
CreateObject(19456,2392.9204100,-2504.3752440,-48.1468390,0.0000000,0.0000000,0.0000000);
CreateObject(19456,2392.9013670,-2504.6726070,-44.7488320,0.0000000,0.0000000,0.0000000);
CreateObject(19456,2392.8918450,-2503.4831540,-41.2929030,0.0000000,0.0000000,0.0000000);
CreateObject(19456,2394.8007810,-2502.3869620,-42.5926970,0.0000000,0.0000000,89.9999920);
CreateObject(19456,2394.9157710,-2502.3784170,-39.8466300,0.0000000,0.0000000,90.0999830);
CreateObject(19456,2404.5100090,-2504.5771480,-49.9475590,0.0000000,0.0000000,-89.7999340);
CreateObject(19447,2393.5397940,-2505.1357420,-49.6008180,0.0000000,90.3000030,0.0000000);
CreateObject(19447,2398.8510740,-2503.1650390,-47.9452050,0.0000000,-90.1000360,0.0000000);
CreateObject(19447,2393.5446770,-2502.9123530,-46.2720290,0.0000000,-90.0999670,0.0000000);
CreateObject(19447,2398.8476560,-2503.3781730,-44.6119190,0.0000000,-89.9000470,0.0000000);
CreateObject(19447,2393.5490720,-2504.9941400,-42.9356340,0.0000000,-89.8999480,0.0000000);
CreateObject(19447,2398.8293450,-2503.9787590,-41.2753020,0.0000000,-90.0999670,0.0000000);
CreateObject(19428,2395.2666010,-2507.3757320,-49.4820820,0.0000000,0.0000000,0.0000000);
CreateObject(19428,2395.2763670,-2507.3803710,-46.0907470,0.0000000,0.0000000,0.0000000);
CreateObject(19428,2395.2863760,-2507.3862300,-42.6444960,0.0000000,0.0000000,0.0000000);
CreateObject(19428,2395.2878410,-2507.3955070,-39.9041360,0.0000000,0.0000000,0.0000000);
CreateObject(19428,2397.0422360,-2507.3544920,-49.4406350,0.0000000,0.0000000,0.0000000);
CreateObject(19428,2397.0371090,-2507.3576660,-45.9507100,0.0000000,0.0000000,0.0000000);
CreateObject(19428,2397.0332030,-2507.3664550,-42.4649770,0.0000000,0.0000000,0.0000000);
CreateObject(19428,2397.0305170,-2507.3872070,-39.8804470,0.0000000,0.0000000,0.0000000);
CreateObject(19437,2396.1635740,-2506.5764160,-49.7412750,0.0000000,0.0000000,89.8998480);
CreateObject(19437,2396.1625970,-2506.6330560,-46.2807040,0.0000000,0.0000000,-90.2000270);
CreateObject(19437,2396.1564940,-2506.6520990,-42.8436920,0.0000000,0.0000000,-90.1999810);
CreateObject(19437,2396.1579580,-2506.6582030,-39.9194100,0.0000000,0.0000000,-89.8999400);
CreateObject(19364,2399.7646480,-2506.1086420,-49.7912860,0.0000000,0.0000000,0.0000000);
CreateObject(19364,2398.1711420,-2507.8151850,-49.4512780,0.0000000,0.0000000,-89.9999160);
CreateObject(19364,2394.0383300,-2507.8266600,-48.0930700,0.0000000,0.0000000,90.0999140);
CreateObject(19364,2398.3181150,-2507.8242180,-46.4396590,0.0000000,0.0000000,-90.0000680);
CreateObject(19364,2394.0810540,-2507.8339840,-44.7452230,0.0000000,0.0000000,90.0000150);
CreateObject(19364,2398.2546380,-2507.8254390,-43.0748250,0.0000000,0.0000000,90.0000070);
CreateObject(19364,2394.4130850,-2507.8244620,-41.2909960,0.0000000,0.0000000,90.2000730);
CreateObject(19364,2398.5544430,-2507.9296870,-39.8496200,0.0000000,0.0000000,89.9000090);
CreateObject(19456,2392.8879390,-2505.0163570,-39.8514780,0.0000000,0.0000000,0.0000000);
CreateObject(19364,2394.3449700,-2507.8642570,-39.8410870,0.0000000,0.0000000,89.3999400);
CreateObject(19364,2393.7746580,-2502.4011230,-49.4965050,0.0000000,0.0000000,90.0000070);
CreateObject(1505,2393.1691890,-2502.4699700,-49.5528100,0.0000000,0.0000000,0.0000000);
CreateObject(1506,2393.3117670,-2507.7866210,-49.5688970,0.0000000,0.0000000,0.0000000);
CreateObject(1507,2397.3808590,-2507.7810050,-47.8806830,0.0000000,0.0000000,0.0000000);
CreateObject(1504,2397.5593260,-2502.4748530,-47.9207300,0.0000000,0.0000000,0.0000000);
CreateObject(1505,2393.1953120,-2502.4602050,-46.1954000,0.0000000,0.0000000,0.0000000);
CreateObject(1506,2393.2031250,-2507.7875970,-46.2140120,0.0000000,0.0000000,0.0000000);
CreateObject(1535,2403.9797360,-2502.8173820,-51.1848030,0.0000000,0.0000000,-89.3999170);
CreateObject(1507,2397.4746090,-2507.7832030,-44.5746610,0.0000000,0.0000000,0.0000000);
CreateObject(1505,2397.6252440,-2502.4707030,-44.5548320,0.0000000,0.0000000,0.0000000);
CreateObject(1505,2397.6516110,-2502.4731440,-41.2211790,0.0000000,0.0000000,0.0000000);
CreateObject(1504,2397.4299310,-2507.8820800,-41.2006600,0.0000000,0.0000000,0.0000000);
CreateObject(1507,2393.3029780,-2507.7770990,-42.8810110,0.0000000,0.0000000,0.0000000);
CreateObject(1506,2393.2597650,-2502.4553220,-42.9006500,0.0000000,0.0000000,0.0000000);
CreateObject(1504,2392.9680170,-2504.4577630,-49.5414000,0.0000000,0.0000000,-90.0999670);
CreateObject(1505,2399.3486320,-2504.1923820,-47.9107130,0.0000000,0.0000000,-90.0000000);
CreateObject(1504,2392.9704580,-2505.8403320,-46.2036780,0.0000000,0.0000000,89.9999080);
CreateObject(1506,2399.3476560,-2504.4848630,-44.5548510,-0.1999990,0.0000000,-90.1999890);
CreateObject(1504,2392.9667960,-2505.5620110,-42.8819990,0.0000000,0.0000000,90.0998610);
CreateObject(1506,2399.3742670,-2504.3386230,-41.2009960,0.0000000,0.0000000,-90.3999930);
CreateObject(19437,2397.1540520,-2503.0651850,-39.4912140,0.0000000,0.0000000,0.0000000);
CreateObject(19437,2397.1367180,-2503.9743650,-39.4897380,0.0000000,0.0000000,0.0000000);
CreateObject(19437,2403.1904290,-2503.3474120,-51.2468450,0.0000000,90.0999220,-90.2999950);
CreateObject(2078,2356.1794400,-2540.9333500,-67.9701000,0.0000000,0.0000000,0.0000000);
В public OnPlayerPickUpPickup добавим:
CreateObject(19456,2404.0556640,-2501.5244140,-49.9512590,0.0000000,0.0000000,0.0000000);
CreateObject(19456,2399.2790520,-2502.3972160,-49.5013040,0.0000000,0.0000000,90.0000680);
CreateObject(19456,2395.8164060,-2502.3913570,-46.0407210,0.0000000,0.0000000,90.0000610);
CreateObject(19456,2399.4208980,-2504.6062010,-46.3607210,0.0000000,0.0000000,0.0000000);
CreateObject(19456,2399.4221190,-2504.4069820,-42.9960210,0.0000000,0.0000000,0.0000000);
CreateObject(19456,2399.4416500,-2503.6320800,-39.8466410,0.0000000,0.0000000,0.0000000);
CreateObject(19456,2392.9204100,-2504.3752440,-48.1468390,0.0000000,0.0000000,0.0000000);
CreateObject(19456,2392.9013670,-2504.6726070,-44.7488320,0.0000000,0.0000000,0.0000000);
CreateObject(19456,2392.8918450,-2503.4831540,-41.2929030,0.0000000,0.0000000,0.0000000);
CreateObject(19456,2394.8007810,-2502.3869620,-42.5926970,0.0000000,0.0000000,89.9999920);
CreateObject(19456,2394.9157710,-2502.3784170,-39.8466300,0.0000000,0.0000000,90.0999830);
CreateObject(19456,2404.5100090,-2504.5771480,-49.9475590,0.0000000,0.0000000,-89.7999340);
CreateObject(19447,2393.5397940,-2505.1357420,-49.6008180,0.0000000,90.3000030,0.0000000);
CreateObject(19447,2398.8510740,-2503.1650390,-47.9452050,0.0000000,-90.1000360,0.0000000);
CreateObject(19447,2393.5446770,-2502.9123530,-46.2720290,0.0000000,-90.0999670,0.0000000);
CreateObject(19447,2398.8476560,-2503.3781730,-44.6119190,0.0000000,-89.9000470,0.0000000);
CreateObject(19447,2393.5490720,-2504.9941400,-42.9356340,0.0000000,-89.8999480,0.0000000);
CreateObject(19447,2398.8293450,-2503.9787590,-41.2753020,0.0000000,-90.0999670,0.0000000);
CreateObject(19428,2395.2666010,-2507.3757320,-49.4820820,0.0000000,0.0000000,0.0000000);
CreateObject(19428,2395.2763670,-2507.3803710,-46.0907470,0.0000000,0.0000000,0.0000000);
CreateObject(19428,2395.2863760,-2507.3862300,-42.6444960,0.0000000,0.0000000,0.0000000);
CreateObject(19428,2395.2878410,-2507.3955070,-39.9041360,0.0000000,0.0000000,0.0000000);
CreateObject(19428,2397.0422360,-2507.3544920,-49.4406350,0.0000000,0.0000000,0.0000000);
CreateObject(19428,2397.0371090,-2507.3576660,-45.9507100,0.0000000,0.0000000,0.0000000);
CreateObject(19428,2397.0332030,-2507.3664550,-42.4649770,0.0000000,0.0000000,0.0000000);
CreateObject(19428,2397.0305170,-2507.3872070,-39.8804470,0.0000000,0.0000000,0.0000000);
CreateObject(19437,2396.1635740,-2506.5764160,-49.7412750,0.0000000,0.0000000,89.8998480);
CreateObject(19437,2396.1625970,-2506.6330560,-46.2807040,0.0000000,0.0000000,-90.2000270);
CreateObject(19437,2396.1564940,-2506.6520990,-42.8436920,0.0000000,0.0000000,-90.1999810);
CreateObject(19437,2396.1579580,-2506.6582030,-39.9194100,0.0000000,0.0000000,-89.8999400);
CreateObject(19364,2399.7646480,-2506.1086420,-49.7912860,0.0000000,0.0000000,0.0000000);
CreateObject(19364,2398.1711420,-2507.8151850,-49.4512780,0.0000000,0.0000000,-89.9999160);
CreateObject(19364,2394.0383300,-2507.8266600,-48.0930700,0.0000000,0.0000000,90.0999140);
CreateObject(19364,2398.3181150,-2507.8242180,-46.4396590,0.0000000,0.0000000,-90.0000680);
CreateObject(19364,2394.0810540,-2507.8339840,-44.7452230,0.0000000,0.0000000,90.0000150);
CreateObject(19364,2398.2546380,-2507.8254390,-43.0748250,0.0000000,0.0000000,90.0000070);
CreateObject(19364,2394.4130850,-2507.8244620,-41.2909960,0.0000000,0.0000000,90.2000730);
CreateObject(19364,2398.5544430,-2507.9296870,-39.8496200,0.0000000,0.0000000,89.9000090);
CreateObject(19456,2392.8879390,-2505.0163570,-39.8514780,0.0000000,0.0000000,0.0000000);
CreateObject(19364,2394.3449700,-2507.8642570,-39.8410870,0.0000000,0.0000000,89.3999400);
CreateObject(19364,2393.7746580,-2502.4011230,-49.4965050,0.0000000,0.0000000,90.0000070);
CreateObject(1505,2393.1691890,-2502.4699700,-49.5528100,0.0000000,0.0000000,0.0000000);
CreateObject(1506,2393.3117670,-2507.7866210,-49.5688970,0.0000000,0.0000000,0.0000000);
CreateObject(1507,2397.3808590,-2507.7810050,-47.8806830,0.0000000,0.0000000,0.0000000);
CreateObject(1504,2397.5593260,-2502.4748530,-47.9207300,0.0000000,0.0000000,0.0000000);
CreateObject(1505,2393.1953120,-2502.4602050,-46.1954000,0.0000000,0.0000000,0.0000000);
CreateObject(1506,2393.2031250,-2507.7875970,-46.2140120,0.0000000,0.0000000,0.0000000);
CreateObject(1535,2403.9797360,-2502.8173820,-51.1848030,0.0000000,0.0000000,-89.3999170);
CreateObject(1507,2397.4746090,-2507.7832030,-44.5746610,0.0000000,0.0000000,0.0000000);
CreateObject(1505,2397.6252440,-2502.4707030,-44.5548320,0.0000000,0.0000000,0.0000000);
CreateObject(1505,2397.6516110,-2502.4731440,-41.2211790,0.0000000,0.0000000,0.0000000);
CreateObject(1504,2397.4299310,-2507.8820800,-41.2006600,0.0000000,0.0000000,0.0000000);
CreateObject(1507,2393.3029780,-2507.7770990,-42.8810110,0.0000000,0.0000000,0.0000000);
CreateObject(1506,2393.2597650,-2502.4553220,-42.9006500,0.0000000,0.0000000,0.0000000);
CreateObject(1504,2392.9680170,-2504.4577630,-49.5414000,0.0000000,0.0000000,-90.0999670);
CreateObject(1505,2399.3486320,-2504.1923820,-47.9107130,0.0000000,0.0000000,-90.0000000);
CreateObject(1504,2392.9704580,-2505.8403320,-46.2036780,0.0000000,0.0000000,89.9999080);
CreateObject(1506,2399.3476560,-2504.4848630,-44.5548510,-0.1999990,0.0000000,-90.1999890);
CreateObject(1504,2392.9667960,-2505.5620110,-42.8819990,0.0000000,0.0000000,90.0998610);
CreateObject(1506,2399.3742670,-2504.3386230,-41.2009960,0.0000000,0.0000000,-90.3999930);
CreateObject(19437,2397.1540520,-2503.0651850,-39.4912140,0.0000000,0.0000000,0.0000000);
CreateObject(19437,2397.1367180,-2503.9743650,-39.4897380,0.0000000,0.0000000,0.0000000);
CreateObject(19437,2403.1904290,-2503.3474120,-51.2468450,0.0000000,90.0999220,-90.2999950);
CreateObject(2078,2356.1794400,-2540.9333500,-67.9701000,0.0000000,0.0000000,0.0000000);
В public OnPlayerPickUpPickup добавим:
for(new padik = 1; padik <= AllPadik; padik++)
{
if(IsPlayerInRangeOfPoint(playerid,1.0,Padik[padik][pavX],Padik[padik][pavY],Padik[padik][pavZ] ))
{
GameTextForPlayer(playerid,"~w~нажмите ~g~~k~~PED_SPRINT~",5000,1);
return true;
}
else if(IsPlayerInRangeOfPoint(playerid,1.0,Padik[padik][paiX],Padik[padik][paiY],Padik[padik][paiZ] ))
{
GameTextForPlayer(playerid,"~w~нажмите ~g~~k~~PED_SPRINT~",5000,1);
return true;
}
}
В public OnPlayerCommandText добавим команду на создание подъезда:
{
if(IsPlayerInRangeOfPoint(playerid,1.0,Padik[padik][pavX],Padik[padik][pavY],Padik[padik][pavZ] ))
{
GameTextForPlayer(playerid,"~w~нажмите ~g~~k~~PED_SPRINT~",5000,1);
return true;
}
else if(IsPlayerInRangeOfPoint(playerid,1.0,Padik[padik][paiX],Padik[padik][paiY],Padik[padik][paiZ] ))
{
GameTextForPlayer(playerid,"~w~нажмите ~g~~k~~PED_SPRINT~",5000,1);
return true;
}
}
В public OnPlayerCommandText добавим команду на создание подъезда:
if(strcmp(cmd, "/createpadik", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 10) return SendClientMessage(playerid,-1,"[Сервер]: У вас нет прав на использование этой команды!");
AllPadik++;
GetPlayerPos(playerid, Padik[AllPadik][pavX],Padik[AllPadik][pavY],Padik[AllPadik][pavZ]);
Padik[AllPadik][paiX] = 2403.1;
Padik[AllPadik][paiY] = -2503.5;
Padik[AllPadik][paiZ] = -50.1;
Padik[AllPadik][paInt] = 4;
Padik[AllPadik][pavWorld] = GetPlayerVirtualWorld(playerid);
Padik[AllPadik][pavInt] = GetPlayerInterior(playerid);
new iniOpen = ini_openFile("Padik.cfg");
ini_setInteger(iniOpen, "AllPadik", AllPadik);
ini_closeFile(iniOpen);
SavePadik(AllPadik);
UpdatePadik(AllPadik);
Padik[AllPadik][paPic] = CreateDynamicPickup(1318, 1, Padik[AllPadik][pavX], Padik[AllPadik][pavY], Padik[AllPadik][pavZ],Padik[AllPadik][pavWorld],Padik[AllPadik][pavInt]);
Padik[AllPadik][paPic2] = CreateDynamicPickup(1318, 1, Padik[AllPadik][paiX], Padik[AllPadik][paiY], Padik[AllPadik][paiZ], AllPadik, Padik[AllPadik][paInt]);
SendClientMessage(playerid,COLOR_GRAD2,"[Сервер]: Вы успешно создали подъезд!");
new p[64];
format(p,64,"{FF0000}Подъезд номер: {33AA33}%d",AllPadik);
Create3DTextLabel(p,COLOR_BLUE,Padik[AllPadik][pavX], Padik[AllPadik][pavY], Padik[AllPadik][pavZ],50.0,0,1);
return true;
}
В самый конец мода добавим:
{
if(PlayerInfo[playerid][pAdmin] < 10) return SendClientMessage(playerid,-1,"[Сервер]: У вас нет прав на использование этой команды!");
AllPadik++;
GetPlayerPos(playerid, Padik[AllPadik][pavX],Padik[AllPadik][pavY],Padik[AllPadik][pavZ]);
Padik[AllPadik][paiX] = 2403.1;
Padik[AllPadik][paiY] = -2503.5;
Padik[AllPadik][paiZ] = -50.1;
Padik[AllPadik][paInt] = 4;
Padik[AllPadik][pavWorld] = GetPlayerVirtualWorld(playerid);
Padik[AllPadik][pavInt] = GetPlayerInterior(playerid);
new iniOpen = ini_openFile("Padik.cfg");
ini_setInteger(iniOpen, "AllPadik", AllPadik);
ini_closeFile(iniOpen);
SavePadik(AllPadik);
UpdatePadik(AllPadik);
Padik[AllPadik][paPic] = CreateDynamicPickup(1318, 1, Padik[AllPadik][pavX], Padik[AllPadik][pavY], Padik[AllPadik][pavZ],Padik[AllPadik][pavWorld],Padik[AllPadik][pavInt]);
Padik[AllPadik][paPic2] = CreateDynamicPickup(1318, 1, Padik[AllPadik][paiX], Padik[AllPadik][paiY], Padik[AllPadik][paiZ], AllPadik, Padik[AllPadik][paInt]);
SendClientMessage(playerid,COLOR_GRAD2,"[Сервер]: Вы успешно создали подъезд!");
new p[64];
format(p,64,"{FF0000}Подъезд номер: {33AA33}%d",AllPadik);
Create3DTextLabel(p,COLOR_BLUE,Padik[AllPadik][pavX], Padik[AllPadik][pavY], Padik[AllPadik][pavZ],50.0,0,1);
return true;
}
В самый конец мода добавим:
stock LoadPadik()
{
new ids[32];
new iniOpens = ini_openFile("Padik.cfg");
ini_getInteger(iniOpens, "AllPadik", AllPadik);
ini_closeFile(iniOpens);
if(AllPadik != 0)
{
for(new padik = 1; padik <= AllPadik; padik++)
{
format(ids,sizeof(ids),"Padik/%d.ini",padik);
new iniOpen = ini_openFile(ids);
ini_getFloat(iniOpen, "paiX", Padik[padik][paiX]);
ini_getFloat(iniOpen, "paiY", Padik[padik][paiY]);
ini_getFloat(iniOpen, "paiZ", Padik[padik][paiZ]);
ini_getFloat(iniOpen, "pavX", Padik[padik][pavX]);
ini_getFloat(iniOpen, "pavY", Padik[padik][pavY]);
ini_getFloat(iniOpen, "pavZ", Padik[padik][pavZ]);
ini_getInteger(iniOpen, "paInt", Padik[padik][paInt]);
ini_getInteger(iniOpen, "pavWorld", Padik[padik][pavWorld]);
ini_getInteger(iniOpen, "pavInt", Padik[padik][pavInt]);
ini_closeFile(iniOpen);
new p[64];
format(p,64,"{FF0000}Подъезд номер: {33AA33}%d",padik);
Create3DTextLabel(p,COLOR_BLUE,Padik[padik][pavX], Padik[padik][pavY], Padik[padik][pavZ],50.0,0,1);
Padik[padik][paPic] = CreateDynamicPickup(1318, 1, Padik[padik][pavX], Padik[padik][pavY], Padik[padik][pavZ],Padik[padik][pavWorld],Padik[padik][pavInt]);
Padik[padik][paPic2] = CreateDynamicPickup(1318, 1, Padik[padik][paiX], Padik[padik][paiY], Padik[padik][paiZ], padik, Padik[padik][paInt]);
}
}
return true;
}
Интерьер подъезда:
{
new ids[32];
new iniOpens = ini_openFile("Padik.cfg");
ini_getInteger(iniOpens, "AllPadik", AllPadik);
ini_closeFile(iniOpens);
if(AllPadik != 0)
{
for(new padik = 1; padik <= AllPadik; padik++)
{
format(ids,sizeof(ids),"Padik/%d.ini",padik);
new iniOpen = ini_openFile(ids);
ini_getFloat(iniOpen, "paiX", Padik[padik][paiX]);
ini_getFloat(iniOpen, "paiY", Padik[padik][paiY]);
ini_getFloat(iniOpen, "paiZ", Padik[padik][paiZ]);
ini_getFloat(iniOpen, "pavX", Padik[padik][pavX]);
ini_getFloat(iniOpen, "pavY", Padik[padik][pavY]);
ini_getFloat(iniOpen, "pavZ", Padik[padik][pavZ]);
ini_getInteger(iniOpen, "paInt", Padik[padik][paInt]);
ini_getInteger(iniOpen, "pavWorld", Padik[padik][pavWorld]);
ini_getInteger(iniOpen, "pavInt", Padik[padik][pavInt]);
ini_closeFile(iniOpen);
new p[64];
format(p,64,"{FF0000}Подъезд номер: {33AA33}%d",padik);
Create3DTextLabel(p,COLOR_BLUE,Padik[padik][pavX], Padik[padik][pavY], Padik[padik][pavZ],50.0,0,1);
Padik[padik][paPic] = CreateDynamicPickup(1318, 1, Padik[padik][pavX], Padik[padik][pavY], Padik[padik][pavZ],Padik[padik][pavWorld],Padik[padik][pavInt]);
Padik[padik][paPic2] = CreateDynamicPickup(1318, 1, Padik[padik][paiX], Padik[padik][paiY], Padik[padik][paiZ], padik, Padik[padik][paInt]);
}
}
return true;
Код:
stock UpdatePadik(padik)
{
DestroyDynamicPickup(Padik[padik][paPic]);
DestroyDynamicPickup(Padik[padik][paPic2]);
new p[64];
format(p,64,"{FF0000}Подъезд номер: {33AA33}%d",padik);
Create3DTextLabel(p,COLOR_BLUE,Padik[padik][pavX], Padik[padik][pavY], Padik[padik][pavZ],Padik[padik][pavWorld],Padik[padik][pavInt]);
Padik[padik][paPic] = CreateDynamicPickup(1318, 1, Padik[padik][pavX], Padik[padik][pavY], Padik[padik][pavZ],Padik[padik][pavWorld],Padik[padik][pavInt]);
Padik[padik][paPic2] = CreateDynamicPickup(1318, 1, Padik[padik][paiX], Padik[padik][paiY], Padik[padik][paiZ], padik, Padik[padik][paInt]);
return true;
Код:
stock SavePadik(padik)
{
new ids[32];
format(ids,sizeof(ids),"Padik/%d.ini",padik);
new iniOpen;
iniOpen = ini_openFile(ids);
if(iniOpen == -1 || iniOpen == -2) iniOpen = ini_createFile(ids);
ini_setFloat(iniOpen, "paiX", Padik[padik][paiX]);
ini_setFloat(iniOpen, "paiY", Padik[padik][paiY]);
ini_setFloat(iniOpen, "paiZ", Padik[padik][paiZ]);
ini_setFloat(iniOpen, "pavX", Padik[padik][pavX]);
ini_setFloat(iniOpen, "pavY", Padik[padik][pavY]);
ini_setFloat(iniOpen, "pavZ", Padik[padik][pavZ]);
ini_setInteger(iniOpen, "paInt", Padik[padik][paInt]);
ini_setInteger(iniOpen, "pavWorld", Padik[padik][pavWorld]);
ini_setInteger(iniOpen, "pavInt", Padik[padik][pavInt]);
ini_closeFile(iniOpen);
return true;
}
Интерьер подъезда:
CreateObject(2078,2356.1794400,-2540.9333500,-67.9701000,0.0000000,0.0000000,0.0000000); //
CreateObject(19456,2404.0556640,-2501.5244140,-49.9512590,0.0000000,0.0000000,0.0000000); //
CreateObject(19456,2399.2790520,-2502.3972160,-49.5013040,0.0000000,0.0000000,90.0000680); //
CreateObject(19456,2395.8164060,-2502.3913570,-46.0407210,0.0000000,0.0000000,90.0000610); //
CreateObject(19456,2399.4208980,-2504.6062010,-46.3607210,0.0000000,0.0000000,0.0000000); //
CreateObject(19456,2399.4221190,-2504.4069820,-42.9960210,0.0000000,0.0000000,0.0000000); //
CreateObject(19456,2399.4416500,-2503.6320800,-39.8466410,0.0000000,0.0000000,0.0000000); //
CreateObject(19456,2392.9204100,-2504.3752440,-48.1468390,0.0000000,0.0000000,0.0000000); //
CreateObject(19456,2392.9013670,-2504.6726070,-44.7488320,0.0000000,0.0000000,0.0000000); //
CreateObject(19456,2392.8918450,-2503.4831540,-41.2929030,0.0000000,0.0000000,0.0000000); //
CreateObject(19456,2394.8007810,-2502.3869620,-42.5926970,0.0000000,0.0000000,89.9999920); //
CreateObject(19456,2394.9157710,-2502.3784170,-39.8466300,0.0000000,0.0000000,90.0999830); //
CreateObject(19456,2404.5100090,-2504.5771480,-49.9475590,0.0000000,0.0000000,-89.7999340); //
CreateObject(19447,2393.5397940,-2505.1357420,-49.6008180,0.0000000,90.3000030,0.0000000); //
CreateObject(19447,2398.8510740,-2503.1650390,-47.9452050,0.0000000,-90.1000360,0.0000000); //
CreateObject(19447,2393.5446770,-2502.9123530,-46.2720290,0.0000000,-90.0999670,0.0000000); //
CreateObject(19447,2398.8476560,-2503.3781730,-44.6119190,0.0000000,-89.9000470,0.0000000); //
CreateObject(19447,2393.5490720,-2504.9941400,-42.9356340,0.0000000,-89.8999480,0.0000000); //
CreateObject(19447,2398.8293450,-2503.9787590,-41.2753020,0.0000000,-90.0999670,0.0000000); //
CreateObject(19428,2395.2666010,-2507.3757320,-49.4820820,0.0000000,0.0000000,0.0000000); //
CreateObject(19428,2395.2763670,-2507.3803710,-46.0907470,0.0000000,0.0000000,0.0000000); //
CreateObject(19428,2395.2863760,-2507.3862300,-42.6444960,0.0000000,0.0000000,0.0000000); //
CreateObject(19428,2395.2878410,-2507.3955070,-39.9041360,0.0000000,0.0000000,0.0000000); //
CreateObject(19428,2397.0422360,-2507.3544920,-49.4406350,0.0000000,0.0000000,0.0000000); //
CreateObject(19428,2397.0371090,-2507.3576660,-45.9507100,0.0000000,0.0000000,0.0000000); //
CreateObject(19428,2397.0332030,-2507.3664550,-42.4649770,0.0000000,0.0000000,0.0000000); //
CreateObject(19428,2397.0305170,-2507.3872070,-39.8804470,0.0000000,0.0000000,0.0000000); //
CreateObject(19437,2396.1635740,-2506.5764160,-49.7412750,0.0000000,0.0000000,89.8998480); //
CreateObject(19437,2396.1625970,-2506.6330560,-46.2807040,0.0000000,0.0000000,-90.2000270); //
CreateObject(19437,2396.1564940,-2506.6520990,-42.8436920,0.0000000,0.0000000,-90.1999810); //
CreateObject(19437,2396.1579580,-2506.6582030,-39.9194100,0.0000000,0.0000000,-89.8999400); //
CreateObject(19364,2399.7646480,-2506.1086420,-49.7912860,0.0000000,0.0000000,0.0000000); //
CreateObject(19364,2398.1711420,-2507.8151850,-49.4512780,0.0000000,0.0000000,-89.9999160); //
CreateObject(19364,2394.0383300,-2507.8266600,-48.0930700,0.0000000,0.0000000,90.0999140); //
CreateObject(19364,2398.3181150,-2507.8242180,-46.4396590,0.0000000,0.0000000,-90.0000680); //
CreateObject(19364,2394.0810540,-2507.8339840,-44.7452230,0.0000000,0.0000000,90.0000150); //
CreateObject(19364,2398.2546380,-2507.8254390,-43.0748250,0.0000000,0.0000000,90.0000070); //
CreateObject(19364,2394.4130850,-2507.8244620,-41.2909960,0.0000000,0.0000000,90.2000730); //
CreateObject(19364,2398.5544430,-2507.9296870,-39.8496200,0.0000000,0.0000000,89.9000090); //
CreateObject(19456,2392.8879390,-2505.0163570,-39.8514780,0.0000000,0.0000000,0.0000000); //
CreateObject(19364,2394.3449700,-2507.8642570,-39.8410870,0.0000000,0.0000000,89.3999400); //
CreateObject(19364,2393.7746580,-2502.4011230,-49.4965050,0.0000000,0.0000000,90.0000070); //
CreateObject(1505,2393.1691890,-2502.4699700,-49.5528100,0.0000000,0.0000000,0.0000000); //
CreateObject(1506,2393.3117670,-2507.7866210,-49.5688970,0.0000000,0.0000000,0.0000000); //
CreateObject(1507,2397.3808590,-2507.7810050,-47.8806830,0.0000000,0.0000000,0.0000000); //
CreateObject(1504,2397.5593260,-2502.4748530,-47.9207300,0.0000000,0.0000000,0.0000000); //
CreateObject(1505,2393.1953120,-2502.4602050,-46.1954000,0.0000000,0.0000000,0.0000000); //
CreateObject(1506,2393.2031250,-2507.7875970,-46.2140120,0.0000000,0.0000000,0.0000000); //
CreateObject(1535,2403.9797360,-2502.8173820,-51.1848030,0.0000000,0.0000000,-89.3999170); //
CreateObject(1507,2397.4746090,-2507.7832030,-44.5746610,0.0000000,0.0000000,0.0000000); //
CreateObject(1505,2397.6252440,-2502.4707030,-44.5548320,0.0000000,0.0000000,0.0000000); //
CreateObject(1505,2397.6516110,-2502.4731440,-41.2211790,0.0000000,0.0000000,0.0000000); //
CreateObject(1504,2397.4299310,-2507.8820800,-41.2006600,0.0000000,0.0000000,0.0000000); //
CreateObject(1507,2393.3029780,-2507.7770990,-42.8810110,0.0000000,0.0000000,0.0000000); //
CreateObject(1506,2393.2597650,-2502.4553220,-42.9006500,0.0000000,0.0000000,0.0000000); //
CreateObject(1504,2392.9680170,-2504.4577630,-49.5414000,0.0000000,0.0000000,-90.0999670); //
CreateObject(1505,2399.3486320,-2504.1923820,-47.9107130,0.0000000,0.0000000,-90.0000000); //
CreateObject(1504,2392.9704580,-2505.8403320,-46.2036780,0.0000000,0.0000000,89.9999080); //
CreateObject(1506,2399.3476560,-2504.4848630,-44.5548510,-0.1999990,0.0000000,-90.1999890); //
CreateObject(1504,2392.9667960,-2505.5620110,-42.8819990,0.0000000,0.0000000,90.0998610); //
CreateObject(1506,2399.3742670,-2504.3386230,-41.2009960,0.0000000,0.0000000,-90.3999930); //
CreateObject(19437,2397.1540520,-2503.0651850,-39.4912140,0.0000000,0.0000000,0.0000000); //
CreateObject(19437,2397.1367180,-2503.9743650,-39.4897380,0.0000000,0.0000000,0.0000000); //
CreateObject(19437,2403.1904290,-2503.3474120,-51.2468450,0.0000000,90.0999220,-90.2999950); //
В папку scriptfiles добавьте папку Padik и текст. Padik.cfg
Автор: Krut
CreateObject(19456,2404.0556640,-2501.5244140,-49.9512590,0.0000000,0.0000000,0.0000000); //
CreateObject(19456,2399.2790520,-2502.3972160,-49.5013040,0.0000000,0.0000000,90.0000680); //
CreateObject(19456,2395.8164060,-2502.3913570,-46.0407210,0.0000000,0.0000000,90.0000610); //
CreateObject(19456,2399.4208980,-2504.6062010,-46.3607210,0.0000000,0.0000000,0.0000000); //
CreateObject(19456,2399.4221190,-2504.4069820,-42.9960210,0.0000000,0.0000000,0.0000000); //
CreateObject(19456,2399.4416500,-2503.6320800,-39.8466410,0.0000000,0.0000000,0.0000000); //
CreateObject(19456,2392.9204100,-2504.3752440,-48.1468390,0.0000000,0.0000000,0.0000000); //
CreateObject(19456,2392.9013670,-2504.6726070,-44.7488320,0.0000000,0.0000000,0.0000000); //
CreateObject(19456,2392.8918450,-2503.4831540,-41.2929030,0.0000000,0.0000000,0.0000000); //
CreateObject(19456,2394.8007810,-2502.3869620,-42.5926970,0.0000000,0.0000000,89.9999920); //
CreateObject(19456,2394.9157710,-2502.3784170,-39.8466300,0.0000000,0.0000000,90.0999830); //
CreateObject(19456,2404.5100090,-2504.5771480,-49.9475590,0.0000000,0.0000000,-89.7999340); //
CreateObject(19447,2393.5397940,-2505.1357420,-49.6008180,0.0000000,90.3000030,0.0000000); //
CreateObject(19447,2398.8510740,-2503.1650390,-47.9452050,0.0000000,-90.1000360,0.0000000); //
CreateObject(19447,2393.5446770,-2502.9123530,-46.2720290,0.0000000,-90.0999670,0.0000000); //
CreateObject(19447,2398.8476560,-2503.3781730,-44.6119190,0.0000000,-89.9000470,0.0000000); //
CreateObject(19447,2393.5490720,-2504.9941400,-42.9356340,0.0000000,-89.8999480,0.0000000); //
CreateObject(19447,2398.8293450,-2503.9787590,-41.2753020,0.0000000,-90.0999670,0.0000000); //
CreateObject(19428,2395.2666010,-2507.3757320,-49.4820820,0.0000000,0.0000000,0.0000000); //
CreateObject(19428,2395.2763670,-2507.3803710,-46.0907470,0.0000000,0.0000000,0.0000000); //
CreateObject(19428,2395.2863760,-2507.3862300,-42.6444960,0.0000000,0.0000000,0.0000000); //
CreateObject(19428,2395.2878410,-2507.3955070,-39.9041360,0.0000000,0.0000000,0.0000000); //
CreateObject(19428,2397.0422360,-2507.3544920,-49.4406350,0.0000000,0.0000000,0.0000000); //
CreateObject(19428,2397.0371090,-2507.3576660,-45.9507100,0.0000000,0.0000000,0.0000000); //
CreateObject(19428,2397.0332030,-2507.3664550,-42.4649770,0.0000000,0.0000000,0.0000000); //
CreateObject(19428,2397.0305170,-2507.3872070,-39.8804470,0.0000000,0.0000000,0.0000000); //
CreateObject(19437,2396.1635740,-2506.5764160,-49.7412750,0.0000000,0.0000000,89.8998480); //
CreateObject(19437,2396.1625970,-2506.6330560,-46.2807040,0.0000000,0.0000000,-90.2000270); //
CreateObject(19437,2396.1564940,-2506.6520990,-42.8436920,0.0000000,0.0000000,-90.1999810); //
CreateObject(19437,2396.1579580,-2506.6582030,-39.9194100,0.0000000,0.0000000,-89.8999400); //
CreateObject(19364,2399.7646480,-2506.1086420,-49.7912860,0.0000000,0.0000000,0.0000000); //
CreateObject(19364,2398.1711420,-2507.8151850,-49.4512780,0.0000000,0.0000000,-89.9999160); //
CreateObject(19364,2394.0383300,-2507.8266600,-48.0930700,0.0000000,0.0000000,90.0999140); //
CreateObject(19364,2398.3181150,-2507.8242180,-46.4396590,0.0000000,0.0000000,-90.0000680); //
CreateObject(19364,2394.0810540,-2507.8339840,-44.7452230,0.0000000,0.0000000,90.0000150); //
CreateObject(19364,2398.2546380,-2507.8254390,-43.0748250,0.0000000,0.0000000,90.0000070); //
CreateObject(19364,2394.4130850,-2507.8244620,-41.2909960,0.0000000,0.0000000,90.2000730); //
CreateObject(19364,2398.5544430,-2507.9296870,-39.8496200,0.0000000,0.0000000,89.9000090); //
CreateObject(19456,2392.8879390,-2505.0163570,-39.8514780,0.0000000,0.0000000,0.0000000); //
CreateObject(19364,2394.3449700,-2507.8642570,-39.8410870,0.0000000,0.0000000,89.3999400); //
CreateObject(19364,2393.7746580,-2502.4011230,-49.4965050,0.0000000,0.0000000,90.0000070); //
CreateObject(1505,2393.1691890,-2502.4699700,-49.5528100,0.0000000,0.0000000,0.0000000); //
CreateObject(1506,2393.3117670,-2507.7866210,-49.5688970,0.0000000,0.0000000,0.0000000); //
CreateObject(1507,2397.3808590,-2507.7810050,-47.8806830,0.0000000,0.0000000,0.0000000); //
CreateObject(1504,2397.5593260,-2502.4748530,-47.9207300,0.0000000,0.0000000,0.0000000); //
CreateObject(1505,2393.1953120,-2502.4602050,-46.1954000,0.0000000,0.0000000,0.0000000); //
CreateObject(1506,2393.2031250,-2507.7875970,-46.2140120,0.0000000,0.0000000,0.0000000); //
CreateObject(1535,2403.9797360,-2502.8173820,-51.1848030,0.0000000,0.0000000,-89.3999170); //
CreateObject(1507,2397.4746090,-2507.7832030,-44.5746610,0.0000000,0.0000000,0.0000000); //
CreateObject(1505,2397.6252440,-2502.4707030,-44.5548320,0.0000000,0.0000000,0.0000000); //
CreateObject(1505,2397.6516110,-2502.4731440,-41.2211790,0.0000000,0.0000000,0.0000000); //
CreateObject(1504,2397.4299310,-2507.8820800,-41.2006600,0.0000000,0.0000000,0.0000000); //
CreateObject(1507,2393.3029780,-2507.7770990,-42.8810110,0.0000000,0.0000000,0.0000000); //
CreateObject(1506,2393.2597650,-2502.4553220,-42.9006500,0.0000000,0.0000000,0.0000000); //
CreateObject(1504,2392.9680170,-2504.4577630,-49.5414000,0.0000000,0.0000000,-90.0999670); //
CreateObject(1505,2399.3486320,-2504.1923820,-47.9107130,0.0000000,0.0000000,-90.0000000); //
CreateObject(1504,2392.9704580,-2505.8403320,-46.2036780,0.0000000,0.0000000,89.9999080); //
CreateObject(1506,2399.3476560,-2504.4848630,-44.5548510,-0.1999990,0.0000000,-90.1999890); //
CreateObject(1504,2392.9667960,-2505.5620110,-42.8819990,0.0000000,0.0000000,90.0998610); //
CreateObject(1506,2399.3742670,-2504.3386230,-41.2009960,0.0000000,0.0000000,-90.3999930); //
CreateObject(19437,2397.1540520,-2503.0651850,-39.4912140,0.0000000,0.0000000,0.0000000); //
CreateObject(19437,2397.1367180,-2503.9743650,-39.4897380,0.0000000,0.0000000,0.0000000); //
CreateObject(19437,2403.1904290,-2503.3474120,-51.2468450,0.0000000,90.0999220,-90.2999950); //
В папку scriptfiles добавьте папку Padik и текст. Padik.cfg
Автор: Krut
Последнее редактирование модератором: