Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Įskiepis (Include) GetPlayerPosPlace v0.02 R1(Release) (2014). Su šia funcija galėsite lengvai išgaut žaidėjo miestą.
- - Draudžiama: Platint šį include be autoriaus leidimo.
- - Draudžiama: Šalinimas arba keitimas šio komentaro.
- Autorius: Alex_Lenez | Sulietuvino Evaldas .
- Naudojimas: Include naudoj pluginą Streamer 2.6.1
- */
- //#define IsPlace(%0, %1) IsPlayerInDynamicArea(%0, %1)
- #define PLAYER_INVALID_PLACE (-1)
- #define PLAYER_IN_SAN_FIERRO (0)
- #define PLAYER_IN_LOS_SANTOS (1)
- #define PLAYER_IN_LAS_VENTURAS (2)
- #define MAX_ZONES (3)
- new zones[MAX_ZONES];
- new Float:ZONE_SF[] = {
- -2988.0,-2980.0,
- -2985.0,2990.0,
- -1970.0,2980.0,
- -2114.0,2285.0,
- -1960.0,2134.0,
- -1871.0,2002.0,
- -1755.0,1748.0,
- -1626.0,1679.0,
- -1314.0,1563.0,
- -1219.0,1434.0,
- -1191.0,1272.0,
- -1208.0,1136.0,
- -1111.0,1069.0,
- -995.0,914.0,
- -945.0,758.0,
- -803.0,582.0,
- -729.0,522.0,
- -657.0,495.0,
- -647.0,418.0,
- -867.0,210.0,
- -973.0,-1.0,
- -1033.0,-244.0,
- -1067.0,-386.0,
- -1185.0,-561.0,
- -1212.0,-656.0,
- -1227.0,-1434.0,
- -1211.0,-1718.0,
- -1198.0,-2003.0,
- -1157.0,-2199.0,
- -1233.0,-2468.0,
- -1191.0,-2609.0,
- -1149.0,-2710.0,
- -1113.0,-2957.0,
- -1101.0,-2991.0,
- -2988.0,-2980.0
- };
- new Float:ZONE_LS[] = {
- -1101.0,-2990.0,
- 2989.0,-2989.0,
- 2940.0,449.0,
- 1890.0,507.0,
- 1349.0,580.0,
- 1057.0,634.0,
- 833.0,576.0,
- 455.0,435.0,
- 12.0,388.0,
- -343.0,386.0,
- -561.0,407.0,
- -644.0,417.0,
- -869.0,210.0,
- -974.0,-2.0,
- -1032.0,-244.0,
- -1069.0,-386.0,
- -1187.0,-564.0,
- -1214.0,-656.0,
- -1198.0,-2004.0,
- -1158.0,-2199.0,
- -1233.0,-2468.0,
- -1151.0,-2712.0,
- -1101.0,-2990.0
- };
- new Float:ZONE_LV[] = {
- -1971.0,2979.0,
- -759.0,2996.0,
- 2991.0,2993.0,
- 2985.0,709.0,
- 2940.0,448.0,
- 1889.0,505.0,
- 1350.0,579.0,
- 1056.0,633.0,
- 833.0,578.0,
- 454.0,435.0,
- 12.0,388.0,
- -344.0,386.0,
- -561.0,408.0,
- -647.0,419.0,
- -658.0,492.0,
- -730.0,520.0,
- -805.0,582.0,
- -944.0,757.0,
- -994.0,914.0,
- -1110.0,1067.0,
- -1209.0,1138.0,
- -1192.0,1273.0,
- -1220.0,1432.0,
- -1314.0,1561.0,
- -1626.0,1679.0,
- -1755.0,1747.0,
- -1873.0,2002.0,
- -1961.0,2135.0,
- -2114.0,2284.0,
- -1971.0,2979.0
- };
- stock GetPlayerPosPlace(playerid)
- {
- new ReturnPlayer = -1;
- for(new i = 0; i < MAX_ZONES; i++)
- {
- if(!IsPlayerInDynamicArea(playerid, zones[i])) continue;
- ReturnPlayer = i;
- }
- return ReturnPlayer;
- }
- // function features version 0.3
- /*GetPlayerPlaceCode(code[], source[])
- {
- new fArray = {"distance"};
- if(strcmp(code, fArray[0], true) == 0){
- new res = strval(source);
- }
- }*/
- stock place_init()
- {
- zones[0] = CreateDynamicPolygon(ZONE_SF);
- zones[1] = CreateDynamicPolygon(ZONE_LS);
- zones[2] = CreateDynamicPolygon(ZONE_LV);
- return 1;
- }
- /*
- GetPlayerPosPlace(playerid)
- PLAYER_INVALID_PLACE: Jeigu žaidėjas randas už San-Andreas mapo (Už SF, LV, LS miestų) (okeane, toli nuo miesto).
- PLAYER_IN_SAN_FIERRO: Jeigu žaidėjas randas San Fierro mieste
- PLAYER_IN_LOS_SANTOS: Jeigu žaidėjas randas Los Santos mieste
- PLAYER_IN_LAS_VENTURAS: Jeigu žaidėjas randas Las Venturas mieste
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement