Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Dream House v1.5 with updates
- //Dream house v1.5 with updates
- #include <a_samp>
- #define FILTERSCRIPT
- #define COLOR_DARKBLUE 0x0000D0FF
- #define COLOR_WHITE 0xFFFFFFFF
- #define COLOR_LIGHTBLUE 0xBBFFFFFF
- #define COLOR_BLACK 0x000000FF
- #define COLOR_RED 0xAA3333AA
- #if defined FILTERSCRIPT
- new lift1;
- main()
- {
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid,COLOR_LIGHTBLUE, "*New* Dream House by r4z0r");
- return 1;
- }
- public OnFilterScriptInit()
- {
- print("----Dream House 1.5----");
- print("----Made by r4z0r----");
- print("----2009 all rights reserved----");
- AddStaticVehicle(463,-782.4836,624.9443,0.9875,82.0729,7,7); // limuzina
- AddStaticVehicle(409,-822.6947,726.7102,18.5427,234.6256,1,1); // quad
- AddStaticVehicle(457,-749.1896,719.3625,17.8169,242.5829,63,1); // quad
- AddStaticVehicle(471,-791.5720,614.4626,0.9346,56.3660,66,71); // cross
- AddStaticVehicle(471,-790.5920,615.8664,0.9393,57.4145,120,112); // cross
- AddStaticVehicle(454,-776.3168,608.4803,0.1165,147.3560,26,26); // JAHTA !!
- CreateObject(9509, -796.627808, 636.007629, 3.448239, 0.0000, 0.0000, 56.2500);// objects xD
- CreateObject(638, -773.876892, 618.769409, 1.145273, 0.0000, 0.0000, 326.2500);
- CreateObject(638, -775.404297, 616.474670, 1.145273, 0.0000, 0.0000, 326.2500);
- CreateObject(638, -776.911316, 614.213745, 1.145273, 0.0000, 0.0000, 326.2500);
- CreateObject(638, -778.406921, 611.952393, 1.145273, 0.0000, 0.0000, 326.2500);
- CreateObject(650, -812.239563, 660.963196, 2.016704, 0.0000, 0.0000, 225.0000);
- CreateObject(949, -784.869080, 604.199646, 1.084523, 0.0000, 0.0000, 348.7500);
- CreateObject(949, -780.580505, 610.787048, 1.084523, 0.0000, 0.0000, 0.0000);
- CreateObject(2195, -784.352234, 612.791992, 1.065427, 0.0000, 0.0000, 0.0000);
- CreateObject(2245, -792.754272, 609.571106, 2.472111, 0.0000, 0.0000, 0.0000);
- CreateObject(2253, -803.353027, 643.685791, 1.070697, 0.0000, 0.0000, 56.2500);
- CreateObject(2253, -808.888306, 647.488708, 1.426604, 0.0000, 0.0000, 321.0934);
- CreateObject(2253, -812.571777, 652.436951, 2.372979, 0.0000, 0.0000, 292.5000);
- CreateObject(2253, -813.164734, 657.679810, 3.050575, 0.0000, 0.0000, 270.0000);
- CreateObject(2253, -807.480469, 657.947266, 2.254272, 0.0000, 0.0000, 348.7500);
- CreateObject(2253, -806.744629, 654.207153, 1.930685, 0.0000, 359.1406, 299.4529);
- CreateObject(2253, -804.447327, 652.168335, 1.605494, 0.0000, 0.0000, 319.2972);
- CreateObject(2253, -799.360535, 648.723694, 1.251242, 0.0000, 0.0000, 320.1566);
- CreateObject(2253, -795.109070, 645.267334, 1.176372, 0.0000, 0.0000, 319.2972);
- CreateObject(2253, -799.146851, 640.266541, 0.994256, 0.0000, 0.0000, 317.5783);
- CreateObject(2253, -790.159180, 640.448303, 1.173948, 0.0000, 0.0000, 33.7500);
- CreateObject(2253, -795.330811, 636.709473, 0.986448, 0.0000, 0.0000, 33.7500);
- CreateObject(2253, -788.375183, 635.427368, 1.173948, 0.0000, 0.0000, 11.2500);
- CreateObject(2253, -794.355957, 633.173035, 0.986448, 0.0000, 0.0000, 0.0000);
- CreateObject(2253, -795.580566, 617.765625, 0.988811, 0.0000, 0.0000, 281.2500);
- CreateObject(2253, -795.760803, 623.454834, 0.986448, 0.0000, 0.0000, 354.8434);
- CreateObject(2253, -794.458435, 629.432129, 0.986448, 0.0000, 0.0000, 258.7500);
- CreateObject(2345, -781.926453, 625.822083, 0.906556, 0.0000, 0.0000, 326.2500);
- CreateObject(2345, -780.128662, 624.620850, 0.850671, 0.0000, 0.0000, 326.2500);
- CreateObject(2811, -790.068054, 617.775940, 0.454896, 0.0000, 0.0000, 0.0000);
- CreateObject(2811, -783.923340, 626.814697, 0.447814, 0.0000, 0.0000, 0.0000);
- CreateObject(2811, -788.233154, 629.761169, 0.447815, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -784.520142, 602.485229, -0.537276, 0.0000, 0.0000, 78.7500);
- CreateObject(717, -787.923218, 624.701233, 0.195348, 0.0000, 0.0000, 236.2500);
- CreateObject(3810, -788.836975, 617.256836, 3.537555, 0.0000, 0.0000, 146.1727);
- CreateObject(3810, -792.670410, 611.553101, 3.487554, 1.7189, 0.0000, 146.2500);
- CreateObject(3532, -789.445740, 620.851685, 1.130333, 0.0000, 0.0000, 348.7500);
- CreateObject(3532, -787.293701, 623.278870, 1.130333, 0.0000, 0.0000, 326.2500);
- CreateObject(3532, -788.753723, 624.580139, 1.102875, 0.0000, 0.0000, 337.5000);
- CreateObject(3532, -786.425232, 626.699829, 1.130333, 0.0000, 0.0000, 54.5311);
- CreateObject(1500, -789.016235, 607.522522, 6.581183, 0.0000, 0.0000, 56.2500);
- CreateObject(1481, -778.825378, 613.858887, 1.151365, 0.0000, 0.0000, 236.2501);
- CreateObject(1485, -778.815857, 614.324463, 1.206794, 4.2972, 0.0000, 258.7500);
- CreateObject(1485, -778.838989, 614.192505, 1.181794, 0.0000, 0.0000, 270.0000);
- CreateObject(1485, -779.192322, 613.794189, 1.206794, 0.0000, 0.0000, 0.0000);
- CreateObject(1485, -779.289978, 613.708374, 1.161869, 0.0000, 0.0000, 0.0000);
- CreateObject(1667, -776.499146, 618.455627, 0.661819, 0.0000, 0.0000, 348.7500);
- CreateObject(1665, -776.524658, 618.204712, 0.608693, 0.0000, 0.0000, 315.0000);
- CreateObject(1485, -776.472717, 618.123901, 0.623301, 0.0000, 0.0000, 135.0000);
- CreateObject(1520, -776.546143, 618.594238, 0.632369, 0.0000, 0.0000, 315.0000);
- CreateObject(1666, -783.910583, 623.799622, 0.654005, 0.0000, 0.0000, 0.0000);
- CreateObject(1280, -778.111206, 622.750793, 0.849595, 0.0000, 0.0000, 56.2500);
- CreateObject(1670, -778.607422, 615.997498, 0.583694, 0.0000, 0.0000, 22.5000);
- CreateObject(1825, -775.079102, 619.728394, 0.426394, 0.0000, 0.0000, 0.0000);
- CreateObject(1670, -775.144714, 619.757507, 1.333694, 0.0000, 0.0000, 0.0000);
- lift1 = CreateObject(3280, -782.127075, 607.310242, 0.473245, 0.0000, 0.0000, 326.2500); // lift
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- #endif
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp(cmdtext, "/liftup", true)==0)
- {
- MoveObject (lift1,-782.112183, 607.335754, 10.323227, 0.7);
- SendClientMessage(playerid, 0x000000F, "Lift Gore");
- return 1;
- }
- if (strcmp(cmdtext, "/liftdown", true)==0)
- {
- MoveObject (lift1,-782.127075, 607.310242, 0.473245, 0.7);
- SendClientMessage(playerid, 0x000000F, "Lift Dole");
- return 1;
- }
- if(!strcmp("/Ulaz", cmdtext, true))
- {
- if(PlayerToPoint(3.0,playerid,-787.6028,607.4207,7.5498)) // Ulaz kroz balkon
- {
- SetPlayerPos(playerid,-227.027999,1401.229980,27.765625);
- SetPlayerFacingAngle(playerid, 356.9500);
- SetPlayerInterior(playerid, 18);
- }
- else if(PlayerToPoint(3.0,playerid,-791.3444,609.3802,1.4482)) // Ulaz kroz vrata
- {
- SetPlayerPos(playerid, 1267.663208,-781.323242,1091.906250);
- SetPlayerInterior(playerid, 5);
- }
- return 1;
- }
- if(!strcmp("/Izlaz", cmdtext, true))
- {
- if(PlayerToPoint(3.0,playerid,-227.027999,1401.229980,27.765625)) // Izlaz iz 2 sprata
- {
- SetPlayerPos(playerid,-787.6028,607.4207,7.5498);
- SetPlayerInterior(playerid, 0);
- }
- else if(PlayerToPoint(3.0,playerid,1267.663208,-781.323242,1091.906250)) // Izlaz iz 1 sprata ( Madd Dog interior )
- {
- SetPlayerPos(playerid, -791.3444,609.3802,1.4482);
- SetPlayerInterior(playerid, 0);
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if (PlayerToPoint(3.0, playerid,-787.6028,607.4207,7.5498)) // Ulaz u Lil Probe Inn s balkona ! ( sprat 2 )
- {
- GameTextForPlayer(playerid, "Kucaj /ulaz", 5000, 1);
- }
- if (PlayerToPoint(3.0, playerid,-227.027999,1401.229980,27.765625)) // Izlaz iz Lil Probe Inn ( sprat 2 )
- {
- GameTextForPlayer(playerid, "Kucaj /izlaz", 5000, 1);
- }
- else if (PlayerToPoint(3.0, playerid, -791.3444,609.3802,1.4482)) // Ulaz u Madd Dog ( sprat 1 )
- {
- GameTextForPlayer(playerid, "Kucaj /ulaz", 5000, 1);
- }
- if (PlayerToPoint(3.0, playerid, 1267.663208,-781.323242,1091.906250)) // Izlaz iz Madd Dog ( sprat 1 )
- {
- GameTextForPlayer(playerid, "Kucaj /izlaz", 5000, 1);
- }
- return 1;
- }
- stock strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
- public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement