Guest User

Untitled

a guest
Mar 6th, 2014
2,296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 109.71 KB | None | 0 0
  1. #include <a_samp>
  2. #include <streamer>
  3. #include <dini>
  4. #include <sscanf2>
  5. #include <ZCMD>
  6.  
  7. #define MAX_PLAYER_OBJECTS      500
  8. #define PLAYERS                 24
  9.  
  10. #define COLOR_WHITE     0xFFFFFFFF
  11. #define COLOR_BLUE      0x33AAFFFF
  12. #define COLOR_GREEN     0x33AA33FF
  13. #define COLOR_GREEN2    0x9EC73DFF
  14. #define COLOR_YELLOW    0xFFFF94FF
  15. #define COLOR_PMYELLOW  0xDABB3EFF
  16. #define COLOR_BYELLOW   0xFFFF00FF
  17. #define COLOR_PM        0x00AA00FF
  18. #define COLOR_TIP       0x00808000
  19. #define COLOR_RED       0xFF0000FF
  20. #define COLOR_CYAN      0x00FFFFFF
  21. #define COLOR_LIGHTRED  0xFF6347FF
  22. #define COLOR_PURPLE    0xC2A2DAFF
  23. #define COLOR_ORANGE    0xFF9900FF
  24. #define COLOR_GREY      0xAFAFAFFF
  25. #define COLOR_DBLUE     0x2641FEFF
  26. #define COLOR_ADMIN     0x2587CEFF
  27.  
  28. #define PRESSED(%0) \
  29.     (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  30.  
  31. enum ObjectLibrary
  32. {
  33.     ObjectName[64],
  34.     ObjectID
  35. }
  36.  
  37. new msg[128];
  38. new objects[MAX_PLAYER_OBJECTS];
  39. new objectmodel[MAX_PLAYER_OBJECTS];
  40. new objectmatinfo[MAX_PLAYER_OBJECTS][3][64];
  41. new Attached[MAX_PLAYER_OBJECTS];
  42. new bigmatinfo[256];
  43. new name[MAX_PLAYER_NAME];
  44.  
  45. new PlayerText:objinfo[PLAYERS][34];
  46. new PlayerText:ObjTextdraw[PLAYERS];
  47.  
  48. // Syntax:
  49. // {"Object Name", ObjectID},
  50. new ObjectNames[][ObjectLibrary] = {
  51.  
  52.     {"Purple Dildo",321},
  53.     {"White Dildo",322},
  54.     {"Vibrator",323},
  55.     {"Small Vibrator",324},
  56.     {"Flowers",325},
  57.     {"Cane",326},
  58.     {"Cellphone",330},
  59.     {"Brass Knuckles",331},
  60.     {"Golf Club",333},
  61.     {"Night Stick",334},
  62.     {"Knife",335},
  63.     {"Baseball Bat",336},
  64.     {"Shovel",337},
  65.     {"Pool Cue",338},
  66.     {"Katana",339},
  67.     {"Chainsaw",341},
  68.     {"Frag Grenade",342},
  69.     {"Molotov Cocktail",344},
  70.     {"Tear Gas",343},
  71.     {"Pistol",346},
  72.     {"Silenced Pistol",347},
  73.     {"Desert Eagle",348},
  74.     {"Shotgun",349},
  75.     {"Sawn Off Shotgun",350},
  76.     {"Combat Shotgun",351},
  77.     {"SMG UZI",352},
  78.     {"SMG MP5",353},
  79.     {"AK47 Assault Rifle",355},
  80.     {"M4 Assault Rifle",356},
  81.     {"Coutnry Rifle",357},
  82.     {"Sniper Rifle",358},
  83.     {"Rocket Launcher",359},
  84.     {"Heat Seeker Rocket Launcher",360},
  85.     {"Flamethrower",361},
  86.     {"Minigun",362},
  87.     {"Satchel Charges",363},
  88.     {"Detonator",364},
  89.     {"Pepper Spray Can",365},
  90.     {"Fire Extinguisher",366},
  91.     {"Camera",367},
  92.     {"Night Vision Goggles",368},
  93.     {"Infrared Goggles",369},
  94.     {"Parachute",371},
  95.     {"SMG Tec-9",372},
  96.     {"Armour",373},
  97.     {"Curved palm tree",648},
  98.     {"Small Tree",700},
  99.     {"Small Thick Bush",701},
  100.     {"Small Thin Bush",702},
  101.     {"Big Tree with lots of Bushes Surrounding",703},
  102.     {"Big Tree",704},
  103.     {"Big Tree with some Bushes Surrounding",705},
  104.     {"Big Tree with some Bushes Surrounding",708},
  105.     {"MASSIVE Tree with some bushes",709},
  106.     {"Palm Tree",710},
  107.     {"Short Palm Tree",711},
  108.     {"Short&Thick Coconut Tree",712},
  109.     {"Medium Tree",713},
  110.     {"Gigantic Tree",714},
  111.     {"Huge Tree",715},
  112.     {"Palm Tree on a Stand",716},
  113.     {"Small Tree on a Stand",717},
  114.     {"Big Palm Tree on a Stand",718},
  115.     {"Huge Tree",720},
  116.     {"Gigantic Tree",722},
  117.     {"Big Tree",723},
  118.     {"Biggest Tree",724},
  119.     {"Huge Tree",725},
  120.     {"Little plant",948},
  121.     {"Barrier Base",966},
  122.     {"Barrier House",967},
  123.     {"Barrier",968},
  124.     {"Medium Metal Gate",969},
  125.     {"Little Metal Fence",970},
  126.     {"Tall Metal Gate",971},
  127.     {"Big Construction Wall",972},
  128.     {"Metal Road Barrier",973},
  129.     {"White Metal Fence",974},
  130.     {"Small Metal Gate",975},
  131.     {"Small Metal Gate",976},
  132.     {"Orange and White Road Barrier",978},
  133.     {"Orange and White Road Barrier",979},
  134.     {"Big Metal Gate",980},
  135.     {"Lighted road barrier",981},
  136.     {"Very Long Small Metal Fence",982},
  137.     {"Small Metal Fence",983},
  138.     {"Long Small Metal Fence",984},
  139.     {"Electrified Metal Gate",985},
  140.     {"Electrified Metal Gate",986},
  141.     {"Electrified Metal Fence",987},
  142.     {"Airport Metal Gate",988},
  143.     {"Airport Metal Gate",989},
  144.     {"Long White Metal Fence",990},
  145.     {"White Metal Fence",991},
  146.     {"White Metal Fence",992},
  147.     {"Long White Metal Fence",993},
  148.     {"Walkway metal barrier",994},
  149.     {"Briefcase",1210},
  150.     {"Fire Hydrant",1211},
  151.     {"Money Pack",1212},
  152.     {"Small Octagonal Cap",1213},
  153.     {"Octagonal Concrete Post",1214},
  154.     {"Octagonal concrete post with light",1215},
  155.     {"Metal Barrel",1216},
  156.     {"Toxic Waste Barrel",1217},
  157.     {"Wood Pallet",1219},
  158.     {"Cardboard Box",1220},
  159.     {"Barrel with coal",1222},
  160.     {"Single Light Post",1223},
  161.     {"Gray Crate",1224},
  162.     {"Explosive Barrel",1225},
  163.     {"Curved single highway lamppost",1226},
  164.     {"Green Trash Bin",1227},
  165.     {"Stripped Work horse",1228},
  166.     {"Bus Stop Sign",1229},
  167.     {"No Parking Sign",1233},
  168.     {"Road warning barrel",1237},
  169.     {"Traffic Cone",1238},
  170.     {"Info Icon",1239},
  171.     {"Heart Icon",1240},
  172.     {"Adrenaline Pill",1241},
  173.     {"Armor Icon",1241},
  174.     {"Gas Pump",1244},
  175.     {"Wooden Ramp",1245},
  176.     {"Bribe Icon",1247},
  177.     {"GTA 3 Icon",1248},
  178.     {"Mail Box",1249},
  179.     {"C4 Bomb",1252},
  180.     {"Skull Icon",1254},
  181.     {"Bus Stop",1257},
  182.     {"Huge Billboard",1259},
  183.     {"Big Billboard",1260},
  184.     {"Wooden Crate",1271},
  185.     {"Blue House Icon",1272},
  186.     {"Green House Icon",1273},
  187.     {"Money Icon",1274},
  188.     {"T-Shirt Icon",1275},
  189.     {"TIKI Figure",1276},
  190.     {"Disk Icon",1277},
  191.     {"Tall Stadium Light",1278},
  192.     {"Wrapped Drug",1279},
  193.     {"Breakable Wooden Bench",1280},
  194.     {"Picnic Table with red umbrella",1281},
  195.     {"Newspaper Box",1287},
  196.     {"Group of 5 cardboard boxes",1299},
  197.     {"Punching bag",1985},
  198.     {"Outdoor concrete trashcan",1300},
  199.     {"Soda Machine",1302},
  200.     {"Parachute with Leg Straws",1310},
  201.     {"Two Skulls Icon",1313},
  202.     {"Two red Guys Icon",1314},
  203.     {"Traffic Light",1315},
  204.     {"Food Stand",1340},
  205.     {"Wooden bench with bushes",1364},
  206.     {"Flammable drum",1370},
  207.     {"Breakable White wooden fence",1408},
  208.     {"Breakable Wooden fence",1418},
  209.     {"Breakable Black metal fence",1419},
  210.     {"Breakable Boxes",1421},
  211.     {"Construction roadblock",1422},
  212.     {"Red and blue roadblock",1423},
  213.     {"Old Metal roadblock",1424},
  214.     {"Detour sign",1425},
  215.     {"Bridge walkway",1426},
  216.     {"Road fold-out block with light",1427},
  217.     {"Leaning ladder",1428},
  218.     {"Ghetto wood TV",1429},
  219.     {"Round white table with 3 red chairs",1432},
  220.     {"Bar table",1433},
  221.     {"Single road barricade",1434},
  222.     {"Single road barricade",1435},
  223.     {"Bridge walkway",1436},
  224.     {"Big leaning ladder",1437},
  225.     {"Breakable pile of boxes",1438},
  226.     {"Open dumpster",1439},
  227.     {"Breakable pile of boxes",1440},
  228.     {"Porn books and video sale sign",1443},
  229.     {"Breakable Green picket fence",1446},
  230.     {"Breakable metal fence",1447},
  231.     {"Out House",1452},
  232.     {"Squeezed hay-roll",1453},
  233.     {"Hay Roll",1454},
  234.     {"Hay Cart",1458},
  235.     {"Road Barrier",1459},
  236.     {"Wood stack",1463},
  237.     {"Breakable Chain Fence",1468},
  238.     {"Breakable Wooden steps",1472},
  239.     {"Breakable Wooden Roof",1479},
  240.     {"BBQ Grill",1481},
  241.     {"Bottle of Beer",1484},
  242.     {"Plants of weed",1485},
  243.     {"Big Beer",1486},
  244.     {"Big Beer",1487},
  245.     {"Wall Beer",1488},
  246.     {"Wooden Door",1491},
  247.     {"Green Door",1492},
  248.     {"Red Screen Door",1493},
  249.     {"Blue old door",1494},
  250.     {"Metal bolted door",1495},
  251.     {"CJ Door",1496},
  252.     {"Big Bolted metal door",1497},
  253.     {"Metal door",1499},
  254.     {"Barber Door",1500},
  255.     {"Old Screen",1501},
  256.     {"Classic wood door",1502},
  257.     {"Red 6sqr Door",1504},
  258.     {"Wide metal double doors",1508},
  259.     {"Whiskey Bottle",1512},
  260.     {"Candy Bar Rack",1513},
  261.     {"Cash Register",1514},
  262.     {"Poker Machine",1515},
  263.     {"Small Card Table",1516},
  264.     {"TV",1518},
  265.     {"Store Door",1522},
  266.     {"Swinging Door",1523},
  267.     {"Shop Door",1532},
  268.     {"Shop Door",1533},
  269.     {"Chunk of warehouse windows",1534},
  270.     {"Safe house door",1535},
  271.     {"Freeway overhand sign",1539},
  272.     {"Sack of money",1550},
  273.     {"Wooden Box",1558},
  274.     {"White jet seat",1562},
  275.     {"Restaurant door",1566},
  276.     {"Little Metal stand",1571},
  277.     {"Shopping Cart",1572},
  278.     {"White sack of cocaine",1575},
  279.     {"Brown sack of cocaine",1576},
  280.     {"Yellow sack of cocaine",1577},
  281.     {"Green sack of cocaine",1578},
  282.     {"Blue sack of cocaine",1579},
  283.     {"Red sack of cocaine",1580},
  284.     {"Security Card",1581},
  285.     {"Pizza Box",1582},
  286.     {"Luigi Target",1583},
  287.     {"Misty Target",1584},
  288.     {"Asuka Target",1585},
  289.     {"Ammunation Target",1586},
  290.     {"Tire Spikes",1593},
  291.     {"Table with 4 chairs",1594},
  292.     {"Big Satellite Dish",1595},
  293.     {"Beach Ball",1598},
  294.     {"Dolphin",1607},
  295.     {"Shark",1608},
  296.     {"Turtle",1609},
  297.     {"Sub Marine",1612},
  298.     {"Security camera",1616},
  299.     {"Glass Windows",1649},
  300.     {"White Windows",1651},
  301.     {"Gas Pump",1676},
  302.     {"Red Radar",1682},
  303.     {"Construction container",1684},
  304.     {"Ramp",1655},
  305.     {"Office Chair",1663},
  306.     {"Black Couch",1703},
  307.     {"Black metal chair",1714},
  308.     {"Ugly metal chair",1722},
  309.     {"Wooden Chair",1739},
  310.     {"Jail bed",1771},
  311.     {"Soda Machine",1775},
  312.     {"Yellow single couch",1764},
  313.     {"Yellow couch",1765},
  314.     {"Couch",1766},
  315.     {"Video Player",1788},
  316.     {"Bed",1798},
  317.     {"Office chair",1806},
  318.     {"Old metal chair",1810},
  319.     {"Small cafe table",1817},
  320.     {"Cafe Table",1822},
  321.     {"Cafe table",1827},
  322.     {"Tiger carpet",1828},
  323.     {"Widescreen TV",1876},
  324.     {"Wheel of fortune",1895},
  325.     {"White small ball",1974},
  326.     {"Roulette table",1978},
  327.     {"Double office desk",1998},
  328.     {"Single white office desk",1999},
  329.     {"File cabinet",2000},
  330.     {"Office plant",2001},
  331.     {"Water dispenser",2002},
  332.     {"Dark wooden office cabinet",2204},
  333.     {"Blck wooden desk",2206},
  334.     {"Single office desk",2008},
  335.     {"Game console",2028},
  336.     {"Sandbag",2060},
  337.     {"Bullets",2061},
  338.     {"Barrel",2062},
  339.     {"Stand",2063},
  340.     {"WWII Cannon",2064},
  341.     {"File Cabinet",2067},
  342.     {"Camouflage Roof",2068},
  343.     {"Dinning table",2086},
  344.     {"Bed",2090},
  345.     {"Rocking Table",2096},
  346.     {"Disc reproducer",2100},
  347.     {"Music reproducer",2103},
  348.     {"Foot lamp",2069},
  349.     {"Closet and stands with TV",2091},
  350.     {"Home theater",2104},
  351.     {"Foot lamp",2108},
  352.     {"Low dinning table",2110},
  353.     {"Wooden dinning table",2112},
  354.     {"Basket ball",2114},
  355.     {"Wooden table",2112},
  356.     {"Cafe Table",2118},
  357.     {"Wooden chair",2120},
  358.     {"Red stool",2125},
  359.     {"Wooden kitchen cooker",2135},
  360.     {"Wooden kitchen sink",2136},
  361.     {"Wooden kitchen table",2137},
  362.     {"Tall wooden kitchen closet",2140},
  363.     {"Office unit with books",2164},
  364.     {"Wooden table with PC",2165},
  365.     {"Double wooden table with PC",2166},
  366.     {"Office unit",2167},
  367.     {"Blue office Desk",2172},
  368.     {"Wooden desk",2173},
  369.     {"Office wooden desk",2180},
  370.     {"Boss office desk",2184},
  371.     {"Blackjack table",2188},
  372.     {"Computer (PC) Screen",2190},
  373.     {"Blue library",2191},
  374.     {"Blue office desk",2193},
  375.     {"Police Archives",2197},
  376.     {"Wooden cabinet with PCs",2199},
  377.     {"Archives",2200},
  378.     {"Photocopier",2202},
  379.     {"Round wooden desk",2208},
  380.     {"Donuts",2222},
  381.     {"Black Speaker",2229},
  382.     {"Wooden speaker",2230},
  383.     {"Wooden speaker",2231},
  384.     {"Black metal speaker",2232},
  385.     {"Flowers",2249},
  386.     {"Car picture",2254},
  387.     {"Porn picture",2255},
  388.     {"Palms picture",2256},
  389.     {"Big abstract picture",2257},
  390.     {"City picture",2258},
  391.     {"Bowling picture",2259},
  392.     {"Brown big couch",2290},
  393.     {"Brown single couch",2291},
  394.     {"Brown foot couch",2293},
  395.     {"Beanbag",2295},
  396.     {"Full TV table",2296},
  397.     {"Wooden table with TV",2297},
  398.     {"Wooden cabinet",2306},
  399.     {"Tall wooden cabinet",2307},
  400.     {"Slot machine",2325},
  401.     {"Safe",2332},
  402.     {"Ammo box",2358},
  403.     {"Clothes rail",2372},
  404.     {"Blue clothes",2382},
  405.     {"Blue clothes",2396},
  406.     {"Surf board",2406},
  407.     {"Fryer",2415},
  408.     {"Microwave",2421},
  409.     {"Store desk",2424},
  410.     {"Bread frier",2426},
  411.     {"Fryer",2451},
  412.     {"Sink",2523},
  413.     {"Bathtub",2526},
  414.     {"Toilet",2528},
  415.     {"Wharehouse shelf",2567},
  416.     {"Wooden closet with table",2573},
  417.     {"Wooden closet with table",2576},
  418.     {"Hanging Meat",2589},
  419.     {"Hook",2590},
  420.     {"Wall TV",2596},
  421.     {"Porn (Until 2588)",2581},
  422.     {"Police desks",2604},
  423.     {"Police desk with PC",2605},
  424.     {"Security Monitors",2606},
  425.     {"Police desk with papers",2607},
  426.     {"Wooden Library with PC",2608},
  427.     {"USA Flags",2614},
  428.     {"Police board",2616},
  429.     {"Treadmill",2627},
  430.     {"Excersise Bike",2630},
  431.     {"Excersise red carpet",2631},
  432.     {"Poker machine",2640},
  433.     {"Soda",2647},
  434.     {"Burger shoot bag",2663},
  435.     {"White sweater",2689},
  436.     {"Orange shoes box",2694},
  437.     {"Orange sweater",2704},
  438.     {"Black stool",2723},
  439.     {"Betting machine",2754},
  440.     {"Red separator bar",2773},
  441.     {"Black Chair",2776},
  442.     {"Several slot machines",2785},
  443.     {"Video game",2778},
  444.     {"Video game",2779},
  445.     {"Smoke Machine",2780},
  446.     {"ATM",2781},
  447.     {"Candle",2868},
  448.     {"Green Capsule",2976},
  449.     {"Minigun base",2888},
  450.     {"Cellphone",2886},
  451.     {"Ramp",2890},
  452.     {"Cash Register",2941},
  453.     {"Meat (Until 2806)",2803},
  454.     {"Papers (Until 2827)",2824},
  455.     {"Photos of people",2828},
  456.     {"Long spike strip",2892},
  457.     {"Short spike strip",2899},
  458.     {"Pink and red flowers",2895},
  459.     {"Coffin",2896},
  460.     {"Green carpet",2898},
  461.     {"GPS",2966},
  462.     {"GYM Stuff",2913},
  463.     {"GYM Stuff",2915},
  464.     {"GYM Stuff",2916},
  465.     {"Green Flag",2914},
  466.     {"Mine",2918},
  467.     {"Gate Barrier",2920},
  468.     {"Small red crane",2956},
  469.     {"Fire alarm",2961},
  470.     {"Pool Table",2964},
  471.     {"Dark green flag",2993},
  472.     {"Rolled up blue map",3017},
  473.     {"Weed (Smoked)",3027},
  474.     {"Radio transmitter",3030},
  475.     {"Chinese Lanterns",3038},
  476.     {"Smoking Cigar",3044},
  477.     {"Heli Magnet",3053},
  478.     {"Garage Door",3055},
  479.     {"Horse shoe",3056},
  480.     {"Goggles",3070},
  481.     {"Blackboard",3077},
  482.     {"Ammo Capsule",3082},
  483.     {"Line Closed sign",3091},
  484.     {"Dead tied up cop",3096},
  485.     {"Repair icon",3096},
  486.     {"Parachute target",3096},
  487.     {"Trailer",3169},
  488.     {"Trailer",3171},
  489.     {"Trailer",3172},
  490.     {"Small trailer house",3242},
  491.     {"Breakable wooden panel",3260},
  492.     {"Will be shoot sign",3265},
  493.     {"SAM Missile Launcher",3267},
  494.     {"Breakable Wooden Fence",3276},
  495.     {"Area 51 Tower",3279},
  496.     {"Plane hangar",3268},
  497.     {"Trailer house",3283},
  498.     {"Oil tank",3287},
  499.     {"Wooden stairs",3361},
  500.     {"Breakable hay stack",3374},
  501.     {"Operation table",3383},
  502.     {"Storage computer",3384},
  503.     {"Light blue light",3385},
  504.     {"Processing computer",3387},
  505.     {"Operation desk",3391},
  506.     {"Table with radar",3393},
  507.     {"Metal Stairs",3399},
  508.     {"Torch",3461},
  509.     {"Small pipe",3502},
  510.     {"Portatile bathroom",3504},
  511.     {"Small Blue House",3556},
  512.     {"Small Purple House",3557},
  513.     {"Train trailer",3564},
  514.     {"Containers",3574},
  515.     {"Yellow barrier",3578},
  516.     {"Small House",3590},
  517.     {"Wasted vehicle",3594},
  518.     {"Mansion",3608},
  519.     {"Big House",3609},
  520.     {"Villa",3607},
  521.     {"Villa",3619},
  522.     {"Very big containers wall",3621},
  523.     {"Medium warehouse",3624},
  524.     {"Little construction house",3626},
  525.     {"Cages wall",3630},
  526.     {"Container with garbage",3722},
  527.     {"Shelfs",3761},
  528.     {"Roadblock",4516},
  529.     {"Big roadblock",4524},
  530.     {"Small Roadblock",4527},
  531.     {"Walkway bridge",4882},
  532.     {"Staircase",6976},
  533.     {"Small set of containers",7025},
  534.     {"Metal Stairs",7096},
  535.     {"L Shaped containers",7102},
  536.     {"Big set of containers",7186},
  537.     {"AT-400 hangar",8240},
  538.     {"Single plane hangar",8253},
  539.     {"Medium set of containers",8337},
  540.     {"Pirate Ship",8493},
  541.     {"Metal Stairs",8572},
  542.     {"Taller Metal Stairs",8613},
  543.     {"Straight concrete road",11111},
  544.     {"Big cow",11470},
  545.     {"Toreno's ranch",11490},
  546.     {"Toreno's ranch stairs",11491},
  547.     {"Vehicle garage",11492},
  548.     {"Big amount of big containers",12860},
  549.     {"Toxic waste well",12986},
  550.     {"White garage door",13028},
  551.     {"Big Monkey",13667},
  552.     {"Big Loop",13666},
  553.     {"Room with a ramp",14422},
  554.     {"Wooden Bench",14401},
  555.     {"Flowers bush",14402},
  556.     {"Big stairs",14407},
  557.     {"4 Dragons Bar",14560},
  558.     {"Caligula's bar",14582},
  559.     {"Pile of boxes",14600},
  560.     {"Boxing ring",14780},
  561.     {"Lockers",14782},
  562.     {"Karate ring",14787},
  563.     {"Boxing ring",14791},
  564.     {"Bed",14866},
  565.     {"Lots of office archives",14895},
  566.     {"Small Cow",16442},
  567.     {"Medium plane hangar",16771},
  568.     {"Helipad marks",16375},
  569.     {"Small vehicle Garage",16409},
  570.     {"White small wall",16500},
  571.     {"White big wall",16501},
  572.     {"Big ship containers",17019},
  573.     {"White Barn",17298},
  574.     {"White garage gate",17951},
  575.     {"Big Rocks",18226},
  576.     {"Wooden cabin",18259},
  577.     {"Wooden cabin",18267},
  578.  
  579.  
  580.  
  581.     {"[0.3c] Fishing rod",18632},
  582.     {"[0.3c] Wrench",18633},
  583.     {"[0.3c] Crowbar",18634},
  584.     {"[0.3c] Hammer",18635},
  585.     {"[0.3c] Police Cap",18636},
  586.     {"[0.3c] Police Shield",18637},
  587.     {"[0.3c] Flashlight",18641},
  588.     {"[0.3c] Taser",18642},
  589.     {"[0.3c] Red Laser",18643},
  590.     {"[0.3c] Screwdriver",18644},
  591.     {"[0.3c] Motorcycle Helmet",18645},
  592.     {"[0.3c] Police siren",18646},
  593.     {"[0.3c] Red Neon",18647},
  594.     {"[0.3c] Blue Neon",18648},
  595.     {"[0.3c] Green Neon",18649},
  596.     {"[0.3c] Yellow Neon",18650},
  597.     {"[0.3c] Pink Neon",18651},
  598.     {"[0.3c] White Neon",18652},
  599.     {"[0.3c] Red Disco Light",18653},
  600.     {"[0.3c] Green Disco Light",18654},
  601.     {"[0.3c] Blue Disco Light",18655},
  602.     {"[0.3c] Barrel explosion",18678},
  603.     {"[0.3c] Crate explosion",18679},
  604.     {"[0.3c] Door explosion",18680},
  605.     {"[0.3c] Fuel explosion",18681},
  606.     {"[0.3c] Large explosion",18682},
  607.     {"[0.3c] Mediun explosion",18683},
  608.     {"[0.3c] Molotov explosion",18684},
  609.     {"[0.3c] Small explosion",18685},
  610.     {"[0.3c] Tiny explosion",18686},
  611.     {"[0.3c] Fire",18688},
  612.     {"[0.3c] Bike fire",18689},
  613.     {"[0.3c] Car fire",18690},
  614.     {"[0.3c] Large fire",18691},
  615.     {"[0.3c] Medium fire",18692},
  616.     {"[0.3c] Flamethrower fire",18694},
  617.     {"[0.3c] Nitro particles",18702},
  618.     {"[0.3c] Island Base",18751},
  619.     {"[0.3c] Volcano",18752},
  620.     {"[0.3c] 125x125 Base",18753},
  621.     {"[0.3c] 250x250 Base",18754},
  622.     {"[0.3c] DM Cage",18759},
  623.     {"[0.3c] DM Cage",18760},
  624.     {"[0.3c] Race finish line",18761},
  625.     {"[0.3c] 1x1x5 Concrete",18762},
  626.     {"[0.3c] 3x3x5 Concrete",18763},
  627.     {"[0.3c] 5x5x5 Concrete",18764},
  628.     {"[0.3c] 10x10x5 Concrete",18765},
  629.     {"[0.3c] 10x1x5 Concrete",18766},
  630.     {"[0.3c] Concrete stair",18767},
  631.     {"[0.3c] Skydive platform",18768},
  632.     {"[0.3c] Spiral stair",18771},
  633.     {"[0.3c] Tunnel section",18772},
  634.     {"[0.3c] Tunnel join section (until 18776)",18773},
  635.     {"[0.3c] Tunnel Spiral",18777},
  636.     {"[0.3c] Ramp",18778},
  637.     {"[0.3c] Ramp",18779},
  638.     {"[0.3c] Ramp",18780},
  639.     {"[0.3c] Big mesh ramp",18781},
  640.     {"[0.3c] Cookie ramp",18782},
  641.     {"[0.3c] Fun ramp",18783},
  642.     {"[0.3c] Fun ramp",18784},
  643.     {"[0.3c] Fun ramp",18785},
  644.     {"[0.3c] Fun ramp",18786},
  645.     {"[0.3c] Fun ramp",18787},
  646.     {"[0.3c] 40m Road",18788},
  647.     {"[0.3c] 150m Road",18789},
  648.     {"[0.3c] 180 Degree Road",18790},
  649.     {"[0.3c] 45 Degree Road",18791},
  650.     {"[0.3c] Helix road",18800},
  651.     {"[0.3c] Road Loop",18801},
  652.     {"[0.3c] Bridge 150m", 18803},
  653.     {"[0.3c] Tube 50m",18808},
  654.     {"[0.3c] Glass 50m tube",18809},
  655.     {"[0.3c] Bulge 50m tube",18810},
  656.     {"[0.3c] Bulge & glass 50m tube",18811},
  657.     {"[0.3c] Spiral tube",18828},
  658.     {"[0.3c] Halfpipe",18836},
  659.     {"[0.3c] Glass Sphere",18843},
  660.     {"[0.3c] Water Sphere",18884},
  661.     {"[0.3c] Texture Sphere",18845},
  662.     {"[0.3c] Helipad",18850},
  663.     {"[0.3c] Snow",18863},
  664.     {"[0.3c] Cellphones (Until 18874)",18865},
  665.     {"[0.3c] Speed Camera",18880},
  666.     {"[0.3c] Rake",18890},
  667.     {"[0.3c] Bandanas (Until 18910)",18891},
  668.     {"[0.3c] Masks (Until 18920)",18911},
  669.     {"[0.3c] Berets (Until 18925)",18921},
  670.     {"[0.3c] Hats (Until 18935)",18926},
  671.     {"[0.3c] Helmets (Until 18938)",18936},
  672.     {"[0.3c] Bike Helmet",18976},
  673.     {"[0.3c] Bike Helmet",18979},
  674.     {"[0.3c] Ramp",19005},
  675.     {"[0.3c] Glasses (Until 19035)",19006},
  676.     {"[0.3c] Gift box",19054},
  677.     {"[0.3c] Gift box",19055},
  678.     {"[0.3c] Gift box",19056},
  679.     {"[0.3c] Christmass tree",19076},
  680.     {"[0.3c] Parrot",19078},
  681.     {"[0.3c] Laser Pointers (Until 19084)",19080},
  682.     {"[0.3c] Small disco dance Floor",19128},
  683.     {"[0.3c] Big disco dance Floor",19129},
  684.     {"[0.3c] Disco mirror ball",19159},
  685.  
  686.     {"[0.3d] Yellow taxi sign", 19308},
  687.     {"[0.3d] Black taxi sign", 19309},
  688.     {"[0.3d] White taxi sign", 19310},
  689.     {"[0.3d] Black and yellow taxi sign", 19311},
  690.     {"[0.3d] Bull Horns", 19314},
  691.     {"[0.3d] Deer", 19315},
  692.     {"[0.3d] Black bass guitar", 19317},
  693.     {"[0.3d] White flyin guitar", 19318},
  694.     {"[0.3d] Black warlock guitar", 19319},
  695.     {"[0.3d] Pumpkin", 19320},
  696.     {"[0.3d] Container", 19321},
  697.     {"[0.3d] Yellow fireman hat", 19330},
  698.     {"[0.3d] Black fireman hat", 19331},
  699.     {"[0.3d] Red hot air balloon", 19332},
  700.     {"[0.3d] Blue hot air balloon", 19333},
  701.     {"[0.3d] White hot air balloon", 19334},
  702.     {"[0.3d] Blue and yellow hot air balloon", 19335},
  703.     {"[0.3d] Red, white and purple hot air balloon", 19336},
  704.     {"[0.3d] Yellow, green and purple hot air balloon", 19337},
  705.     {"[0.3d] Red and green hot air balloon", 19338},
  706.     {"[0.3d] Coffin", 19339},
  707.     {"[0.3d] White, red & green stripes easter egg", 19341},
  708.     {"[0.3d] Purple & yellow easter egg", 19342},
  709.     {"[0.3d] Lightblue, orange & green striped easter egg", 19343},
  710.     {"[0.3d] Little yellow easter egg", 19344},
  711.     {"[0.3d] Little striped easter egg", 19345},
  712.     {"[0.3d] Hot Dog", 19346},
  713.  
  714.     {"[0.3e] Yellow police badge", 19347},
  715.     {"[0.3e] Black Cane", 19348},
  716.     {"[0.3e] Monocle", 19349},
  717.     {"[0.3e] Moustache", 19350},
  718.     {"[0.3e] Moustache", 19351},
  719.     {"[0.3e] Top Hat", 19352},
  720.  
  721.     {"[INTERIOR FURNITURE] Medium - red and white", 19353},
  722.     {"[INTERIOR FURNITURE] Medium - black striped", 19354},
  723.     {"[INTERIOR FURNITURE] Medium - white concrete", 19355},
  724.     {"[INTERIOR FURNITURE] Medium - brown wooden", 19356},
  725.     {"[INTERIOR FURNITURE] Medium - white concrete", 19357},
  726.     {"[INTERIOR FURNITURE] Medium - grey concrete", 19358},
  727.     {"[INTERIOR FURNITURE] Medium - white wooden", 19359},
  728.     {"[INTERIOR FURNITURE] Medium - red and brown wooden", 19360},
  729.     {"[INTERIOR FURNITURE] Medium - wooden", 19361},
  730.     {"[INTERIOR FURNITURE] Medium - white grain", 19362},
  731.     {"[INTERIOR FURNITURE] Medium - brown concrete", 19363},
  732.     {"[INTERIOR FURNITURE] Medium - white bricks", 19364},
  733.     {"[INTERIOR FURNITURE] Medium - white concrete", 19365},
  734.     {"[INTERIOR FURNITURE] Medium - wooden", 19366},
  735.     {"[INTERIOR FURNITURE] Medium - grey-brown concrete", 19367},
  736.     {"[INTERIOR FURNITURE] Medium - pinky-brown concrete", 19368},
  737.     {"[INTERIOR FURNITURE] Medium - white-brown concrete", 19369},
  738.     {"[INTERIOR FURNITURE] Medium - light wooden", 19370},
  739.     {"[INTERIOR FURNITURE] Medium - white concrete", 19371},
  740.     {"[INTERIOR FURNITURE] Medium - pinky grain", 19372},
  741.     {"[INTERIOR FURNITURE] Medium - dark grain", 19373},
  742.     {"[INTERIOR FURNITURE] Big - dark wooden", 19375},
  743.     {"[INTERIOR FURNITURE] Big - wooden", 19376},
  744.     {"[INTERIOR FURNITURE] Big - light grain", 19377},
  745.     {"[INTERIOR FURNITURE] Big - striped wooden", 19378},
  746.     {"[INTERIOR FURNITURE] Big - light wooden", 19379},
  747.     {"[INTERIOR FURNITURE] Big - white concrete", 19380},
  748.     {"[INTERIOR FURNITURE] Big - dark concrete", 19381},
  749.     {"[INTERIOR DOORWAY] Red and white", 19383},
  750.     {"[INTERIOR DOORWAY] Black striped", 19384},
  751.     {"[INTERIOR DOORWAY] White concrete", 19385},
  752.     {"[INTERIOR DOORWAY] Brown wooden", 19386},
  753.     {"[INTERIOR DOORWAY] White concrete", 19387},
  754.     {"[INTERIOR DOORWAY] Grey concrete", 19388},
  755.     {"[INTERIOR DOORWAY] White wooden", 19389},
  756.     {"[INTERIOR DOORWAY] Red and brown wooden", 19390},
  757.     {"[INTERIOR DOORWAY] White grain", 19391},
  758.     {"[INTERIOR DOORWAY] Brown concrete", 19392},
  759.     {"[INTERIOR DOORWAY] White bricks", 19393},
  760.     {"[INTERIOR DOORWAY] White concrete", 19394},
  761.     {"[INTERIOR DOORWAY] Wooden concrete", 19395},
  762.     {"[INTERIOR DOORWAY] Grey-brown concrete", 19396},
  763.     {"[INTERIOR DOORWAY] Pinky-brown concrete", 19397},
  764.     {"[INTERIOR DOORWAY] White-brown concrete", 19398},
  765.     {"[INTERIOR WINDOWS] Red and white", 19399},
  766.     {"[INTERIOR WINDOWS] Black striped", 19400},
  767.     {"[INTERIOR WINDOWS] White concrete", 19401},
  768.     {"[INTERIOR WINDOWS] Brown wooden", 19402},
  769.     {"[INTERIOR WINDOWS] White concrete", 19403},
  770.     {"[INTERIOR WINDOWS] Red and brown", 19404},
  771.     {"[INTERIOR WINDOWS] White grain", 19405},
  772.     {"[INTERIOR WINDOWS] Brown wooden", 19406},
  773.     {"[INTERIOR WINDOWS] Brown and orange concrete", 19407},
  774.     {"[INTERIOR WINDOWS] White grain", 19408},
  775.     {"[INTERIOR WINDOWS] Brown concrete", 19409},
  776.     {"[INTERIOR WINDOWS] White bricks", 19410},
  777.     {"[INTERIOR WINDOWS] White concrete", 19411},
  778.     {"[INTERIOR WINDOWS] Wooden", 19412},
  779.     {"[INTERIOR WINDOWS] Grey-brown concrete", 19413},
  780.     {"[INTERIOR WINDOWS] Pinky-brown concrete", 19414},
  781.     {"[INTERIOR WINDOWS] White-brown concrete", 19415},
  782.     {"[INTERIOR WINDOWS] Light wooden", 19416},
  783.     {"[INTERIOR WINDOWS] White concrete", 19417},
  784.  
  785.     {"[0.3e] Handcuffs", 19418},
  786.     {"[0.3e] Police siren (On)", 19419},
  787.     {"[0.3e] Police siren (Off)", 19420},
  788.     {"[0.3e] White headphones", 19421},
  789.     {"[0.3e] Black headphones", 19422},
  790.     {"[0.3e] Pink headphones", 19423},
  791.     {"[0.3e] Blue headphones", 19424},
  792.     {"[0.3e] Speed bump", 19425},
  793.  
  794.     {"[INTERIOR FURNITURE] Small - red and white", 19426},
  795.     {"[INTERIOR FURNITURE] Small - black striped", 19427},
  796.     {"[INTERIOR FURNITURE] Small - white concrete", 19428},
  797.     {"[INTERIOR FURNITURE] Small - brown wooden", 19429},
  798.     {"[INTERIOR FURNITURE] Small - white concrete", 19430},
  799.     {"[INTERIOR FURNITURE] Small - grey concrete", 19431},
  800.     {"[INTERIOR FURNITURE] Small - white wooden", 19432},
  801.     {"[INTERIOR FURNITURE] Small - red and brown wooden", 19433},
  802.     {"[INTERIOR FURNITURE] Small - wooden", 19434},
  803.     {"[INTERIOR FURNITURE] Small - white grain", 19435},
  804.     {"[INTERIOR FURNITURE] Small - brown concrete", 19436},
  805.     {"[INTERIOR FURNITURE] Small - white bricks", 19437},
  806.     {"[INTERIOR FURNITURE] Small - white concrete", 19438},
  807.     {"[INTERIOR FURNITURE] Small - wooden", 19439},
  808.     {"[INTERIOR FURNITURE] Small - grey-brown concrete", 19440},
  809.     {"[INTERIOR FURNITURE] Small - pinky-brown concrete", 19441},
  810.     {"[INTERIOR FURNITURE] Small - white-brown concrete", 19442},
  811.     {"[INTERIOR FURNITURE] Small - light wooden", 19443},
  812.     {"[INTERIOR FURNITURE] Small - white concrete", 19444},
  813.  
  814.     {"[INTERIOR FURNITURE] Width - red and white", 19445},
  815.     {"[INTERIOR FURNITURE] Width - black striped", 19446},
  816.     {"[INTERIOR FURNITURE] Width - white concrete", 19447},
  817.     {"[INTERIOR FURNITURE] Width - brown wooden", 19448},
  818.     {"[INTERIOR FURNITURE] Width - white concrete", 19449},
  819.     {"[INTERIOR FURNITURE] Width - grey concrete", 19450},
  820.     {"[INTERIOR FURNITURE] Width - white wooden", 19451},
  821.     {"[INTERIOR FURNITURE] Width - red and brown wooden", 19452},
  822.     {"[INTERIOR FURNITURE] Width - wooden", 19453},
  823.     {"[INTERIOR FURNITURE] Width - white grain", 19454},
  824.     {"[INTERIOR FURNITURE] Width - brown concrete", 19455},
  825.     {"[INTERIOR FURNITURE] Width - white bricks", 19456},
  826.     {"[INTERIOR FURNITURE] Width - white concrete", 19457},
  827.     {"[INTERIOR FURNITURE] Width - wooden", 19458},
  828.     {"[INTERIOR FURNITURE] Width - grey-brown concrete", 19459},
  829.     {"[INTERIOR FURNITURE] Width - pinky-brown concrete", 19460},
  830.     {"[INTERIOR FURNITURE] Width - white-brown concrete", 19461},
  831.     {"[INTERIOR FURNITURE] Width - light wooden", 19462},
  832.     {"[INTERIOR FURNITURE] Width - white concrete", 19463},
  833.  
  834.     {"[0.3e] Vehicle Barrier", 19467},
  835.     {"[0.3e] Bucket", 19468},
  836.     {"[0.3e] Scarf", 19469},
  837.     {"[0.3e] Small for sale sign", 19470},
  838.     {"[0.3e] Medium for sale sign", 19471},
  839.     {"[0.3e] Gas Mask", 19472},
  840.     {"[0.3e] Weed bush", 19473},
  841.     {"[0.3e] Poker table", 19474},
  842.     {"[0.3e] Grey SWAT helmet", 19514},
  843.     {"[0.3e] Grey SWAT armour", 19515}
  844. };
  845.  
  846. public OnPlayerConnect(playerid)
  847. {
  848.     SetPVarInt(playerid, "SelectedObject",-1);
  849.     SetPVarString(playerid, "SettingTxt", "Click_to_set");
  850.     SetPVarString(playerid, "SettingTxd", "Click_to_set");
  851.     SetPVarInt(playerid, "SettingIdx", 0);
  852.     SetPVarInt(playerid, "SettingModel", 11111);
  853.     ObjTextdraw[playerid] = PlayerText:INVALID_TEXT_DRAW;
  854.    
  855.     for(new i = 0; i < sizeof(objinfo[]); i ++)
  856.         objinfo[playerid][i] = PlayerText:INVALID_TEXT_DRAW;
  857.  
  858.     return 1;
  859. }
  860.  
  861. public OnFilterScriptInit()
  862. {
  863.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  864.         objects[i] = -1;
  865.  
  866.     for(new i = 0; i < PLAYERS; i ++)
  867.         if(IsPlayerConnected(i))
  868.             OnPlayerConnect(i);
  869.            
  870.    
  871.  
  872.     return 1;
  873. }
  874.  
  875. public OnFilterScriptExit()
  876. {
  877.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  878.     {
  879.         if(objects[i] != -1)
  880.         {
  881.             if(Attached[i] == 0 || Attached[i] == 1)
  882.                 DestroyDynamicObject(objects[i]);
  883.             else if(Attached[i] == 2)
  884.             {
  885.                 for(new a = 0; a < PLAYERS; a ++)
  886.                 {
  887.                     if(!IsPlayerConnected(a)) continue;
  888.  
  889.                     RemovePlayerAttachedObject(a,objects[i]-99999);
  890.                 }
  891.             }
  892.  
  893.             objects[i] = -1;
  894.             Attached[i] = -1;
  895.         }
  896.     }
  897.     for(new i = 0; i < PLAYERS; i ++)
  898.     {
  899.         if(!IsPlayerConnected(i))
  900.             continue;
  901.            
  902.         cmd_oinfo(i, "-1");
  903.         OnObjectEditMode(i, false);
  904.     }
  905.     return 1;
  906. }
  907.  
  908. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  909. {
  910.     if(dialogid == 1697 && response)
  911.     {
  912.         new setting = GetPVarInt(playerid, "TextSlot");
  913.         new Float:Float[6], slot = GetPVarInt(playerid, "SelectedObject");
  914.         GetDynamicObjectPos(objects[slot],Float[0],Float[1],Float[2]);
  915.         GetDynamicObjectRot(objects[slot],Float[3],Float[4],Float[5]);
  916.  
  917.         new math[1];
  918.         if(inputtext[0] == '*' || inputtext[0] == '-' || inputtext[0] == '/' || inputtext[0] == '+')
  919.         {
  920.             math[0] = inputtext[0];
  921.             strdel(inputtext,0,1);
  922.         }
  923.  
  924.         if(setting == 1)
  925.         {
  926.             if(math[0] == '*')
  927.                 Float[0] *= floatstr(inputtext);
  928.             else if(math[0] == '/')
  929.                 Float[0] /= floatstr(inputtext);
  930.             else if(math[0] == '+')
  931.                 Float[0] += floatstr(inputtext);
  932.             else if(math[0] == '-')
  933.                 Float[0] -= floatstr(inputtext);
  934.             else
  935.                 Float[0] = floatstr(inputtext);
  936.  
  937.             SetDynamicObjectPos(objects[slot],Float[0],Float[1],Float[2]);
  938.         }
  939.         else if(setting == 2)
  940.         {
  941.             if(math[0] == '*')
  942.                 Float[1] *= floatstr(inputtext);
  943.             else if(math[0] == '/')
  944.                 Float[1] /= floatstr(inputtext);
  945.             else if(math[0] == '+')
  946.                 Float[1] += floatstr(inputtext);
  947.             else if(math[0] == '-')
  948.                 Float[1] -= floatstr(inputtext);
  949.             else
  950.                 Float[1] = floatstr(inputtext);
  951.  
  952.             SetDynamicObjectPos(objects[slot],Float[0],Float[1],Float[2]);
  953.         }
  954.         else if(setting == 3)
  955.         {
  956.             if(math[0] == '*')
  957.                 Float[2] *= floatstr(inputtext);
  958.             else if(math[0] == '/')
  959.                 Float[2] /= floatstr(inputtext);
  960.             else if(math[0] == '+')
  961.                 Float[2] += floatstr(inputtext);
  962.             else if(math[0] == '-')
  963.                 Float[2] -= floatstr(inputtext);
  964.             else
  965.                 Float[2] = floatstr(inputtext);
  966.  
  967.             SetDynamicObjectPos(objects[slot],Float[0],Float[1],Float[2]);
  968.         }
  969.  
  970.         if(setting == 4)
  971.         {
  972.             if(math[0] == '*')
  973.                 Float[3] *= floatstr(inputtext);
  974.             else if(math[0] == '/')
  975.                 Float[3] /= floatstr(inputtext);
  976.             else if(math[0] == '+')
  977.                 Float[3] += floatstr(inputtext);
  978.             else if(math[0] == '-')
  979.                 Float[3] -= floatstr(inputtext);
  980.             else
  981.                 Float[3] = floatstr(inputtext);
  982.  
  983.             SetDynamicObjectRot(objects[slot],Float[3],Float[4],Float[5]);
  984.         }
  985.         else if(setting == 5)
  986.         {
  987.             if(math[0] == '*')
  988.                 Float[4] *= floatstr(inputtext);
  989.             else if(math[0] == '/')
  990.                 Float[4] /= floatstr(inputtext);
  991.             else if(math[0] == '+')
  992.                 Float[4] += floatstr(inputtext);
  993.             else if(math[0] == '-')
  994.                 Float[4] -= floatstr(inputtext);
  995.             else
  996.                 Float[4] = floatstr(inputtext);
  997.  
  998.             SetDynamicObjectRot(objects[slot],Float[3],Float[4],Float[5]);
  999.         }
  1000.         else if(setting == 6)
  1001.         {
  1002.             if(math[0] == '*')
  1003.                 Float[5] *= floatstr(inputtext);
  1004.             else if(math[0] == '/')
  1005.                 Float[5] /= floatstr(inputtext);
  1006.             else if(math[0] == '+')
  1007.                 Float[5] += floatstr(inputtext);
  1008.             else if(math[0] == '-')
  1009.                 Float[5] -= floatstr(inputtext);
  1010.             else
  1011.                 Float[5] = floatstr(inputtext);
  1012.  
  1013.             SetDynamicObjectRot(objects[slot],Float[3],Float[4],Float[5]);
  1014.         }
  1015.  
  1016.         UpdateObjectInfoTextdraws(playerid, objects[slot], slot);
  1017.     }
  1018.     if(dialogid == 1698 && response)
  1019.     {
  1020.         //if(!IsNumeric(inputtext))
  1021.             //return Error(playerid, "Only numeric models.");
  1022.  
  1023.         new slot = GetPVarInt(playerid, "SelectedObject");
  1024.         format(msg, sizeof(msg),"%d",strval(inputtext));
  1025.         cmd_oswap(playerid, msg);
  1026.         UpdateObjectInfoTextdraws(playerid, objects[slot], slot);
  1027.     }
  1028.  
  1029.     if(dialogid == 1699 && response)
  1030.     {
  1031.         new slot = GetPVarInt(playerid, "SelectedObject");
  1032.  
  1033.         new model,txd[24],txtna[24],hex;
  1034.         if (sscanf(inputtext, "issh", model,txd,txtna,hex))
  1035.             if(strcmp(inputtext,"None",true))
  1036.                 return ShowPlayerDialog(playerid, 1799, DIALOG_STYLE_INPUT,"NEW VALUES - {FF0000}WRONG SYNTAX","{FFFFFF}Type on the box below the new value for {FFFF00}MAT\n{BBBBBB}Syntax: model txd txt color\nType in \"None\" to clear field.","Ok","Cancel");
  1037.  
  1038.         new setting = GetPVarInt(playerid, "TextSlot");
  1039.         if(setting == 7)
  1040.         { // mat 0
  1041.             if(strcmp(inputtext,"None",true) == 0)
  1042.             {
  1043.                 SetDynamicObjectMaterial(objects[slot],0,objectmodel[slot],"None","None",0);
  1044.                 objectmatinfo[slot][0] = "None";
  1045.             }
  1046.             else
  1047.             {
  1048.                 SetDynamicObjectMaterial(objects[slot],0,model,txd,txtna,hex);
  1049.                 format(objectmatinfo[slot][0], 64,"%d %s %s %x",model,txd,txtna,hex);
  1050.             }
  1051.         }
  1052.         else if(setting == 8)
  1053.         { // mat 1
  1054.             if(strcmp(inputtext,"None",true) == 0)
  1055.             {
  1056.                 SetDynamicObjectMaterial(objects[slot],1,objectmodel[slot],"None","None",0);
  1057.                 objectmatinfo[slot][1] = "None";
  1058.             }
  1059.             else
  1060.             {
  1061.                 SetDynamicObjectMaterial(objects[slot],1,model,txd,txtna,hex);
  1062.                 format(objectmatinfo[slot][1], 64,"%d %s %s %x",model,txd,txtna,hex);
  1063.             }
  1064.         }
  1065.         else if(setting == 9)
  1066.         { // mat 2
  1067.             if(strcmp(inputtext,"None",true) == 0)
  1068.             {
  1069.                 SetDynamicObjectMaterial(objects[slot],2,objectmodel[slot],"None","None",0);
  1070.                 objectmatinfo[slot][2] = "None";
  1071.             }
  1072.             else
  1073.             {
  1074.                 SetDynamicObjectMaterial(objects[slot],2,model,txd,txtna,hex);
  1075.                 format(objectmatinfo[slot][2], 64,"%d %s %s %x",model,txd,txtna,hex);
  1076.             }
  1077.         }
  1078.  
  1079.         UpdateObjectInfoTextdraws(playerid, objects[slot], slot);
  1080.  
  1081.     }
  1082.     if(dialogid == 1701 && response)
  1083.     {
  1084.         new slot = GetPVarInt(playerid, "SelectedObject");
  1085.         new setting = GetPVarInt(playerid, "TextSlot");
  1086.         if(setting == 10)
  1087.         {
  1088.             //if(!IsNumeric(inputtext))
  1089.                 //return Error(playerid, "Must be numeric.");
  1090.  
  1091.             SetPVarInt(playerid, "SettingIdx",strval(inputtext));
  1092.         }
  1093.         else if(setting == 11)
  1094.         {
  1095.             //if(!IsNumeric(inputtext))
  1096.                 //return Error(playerid, "Must be numeric.");
  1097.  
  1098.             SetPVarInt(playerid, "SettingModel",strval(inputtext));
  1099.         }
  1100.         else if(setting == 12)
  1101.             SetPVarString(playerid, "SettingTxd", inputtext);
  1102.         else if(setting == 13)
  1103.             SetPVarString(playerid, "SettingTxt", inputtext);
  1104.  
  1105.         UpdateObjectInfoTextdraws(playerid, objects[slot], slot);
  1106.     }
  1107.     if(dialogid == 1702 && response)
  1108.     {
  1109.         //if(!IsNumeric(inputtext))
  1110.             //return ShowPlayerDialog(playerid, 1802, DIALOG_STYLE_INPUT,"NEW OBJECT - {FF0000}INVALID MODEL","Type on the box below the {FFFF00}model {FFFFFF}for the {FFFF00}new object\n{BBBBBB}Syntax: <model>","Ok","Cancel");
  1111.  
  1112.         format(msg, 12, "%d", strval(inputtext));
  1113.         cmd_ocreate(playerid, msg);
  1114.     }
  1115.     return 0;
  1116. }
  1117.  
  1118. public OnPlayerCommandReceived(playerid, cmdtext[])
  1119. {
  1120.     if(!IsPlayerAdmin(playerid)) return 0;
  1121.     return 1;
  1122. }
  1123.  
  1124.  
  1125. public OnPlayerDisconnect(playerid, reason)
  1126. {
  1127.     OnObjectEditMode(playerid,false);
  1128.     return 1;
  1129. }
  1130.  
  1131. stock Float:GetAngleToPoint(Float:fDestX, Float:fDestY, Float:fPointX, Float:fPointY)
  1132.     return atan2((fDestY - fPointY), (fDestX - fPointX)) + 180.0;
  1133.  
  1134. public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
  1135. {
  1136.     if(PRESSED(KEY_YES))
  1137.     {
  1138.         if(GetPVarInt(playerid, "SelectedObject") != -1)
  1139.         {
  1140.             cmd_ocopy(playerid, "");
  1141.         }
  1142.     }
  1143.     if(PRESSED(KEY_NO))
  1144.     {
  1145.         if(GetPVarInt(playerid, "SelectedObject") != -1)
  1146.         {
  1147.             cmd_odestroy(playerid, "");
  1148.         }
  1149.     }
  1150.     if(PRESSED(KEY_CTRL_BACK))
  1151.     {
  1152.         new mapname[64];
  1153.         if(GetPVarString(playerid,"LastSavedMap", mapname, 64))
  1154.             SaveMap(playerid, mapname);
  1155.     }
  1156.     if(PRESSED(KEY_ACTION) && GetPVarInt(playerid,"oinfo"))
  1157.     {
  1158.         if(timestamp() - GetPVarInt(playerid,"LastAction") == 0)
  1159.             SelectTextDraw(playerid, 0xBBBBBBBB);
  1160.  
  1161.         SetPVarInt(playerid,"LastAction",timestamp());
  1162.     }
  1163.     return 0;
  1164. }
  1165.  
  1166. stock Float:floatrand(Float:min, Float:max) //By Alex "Y_Less" Cole
  1167. {
  1168.     new imin = floatround(min);
  1169.     return floatdiv(float(random((floatround(max)-imin)*100)+(imin*100)),100.0);
  1170. }
  1171.  
  1172.  
  1173.  
  1174. // -------------------- Objects ------------------------
  1175. CMD:loadmap(playerid, params[])
  1176. {
  1177.     new mapname[64],slotname[5];
  1178.     if (sscanf(params, "s[64]", mapname))
  1179.     {
  1180.         Usage(playerid, "/loadmap <mapname>");
  1181.         Warning(playerid, "All the current created objects will be deleted when you load a map!");
  1182.         return 1;
  1183.     }
  1184.  
  1185.     new map[64];
  1186.     format(map, sizeof(map),"maps/%s.ini",mapname);
  1187.  
  1188.     if(!dini_Exists(map))
  1189.         return Error(playerid, "Map doesn't exists!");
  1190.  
  1191.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  1192.     {
  1193.         if(IsValidDynamicObject(objects[i]))
  1194.         {
  1195.             DestroyDynamicObject(objects[i]);
  1196.         }
  1197.     }
  1198.     new amount = dini_Int(map,"Objects");
  1199.     new model,Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz;
  1200.     SetPVarInt(playerid,"Objects",amount);
  1201.  
  1202.     for(new i = 0; i < amount; i ++)
  1203.     {
  1204.         format(slotname, sizeof(slotname),"%d",i);
  1205.         sscanf(dini_Get(map,slotname),"p<,>iffffffs[256]",model,x,y,z,rx,ry,rz,bigmatinfo);
  1206.         objects[i] = CreateDynamicObject(model,x,y,z,rx,ry,rz);
  1207.         objectmodel[i] = model;
  1208.         SetMaterials(i);
  1209.     }
  1210.    
  1211.     UpdateNearPlayers(playerid);
  1212.     Info(playerid, "Map has been loaded");
  1213.  
  1214.     return 1;
  1215. }
  1216.  
  1217. stock SetMaterials(slot)
  1218. {
  1219.     sscanf(bigmatinfo,"p<|>s[64]s[64]s[64]",objectmatinfo[slot][0]
  1220.     ,objectmatinfo[slot][1],objectmatinfo[slot][2]);
  1221.  
  1222.     if(strcmp(objectmatinfo[slot][0],"None",true))
  1223.         ApplyDynamicObjectMaterial(objects[slot],slot,0);
  1224.     if(strcmp(objectmatinfo[slot][1],"None",true))
  1225.         ApplyDynamicObjectMaterial(objects[slot],slot,1);
  1226.     if(strcmp(objectmatinfo[slot][2],"None",true))
  1227.         ApplyDynamicObjectMaterial(objects[slot],slot,2);
  1228.     return 1;
  1229. }
  1230.  
  1231. stock ApplyDynamicObjectMaterial(object,slot,index)
  1232. {
  1233.     new integer,strings[2][16],hex;
  1234.     if(index == 0)
  1235.         sscanf(objectmatinfo[slot][0],"is[16]s[16]h",integer,strings[0],strings[1],hex);
  1236.     else if(index == 1)
  1237.         sscanf(objectmatinfo[slot][1],"is[16]s[16]h",integer,strings[0],strings[1],hex);
  1238.     else if(index == 2)
  1239.         sscanf(objectmatinfo[slot][2],"is[16]s[16]h",integer,strings[0],strings[1],hex);
  1240.  
  1241.     SetDynamicObjectMaterial(object,index,integer,strings[0],strings[1],hex);
  1242.     return 1;
  1243. }
  1244.  
  1245.  
  1246. CMD:deletemap(playerid, params[])
  1247. {
  1248.     new mapname[24];
  1249.     if (sscanf(params, "s[24]", mapname))
  1250.     {
  1251.         Usage(playerid, "/deletemap <mapname>");
  1252.         Warning(playerid, "You cannot un-do this!");
  1253.         return 1;
  1254.     }
  1255.  
  1256.     new map[64];
  1257.     format(map, sizeof(map),"maps/%s.ini",mapname);
  1258.  
  1259.     if(!dini_Exists(map))
  1260.         return Error(playerid, "Map doesn't exists!");
  1261.  
  1262.     fremove(map);
  1263.     Info(playerid,"Map has been destroyed!");
  1264.     return 1;
  1265. }
  1266.  
  1267. CMD:exportmap(playerid, params[])
  1268. {
  1269.     new mapname[64],function[24];
  1270.     if (sscanf(params, "s[24]s[64]",function, mapname))
  1271.         return Usage(playerid, "/exportmap <function> <mapname>");
  1272.  
  1273.     ExportMap(playerid, mapname, function);
  1274.     return 1;
  1275. }
  1276.  
  1277. CMD:savemap(playerid, params[])
  1278. {
  1279.     new mapname[64];
  1280.     if (sscanf(params, "s[64]", mapname))
  1281.         return Usage(playerid, "/savemap <mapname>");
  1282.  
  1283.     if(strfind("temp",mapname,true) != -1)
  1284.         return Error(playerid, "Your map may not contain the 'Temp' word in it's name.");
  1285.  
  1286.     SaveMap(playerid, mapname);
  1287.     return 1;
  1288. }
  1289.  
  1290. CMD:resetrx(playerid, params[])
  1291. {
  1292.     if (strlen(params)) return Usage(playerid,"/resetrx");
  1293.  
  1294.     new editting = GetPVarInt(playerid, "SelectedObject");
  1295.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  1296.  
  1297.     SetPVarInt(playerid,"Modifying",1);
  1298.     CancelEdit(playerid);
  1299.     new Float:RX,Float:RY,Float:RZ;
  1300.     GetDynamicObjectRot(objects[editting],RX,RY,RZ);
  1301.     SetDynamicObjectRot(objects[editting],0.0,RY,RZ);
  1302.     if(IsPlayerEdittingObject(playerid))
  1303.         EditDynamicObject(playerid,objects[editting]);
  1304.     UpdateObjectInfoTextdraws(playerid,objects[editting],editting);
  1305.     UpdateObjectTextdraw(playerid, "(resetted RX)");
  1306.     return 1;
  1307. }
  1308.  
  1309. CMD:resetrz(playerid, params[])
  1310. {
  1311.     if (strlen(params)) return Usage(playerid,"/resetrz");
  1312.  
  1313.     new editting = GetPVarInt(playerid, "SelectedObject");
  1314.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  1315.  
  1316.     SetPVarInt(playerid,"Modifying",1);
  1317.     CancelEdit(playerid);
  1318.     new Float:RX,Float:RY,Float:RZ;
  1319.     GetDynamicObjectRot(objects[editting],RX,RY,RZ);
  1320.     SetDynamicObjectRot(objects[editting],RX,RY,0.0);
  1321.     if(IsPlayerEdittingObject(playerid))
  1322.         EditDynamicObject(playerid,objects[editting]);
  1323.     UpdateObjectInfoTextdraws(playerid,objects[editting],editting);
  1324.     UpdateObjectTextdraw(playerid, "(resetted RZ)");
  1325.     return 1;
  1326. }
  1327.  
  1328. CMD:resetry(playerid, params[])
  1329. {
  1330.     if (strlen(params)) return Usage(playerid,"/resetry");
  1331.  
  1332.     new editting = GetPVarInt(playerid, "SelectedObject");
  1333.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  1334.  
  1335.     SetPVarInt(playerid,"Modifying",1);
  1336.     CancelEdit(playerid);
  1337.     new Float:RX,Float:RY,Float:RZ;
  1338.     GetDynamicObjectRot(objects[editting],RX,RY,RZ);
  1339.     SetDynamicObjectRot(objects[editting],RX,0.0,RZ);
  1340.     if(IsPlayerEdittingObject(playerid))
  1341.         EditDynamicObject(playerid,objects[editting]);
  1342.     UpdateObjectInfoTextdraws(playerid,objects[editting],editting);
  1343.     UpdateObjectTextdraw(playerid, "(resetted RY)");
  1344.     return 1;
  1345. }
  1346.  
  1347. CMD:rx(playerid, params[])
  1348. {
  1349.     new Float:amount;
  1350.     if (sscanf(params, "F(5.0)", amount))
  1351.         return Usage(playerid, "/rx <coordinates>");
  1352.  
  1353.     new editting = GetPVarInt(playerid, "SelectedObject");
  1354.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  1355.  
  1356.     SetPVarInt(playerid,"Modifying",1);
  1357.     CancelEdit(playerid);
  1358.     new Float:RX,Float:RY,Float:RZ;
  1359.     GetDynamicObjectRot(objects[editting],RX,RY,RZ);
  1360.     SetDynamicObjectRot(objects[editting],RX+amount,RY,RZ);
  1361.     if(IsPlayerEdittingObject(playerid))
  1362.         EditDynamicObject(playerid,objects[editting]);
  1363.     UpdateObjectInfoTextdraws(playerid,objects[editting],editting);
  1364.     format(msg, sizeof(msg),"(RX %s)",ProcessFloat(amount));
  1365.     UpdateObjectTextdraw(playerid, msg);
  1366.     return 1;
  1367. }
  1368.  
  1369. CMD:rxall(playerid,params[])
  1370. {
  1371.     new Float:amount;
  1372.     if (sscanf(params, "F(1.0)", amount))
  1373.         return Usage(playerid, "/rxall <coordinates>");
  1374.  
  1375.     new Float:X,Float:Y,Float:Z;
  1376.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  1377.     {
  1378.         GetDynamicObjectRot(objects[i],X,Y,Z);
  1379.         SetDynamicObjectRot(objects[i],X+amount,Y,Z);
  1380.     }
  1381.     format(msg, sizeof(msg),"(RX %s)",ProcessFloat(amount));
  1382.     UpdateObjectTextdraw(playerid, msg);
  1383.     return 1;
  1384. }
  1385.  
  1386. CMD:rz(playerid, params[])
  1387. {
  1388.     new Float:amount;
  1389.     if (sscanf(params, "F(5.0)", amount))
  1390.         return Usage(playerid, "/rz <coordinates>");
  1391.  
  1392.     new editting = GetPVarInt(playerid, "SelectedObject");
  1393.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  1394.  
  1395.     SetPVarInt(playerid,"Modifying",1);
  1396.     CancelEdit(playerid);
  1397.     new Float:RX,Float:RY,Float:RZ;
  1398.     GetDynamicObjectRot(objects[editting],RX,RY,RZ);
  1399.     SetDynamicObjectRot(objects[editting],RX,RY,RZ+amount);
  1400.     if(IsPlayerEdittingObject(playerid))
  1401.         EditDynamicObject(playerid,objects[editting]);
  1402.     UpdateObjectInfoTextdraws(playerid,objects[editting],editting);
  1403.     format(msg, sizeof(msg),"(RZ %s)",ProcessFloat(amount));
  1404.     UpdateObjectTextdraw(playerid, msg);
  1405.     return 1;
  1406. }
  1407.  
  1408. CMD:rzall(playerid,params[])
  1409. {
  1410.     new Float:amount;
  1411.     if (sscanf(params, "F(1.0)", amount))
  1412.         return Usage(playerid, "/rzall <coordinates>");
  1413.  
  1414.     new Float:X,Float:Y,Float:Z;
  1415.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  1416.     {
  1417.         GetDynamicObjectRot(objects[i],X,Y,Z);
  1418.         SetDynamicObjectRot(objects[i],X,Y,Z+amount);
  1419.     }
  1420.     format(msg, sizeof(msg),"(RZ %s)",ProcessFloat(amount));
  1421.     UpdateObjectTextdraw(playerid, msg);
  1422.     return 1;
  1423. }
  1424.  
  1425. CMD:ry(playerid, params[])
  1426. {
  1427.     new Float:amount;
  1428.     if (sscanf(params, "F(5.0)", amount))
  1429.         return Usage(playerid, "/ry <coordinates>");
  1430.  
  1431.     new editting = GetPVarInt(playerid, "SelectedObject");
  1432.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  1433.  
  1434.     SetPVarInt(playerid,"Modifying",1);
  1435.     CancelEdit(playerid);
  1436.     new Float:RX,Float:RY,Float:RZ;
  1437.     GetDynamicObjectRot(objects[editting],RX,RY,RZ);
  1438.     SetDynamicObjectRot(objects[editting],RX,RY+amount,RZ);
  1439.     if(IsPlayerEdittingObject(playerid))
  1440.         EditDynamicObject(playerid,objects[editting]);
  1441.     UpdateObjectInfoTextdraws(playerid,objects[editting],editting);
  1442.     format(msg, sizeof(msg),"(RY %s)",ProcessFloat(amount));
  1443.     UpdateObjectTextdraw(playerid, msg);
  1444.     return 1;
  1445. }
  1446.  
  1447. CMD:ryall(playerid,params[])
  1448. {
  1449.     new Float:amount;
  1450.     if (sscanf(params, "F(1.0)", amount))
  1451.         return Usage(playerid, "/ryall <coordinates>");
  1452.  
  1453.     new Float:X,Float:Y,Float:Z;
  1454.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  1455.     {
  1456.         GetDynamicObjectRot(objects[i],X,Y,Z);
  1457.         SetDynamicObjectRot(objects[i],X,Y+amount,Z);
  1458.     }
  1459.     format(msg, sizeof(msg),"(RY %s)",ProcessFloat(amount));
  1460.     UpdateObjectTextdraw(playerid, msg);
  1461.     return 1;
  1462. }
  1463.  
  1464. CMD:oy(playerid, params[])
  1465. {
  1466.     new Float:amount;
  1467.     if (sscanf(params, "F(1.0)", amount))
  1468.         return Usage(playerid, "/oy <coordinates>");
  1469.  
  1470.     new editting = GetPVarInt(playerid, "SelectedObject");
  1471.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  1472.  
  1473.     new Float:X,Float:Y,Float:Z;
  1474.     GetDynamicObjectPos(objects[editting],X,Y,Z);
  1475.     SetDynamicObjectPos(objects[editting],X,Y+amount,Z);
  1476.     UpdateObjectInfoTextdraws(playerid,objects[editting],editting);
  1477.     format(msg, sizeof(msg),"(Y %s)",ProcessFloat(amount));
  1478.     UpdateObjectTextdraw(playerid, msg);
  1479.     return 1;
  1480. }
  1481.  
  1482. CMD:oyall(playerid,params[])
  1483. {
  1484.     new Float:amount;
  1485.     if (sscanf(params, "F(1.0)", amount))
  1486.         return Usage(playerid, "/oyall <coordinates>");
  1487.  
  1488.     new Float:X,Float:Y,Float:Z;
  1489.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  1490.     {
  1491.         GetDynamicObjectPos(objects[i],X,Y,Z);
  1492.         SetDynamicObjectPos(objects[i],X,Y+amount,Z);
  1493.     }
  1494.     format(msg, sizeof(msg),"(Y %s)",ProcessFloat(amount));
  1495.     UpdateObjectTextdraw(playerid, msg);
  1496.     return 1;
  1497. }
  1498.  
  1499. CMD:oz(playerid, params[])
  1500. {
  1501.     new Float:amount;
  1502.     if (sscanf(params, "F(1.0)", amount))
  1503.         return Usage(playerid, "/oz <coordinates>");
  1504.  
  1505.     new editting = GetPVarInt(playerid, "SelectedObject");
  1506.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  1507.  
  1508.     new Float:X,Float:Y,Float:Z;
  1509.     GetDynamicObjectPos(objects[editting],X,Y,Z);
  1510.     SetDynamicObjectPos(objects[editting],X,Y,Z+amount);
  1511.     UpdateObjectInfoTextdraws(playerid,objects[editting],editting);
  1512.     format(msg, sizeof(msg),"(Z %s)",ProcessFloat(amount));
  1513.     UpdateObjectTextdraw(playerid, msg);
  1514.     return 1;
  1515. }
  1516.  
  1517. CMD:ozall(playerid,params[])
  1518. {
  1519.     new Float:amount;
  1520.     if (sscanf(params, "F(1.0)", amount))
  1521.         return Usage(playerid, "/ozall <coordinates>");
  1522.  
  1523.     new Float:X,Float:Y,Float:Z;
  1524.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  1525.     {
  1526.         GetDynamicObjectPos(objects[i],X,Y,Z);
  1527.         SetDynamicObjectPos(objects[i],X,Y,Z+amount);
  1528.     }
  1529.     format(msg, sizeof(msg),"(Z %s)",ProcessFloat(amount));
  1530.     UpdateObjectTextdraw(playerid, msg);
  1531.     return 1;
  1532. }
  1533.  
  1534. CMD:ox(playerid, params[])
  1535. {
  1536.     new Float:amount;
  1537.     if (sscanf(params, "F(1.0)", amount))
  1538.         return Usage(playerid, "/ox <coordinates>");
  1539.  
  1540.     new editting = GetPVarInt(playerid, "SelectedObject");
  1541.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  1542.  
  1543.     new Float:X,Float:Y,Float:Z;
  1544.     GetDynamicObjectPos(objects[editting],X,Y,Z);
  1545.     SetDynamicObjectPos(objects[editting],X+amount,Y,Z);
  1546.     UpdateObjectInfoTextdraws(playerid,objects[editting],editting);
  1547.     format(msg, sizeof(msg),"(X %s)",ProcessFloat(amount));
  1548.     UpdateObjectTextdraw(playerid, msg);
  1549.     return 1;
  1550. }
  1551.  
  1552. CMD:oxall(playerid,params[])
  1553. {
  1554.     new Float:amount;
  1555.     if (sscanf(params, "F(1.0)", amount))
  1556.         return Usage(playerid, "/oxall <coordinates>");
  1557.  
  1558.     new Float:X,Float:Y,Float:Z;
  1559.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  1560.     {
  1561.         GetDynamicObjectPos(objects[i],X,Y,Z);
  1562.         SetDynamicObjectPos(objects[i],X+amount,Y,Z);
  1563.     }
  1564.     format(msg, sizeof(msg),"(X %s)",ProcessFloat(amount));
  1565.     UpdateObjectTextdraw(playerid, msg);
  1566.     return 1;
  1567. }
  1568.  
  1569. stock ProcessFloat(Float:floatp)
  1570. {
  1571.     new procss[12];
  1572.     if(floatp >= 0.0)
  1573.         format(procss, sizeof(procss),"+%.1f",floatp);
  1574.     else
  1575.         format(procss, sizeof(procss),"%.1f",floatp);
  1576.  
  1577.     return procss;
  1578. }
  1579.  
  1580. CMD:oattachveh(playerid,params[])
  1581. {
  1582.     if(!IsPlayerInAnyVehicle(playerid))
  1583.         return Error(playerid, "you must be in a vehicle!");
  1584.  
  1585.     new vehicle = GetPlayerVehicleID(playerid);
  1586.  
  1587.     new Float:ox,Float:oy,Float:oz,Float:rx,Float:ry,Float:rz;
  1588.     if (sscanf(params, "F(0.0)F(0.0)F(0.0)F(0.0)F(0.0)F(0.0)", ox,oy,oz,rx,ry,rz))
  1589.         return Usage(playerid, "/attachveh <OffsetX> <OffsetY> <OffsetZ>");
  1590.  
  1591.     new editting = GetPVarInt(playerid, "SelectedObject");
  1592.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  1593.  
  1594.     AttachDynamicObjectToVehicle(objects[editting],vehicle,ox,oy,oz,rx,ry,rz);
  1595.  
  1596.     format(msg, sizeof(msg),"Object id %d has been attached on slot %d. Use /odestroy if you wish to remove it.",editting,editting);
  1597.     Info(playerid, msg);
  1598.     return 1;
  1599. }
  1600.  
  1601. CMD:otextmatset(playerid,params[])
  1602. {
  1603.     new index, size, font[24], fontsize, bold, fontcolor, backcolor, alignment;
  1604.     if (sscanf(params, "iI(60)S(Arial)[12]I(24)I(1)H(0xFFFFFFFF)H(0x00000000)I(0)",index,size,font,fontsize,bold,fontcolor,backcolor,alignment))
  1605.         return Usage(playerid, "/otextmatset <index> <size(60)> <font(Arial)> <font size(24)> <bold(1)> <fontcolor (ARGB)> <backcolour (ARGB)>");
  1606.  
  1607.     format(msg, sizeof(msg),"%d %d %s %d %d %x %x %d",index,size,font,fontsize,bold,fontcolor,backcolor,alignment);
  1608.     SetPVarString(playerid, "otextmat", msg);
  1609.     return 1;
  1610. }
  1611.  
  1612. CMD:otextmat(playerid, params[])
  1613. {
  1614.     new txt[144];
  1615.     if (sscanf(params, "s[144]", txt))
  1616.         return Usage(playerid, "/otextmat <txt>");
  1617.  
  1618.     new editting = GetPVarInt(playerid, "SelectedObject");
  1619.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  1620.  
  1621.     new variables[7],font[12];
  1622.     GetPVarString(playerid, "otextmat", msg, sizeof(msg));
  1623.     sscanf(msg, "iis[12]iihhi",variables[0],variables[1],font,variables[2],variables[3],variables[4],variables[5],variables[6]);
  1624.  
  1625.     SetDynamicObjectMaterialText(objects[editting],variables[0],txt,variables[1],font,variables[2],variables[3],variables[4],variables[5],variables[6]);
  1626.     return 1;
  1627. }
  1628.  
  1629. CMD:oclearmat(playerid, params[])
  1630. {
  1631.     new index;
  1632.     if (sscanf(params, "i", index))
  1633.         return Usage(playerid, "/oclearmat <index>");
  1634.  
  1635.     new editting = GetPVarInt(playerid, "SelectedObject");
  1636.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  1637.  
  1638.     SetDynamicObjectMaterial(objects[editting],index,objectmodel[editting],"None","None",0);
  1639.     objectmatinfo[editting][index] = "None";
  1640.  
  1641.     UpdateObjectInfoTextdraws(playerid,objects[editting],editting);
  1642.     return 1;
  1643. }
  1644.  
  1645. CMD:omat(playerid, params[])
  1646. {
  1647.     new model,index,txd[24],txtna[24],hex;
  1648.     if (sscanf(params, "iiS(none)[24]S(none)[24]H(0)", index,model,txd,txtna,hex))
  1649.         return Usage(playerid, "/omat <index> <model> [txd name] [texture name] [color (AGRB)]");
  1650.  
  1651.     new editting = GetPVarInt(playerid, "SelectedObject");
  1652.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  1653.  
  1654.     SetDynamicObjectMaterial(objects[editting],index,model,txd,txtna,hex);
  1655.     format(objectmatinfo[editting][index], 64,"%d %s %s %x",model,txd,txtna,hex);
  1656.  
  1657.     UpdateObjectInfoTextdraws(playerid,objects[editting],editting);
  1658.     return 1;
  1659. }
  1660.  
  1661. CMD:oswap(playerid, params[])
  1662. {
  1663.     new model;
  1664.     if (sscanf(params, "i", model))
  1665.         return Usage(playerid, "/oswap <model>");
  1666.  
  1667.     new editting = GetPVarInt(playerid, "SelectedObject");
  1668.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  1669.  
  1670.     new Float:X,Float:Y,Float:Z,Float:RX,Float:RY,Float:RZ;
  1671.     GetDynamicObjectPos(objects[editting],X,Y,Z);
  1672.     GetDynamicObjectRot(objects[editting],RX,RY,RZ);
  1673.  
  1674.     format(msg, sizeof(msg),"Object on slot %d Swapped from model %d to model %d.",editting,objectmodel[editting],model);
  1675.     Info(playerid, msg);
  1676.  
  1677.     DestroyDynamicObject(objects[editting]);
  1678.     objects[editting] = CreateDynamicObject(model,X,Y,Z,RX,RY,RZ);
  1679.     objectmodel[editting] = model;
  1680.     ApplyDynamicObjectMaterial(objects[editting],editting,0);
  1681.     ApplyDynamicObjectMaterial(objects[editting],editting,1);
  1682.     ApplyDynamicObjectMaterial(objects[editting],editting,2);
  1683.     UpdateNearPlayers(playerid);
  1684.     UpdateObjectInfoTextdraws(playerid,objects[editting],editting);
  1685.     return 1;
  1686. }
  1687.  
  1688. CMD:oinfo(playerid, params[])
  1689. {
  1690.     new slot;
  1691.     if (sscanf(params, "i", slot))
  1692.         slot = 999;
  1693.  
  1694.     if(slot == -1)
  1695.     {
  1696.         SetPVarInt(playerid, "SelectedObject", -1);
  1697.         if(GetPVarInt(playerid,"Created"))
  1698.         {
  1699.             DeletePVar(playerid,"oinfo");
  1700.             CancelSelectTextDraw(playerid);
  1701.             DeletePVar(playerid,"Created");
  1702.             DestroyObjectInfoTextdraws(playerid);
  1703.         }
  1704.         return 1;
  1705.     }
  1706.     else
  1707.         SetPVarInt(playerid, "SelectedObject", slot);
  1708.  
  1709.     if(slot != 999 && !IsValidDynamicObject(objects[slot]))
  1710.         return Error(playerid, "There's nothing on this slot!");
  1711.  
  1712.     if(!GetPVarInt(playerid,"Created"))
  1713.         CreateObjectInfoTextdraws(playerid);
  1714.  
  1715.     if(!GetPVarInt(playerid,"oinfo"))
  1716.         Tip(playerid, "If your textdraw selection pointer dissapears, press the key ~k~~PED_ANSWER_PHONE~ twice within a second and it will re-appear.");
  1717.  
  1718.     SetPVarInt(playerid,"oinfo",1);
  1719.     SelectTextDraw(playerid, 0xBBBBBBBB);
  1720.     ShowObjectInfoTextdraws(playerid);
  1721.  
  1722.     if(slot == 999)
  1723.     {
  1724.         for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  1725.         {
  1726.             if(objects[i] != -1 && IsValidDynamicObject(objects[i]))
  1727.             {
  1728.                 slot = i;
  1729.                 break;
  1730.             }
  1731.         }
  1732.         if(slot == 999)
  1733.         {
  1734.             UpdateObjectInfoTextdraws(playerid, objects[0], slot);
  1735.         }
  1736.         else
  1737.         {
  1738.             SetPVarInt(playerid, "SelectedObject", slot);
  1739.             UpdateObjectInfoTextdraws(playerid, objects[slot], slot);
  1740.         }
  1741.     }
  1742.     else
  1743.         UpdateObjectInfoTextdraws(playerid, objects[slot], slot);
  1744.  
  1745.  
  1746.     if(GetPVarInt(playerid,"SettingIdx") == 0)
  1747.         PlayerTextDrawHide(playerid, objinfo[playerid][31]);
  1748.     return 1;
  1749. }
  1750.  
  1751. CMD:oget(playerid, params[])
  1752. {
  1753.     new slot;
  1754.     if (sscanf(params, "i", slot))
  1755.         return Usage(playerid, "/oget <slot>");
  1756.  
  1757.     if(!IsValidDynamicObject(objects[slot]))
  1758.         return Error(playerid, "There's nothing on this slot!");
  1759.  
  1760.     new Float:X,Float:Y,Float:Z;
  1761.     GetPlayerPos(playerid,X,Y,Z);
  1762.     GetXYInFrontOfPlayer(playerid, X,Y,5.0);
  1763.  
  1764.     SetDynamicObjectPos(objects[slot],X,Y,Z);
  1765.     UpdateObjectInfoTextdraws(playerid,objects[slot],slot);
  1766.     Info(playerid,"Successfully teleported.");
  1767.     return 1;
  1768. }
  1769.  
  1770. CMD:ogoto(playerid, params[])
  1771. {
  1772.     new slot;
  1773.     if (sscanf(params, "i", slot))
  1774.         return Usage(playerid, "/ogoto <slot>");
  1775.  
  1776.     if(!IsValidDynamicObject(objects[slot]))
  1777.         return Error(playerid, "There's nothing on this slot!");
  1778.  
  1779.     new Float:X,Float:Y,Float:Z;
  1780.     GetDynamicObjectPos(objects[slot],X,Y,Z);
  1781.     SetPlayerPos(playerid, X,Y,Z+2);
  1782.  
  1783.     return 1;
  1784. }
  1785.  
  1786. CMD:ostop(playerid,params[])
  1787. {
  1788.     if (strlen(params)) return Usage(playerid,"/ostop");
  1789.  
  1790.     new slot = GetPVarInt(playerid, "SelectedObject");
  1791.     if(slot == -1) return Error(playerid, "You don't have any object selected. Use /osel first.");
  1792.  
  1793.     SetPVarInt(playerid,"Modifying",1);
  1794.     CancelEdit(playerid);
  1795.     StopDynamicObject(objects[slot]);
  1796.     if(IsPlayerEdittingObject(playerid))
  1797.         EditDynamicObject(playerid,objects[slot]);
  1798.     UpdateObjectTextdraw(playerid, "(stopped)");
  1799.  
  1800.     format(msg, sizeof(msg),"Object on slot %d has been stopped if it was moving.",slot);
  1801.     Info(playerid,msg);
  1802.     return 1;
  1803. }
  1804.  
  1805. CMD:ostopall(playerid,params[])
  1806. {
  1807.     if (strlen(params)) return Usage(playerid,"/ostopall");
  1808.  
  1809.     new editting = GetPVarInt(playerid, "SelectedObject");
  1810.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  1811.     {
  1812.         if(objects[i] != -1 && IsValidDynamicObject(objects[i]))
  1813.         {
  1814.             if(i == editting)
  1815.             {
  1816.                 SetPVarInt(playerid,"Modifying",1);
  1817.                 CancelEdit(playerid);
  1818.             }
  1819.             StopDynamicObject(objects[i]);
  1820.             if(i == editting)
  1821.             {
  1822.                 if(IsPlayerEdittingObject(playerid))
  1823.                     EditDynamicObject(playerid,objects[i]);
  1824.                 UpdateObjectTextdraw(playerid, "(stopped)");
  1825.             }
  1826.         }
  1827.     }
  1828.     return 1;
  1829. }
  1830.  
  1831. CMD:omovetop(playerid, params[])
  1832. {
  1833.     new Float:speed, targetid;
  1834.     if (sscanf(params, "uf", targetid,speed))
  1835.         return Usage(playerid, "/omovetop <player> <speed>");
  1836.  
  1837.     if(!IsPlayerConnected(targetid)) return Error(playerid, "That player is not connected.");
  1838.  
  1839.     new editting = GetPVarInt(playerid, "SelectedObject");
  1840.     if(editting == -1) return Error(playerid, "You don't have any object selected. Use /osel first.");
  1841.  
  1842.     SetPVarInt(playerid,"Modifying",1);
  1843.     CancelEdit(playerid);
  1844.     new Float:Float[9];
  1845.     GetPlayerPos(targetid,Float[0],Float[1],Float[2]);
  1846.     GetDynamicObjectPos(objects[editting],Float[3],Float[4],Float[5]);
  1847.     GetDynamicObjectRot(objects[editting],Float[6],Float[7],Float[8]);
  1848.  
  1849.     SetDynamicObjectRot(objects[editting],Float[6],Float[7],GetAngleToPoint(Float[3],Float[4],Float[0],Float[1]));
  1850.     MoveDynamicObject(objects[editting],Float[0],Float[1],Float[2],speed);
  1851.     UpdateObjectInfoTextdraws(playerid,objects[editting],editting);
  1852.     if(IsPlayerEdittingObject(playerid))
  1853.         EditDynamicObject(playerid,objects[editting]);
  1854.     UpdateObjectTextdraw(playerid, "(moved to player)");
  1855.     return 1;
  1856. }
  1857.  
  1858. CMD:omovealltop(playerid, params[])
  1859. {
  1860.     new Float:speed, targetid;
  1861.     if (sscanf(params, "uf", targetid,speed))
  1862.         return Usage(playerid, "/omovealltop <player> <speed>");
  1863.  
  1864.     if(!IsPlayerConnected(targetid)) return Error(playerid, "Error: that player is not connected.");
  1865.  
  1866.     new Float:Float[9];
  1867.     GetPlayerPos(targetid,Float[0],Float[1],Float[2]);
  1868.     new editting = GetPVarInt(playerid, "SelectedObject");
  1869.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  1870.     {
  1871.         if(objects[i] != -1 && IsValidDynamicObject(objects[i]))
  1872.         {
  1873.             GetDynamicObjectPos(objects[i],Float[3],Float[4],Float[5]);
  1874.             GetDynamicObjectRot(objects[i],Float[6],Float[7],Float[8]);
  1875.             if(i == editting)
  1876.             {
  1877.                 SetPVarInt(playerid,"Modifying",1);
  1878.                 CancelEdit(playerid);
  1879.             }
  1880.             SetDynamicObjectRot(objects[i],Float[6],Float[7],GetAngleToPoint(Float[3],Float[4],Float[0],Float[1]));
  1881.             MoveDynamicObject(objects[i],Float[0],Float[1],Float[2],speed);
  1882.             if(i == editting)
  1883.             {
  1884.                 if(IsPlayerEdittingObject(playerid))
  1885.                     EditDynamicObject(playerid,objects[i]);
  1886.                 UpdateObjectTextdraw(playerid, "(moved)");
  1887.             }
  1888.         }
  1889.     }
  1890.     return 1;
  1891. }
  1892.  
  1893. CMD:omoveto(playerid, params[])
  1894. {
  1895.     new Float:X,Float:Y,Float:Z,Float:speed;
  1896.     if (sscanf(params, "ffff",X,Y,Z,speed))
  1897.         return Usage(playerid, "/omoveto <x> <y> <z> <speed>");
  1898.  
  1899.     new editting = GetPVarInt(playerid, "SelectedObject");
  1900.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  1901.  
  1902.     SetPVarInt(playerid,"Modifying",1);
  1903.     CancelEdit(playerid);
  1904.     MoveDynamicObject(objects[editting],X,Y,Z,speed);
  1905.     if(IsPlayerEdittingObject(playerid))
  1906.         EditDynamicObject(playerid,objects[editting]);
  1907.     UpdateObjectInfoTextdraws(playerid,objects[editting],editting);
  1908.     UpdateObjectTextdraw(playerid, "(moved)");
  1909.     return 1;
  1910. }
  1911.  
  1912. CMD:omoveallto(playerid,params[])
  1913. {
  1914.     new Float:X,Float:Y,Float:Z,Float:speed;
  1915.     if (sscanf(params, "ffff",X,Y,Z,speed))
  1916.         return Usage(playerid, "/omoveallto <x> <y> <z> <speed>");
  1917.  
  1918.     new editting = GetPVarInt(playerid, "SelectedObject");
  1919.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  1920.     {
  1921.         if(objects[i] != -1 && IsValidDynamicObject(objects[i]))
  1922.         {
  1923.             if(i == editting)
  1924.             {
  1925.                 SetPVarInt(playerid,"Modifying",1);
  1926.                 CancelEdit(playerid);
  1927.             }
  1928.             MoveDynamicObject(objects[i],X,Y,Z,speed);
  1929.             if(i == editting)
  1930.             {
  1931.                 if(IsPlayerEdittingObject(playerid))
  1932.                     EditDynamicObject(playerid,objects[i]);
  1933.                 UpdateObjectTextdraw(playerid, "(moved)");
  1934.             }
  1935.         }
  1936.     }
  1937.     return 1;
  1938. }
  1939.  
  1940. CMD:omoveall(playerid,params[])
  1941. {
  1942.     new Float:Float_1,Float:Float_2,Float:Float_3,Float:Float_4;
  1943.     if (sscanf(params, "ffff",Float_1,Float_2,Float_3,Float_4))
  1944.         return Usage(playerid, "/omoveall <x> <y> <z> <speed>");
  1945.  
  1946.     new Float:X,Float:Y,Float:Z;
  1947.     new editting = GetPVarInt(playerid, "SelectedObject");
  1948.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  1949.     {
  1950.         if(objects[i] != -1 && IsValidDynamicObject(objects[i]))
  1951.         {
  1952.             GetDynamicObjectPos(objects[i],X,Y,Z);
  1953.             if(i == editting)
  1954.             {
  1955.                 SetPVarInt(playerid,"Modifying",1);
  1956.                 CancelEdit(playerid);
  1957.             }
  1958.             MoveDynamicObject(objects[i],X+Float_1,Y+Float_2,Z+Float_3,Float_4);
  1959.             if(i == editting)
  1960.             {
  1961.                 if(IsPlayerEdittingObject(playerid))
  1962.                     EditDynamicObject(playerid,objects[i]);
  1963.                 UpdateObjectTextdraw(playerid, "(moved)");
  1964.             }
  1965.         }
  1966.     }
  1967.  
  1968.  
  1969.     return 1;
  1970. }
  1971.  
  1972. CMD:omove(playerid, params[])
  1973. {
  1974.     new Float:coords[4];
  1975.     if (sscanf(params, "ffff", coords[0],coords[1],coords[2],coords[3]))
  1976.         return Usage(playerid, "/omove <x> <y> <z> <speed>");
  1977.  
  1978.     new editting = GetPVarInt(playerid, "SelectedObject");
  1979.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  1980.  
  1981.     SetPVarInt(playerid,"Modifying",1);
  1982.     CancelEdit(playerid);
  1983.     new Float:X,Float:Y,Float:Z;
  1984.     GetDynamicObjectPos(objects[editting],X,Y,Z);
  1985.     MoveDynamicObject(objects[editting],X+coords[0],Y+coords[1],Z+coords[2],coords[3]);
  1986.     if(IsPlayerEdittingObject(playerid))
  1987.         EditDynamicObject(playerid,objects[editting]);
  1988.     UpdateObjectInfoTextdraws(playerid,objects[editting],editting);
  1989.     format(msg, sizeof(msg),"(X %s;Y %s;Z %s)",ProcessFloat(coords[0]),ProcessFloat(coords[1]),ProcessFloat(coords[2]));
  1990.     UpdateObjectTextdraw(playerid, msg);
  1991.     return 1;
  1992. }
  1993.  
  1994. CMD:osave(playerid, params[])
  1995. {
  1996.     if(!isnull(params)) return Usage(playerid, "/osave");
  1997.  
  1998.     new slot = GetPVarInt(playerid, "SelectedObject");
  1999.     if(slot == -1)
  2000.         return Error(playerid, "You don't have anything selected.");
  2001.  
  2002.     format(msg, sizeof(msg),"You're no longer editting the object on slot %d.",slot);
  2003.     Info(playerid, msg);
  2004.  
  2005.     /*if(slot != -1 && !GetPVarInt(playerid,"oinfo"))
  2006.     {
  2007.         SelectObject(playerid);
  2008.         OnObjectEditMode(playerid, true);
  2009.     }*/
  2010.  
  2011.     CancelEdit(playerid);
  2012.     DestroyObjectTextdraw(playerid);
  2013.     SetPVarInt(playerid, "SelectedObject",-1);
  2014.     UpdateObjectInfoTextdraws(playerid,objects[slot],slot);
  2015.     return 1;
  2016. }
  2017.  
  2018. CMD:oedit(playerid, params[])
  2019. {
  2020.     new slot;
  2021.     if (sscanf(params, "i", slot))
  2022.     {
  2023.         if(GetPVarInt(playerid, "SelectedObject") != -1)
  2024.             slot = GetPVarInt(playerid, "SelectedObject");
  2025.         else
  2026.         {
  2027.             Info(playerid, "You're now on object selection mode. Use {FF6600}~k~~PED_SPRINT~ {FFFFFF}to look around.");
  2028.             OnObjectEditMode(playerid,true);
  2029.             UpdateObjectTextdraw(playerid);
  2030.             return SelectObject(playerid);
  2031.         }
  2032.     }
  2033.  
  2034.     if(!IsValidDynamicObject(objects[slot]))
  2035.         return Error(playerid, "There's no (editable) object on the slot you chosed!");
  2036.  
  2037.     if(GetPVarInt(playerid, "oinfo"))
  2038.         CancelSelectTextDraw(playerid);
  2039.  
  2040.     SetPVarInt(playerid, "SelectedObject",slot);
  2041.     format(msg, sizeof(msg),"You're now editting object slot %d, use /ox, /oy, /oz, /rx, /ry or /rz to move the object.",slot);
  2042.     Info(playerid, msg);
  2043.  
  2044.     EditDynamicObject(playerid, objects[slot]);
  2045.     OnObjectEditMode(playerid,true);
  2046.  
  2047.     CreateObjectTextdraw(playerid);
  2048.     UpdateObjectTextdraw(playerid);
  2049.     ShowObjectTextdraw(playerid);
  2050.     Info(playerid, "Use /osave or press the save button to stop editting this object. Use {FF6600}~k~~PED_SPRINT~ {FFFFFF}to look around.");
  2051.     return 1;
  2052. }
  2053.  
  2054. CMD:osel(playerid, params[])
  2055. {
  2056.     new slot;
  2057.     if (sscanf(params, "i", slot))
  2058.         return Error(playerid,"Correct usage: /osel <slot>");
  2059.  
  2060.     if(!IsValidDynamicObject(objects[slot])) return Error(playerid, "There's no object on the slot you chosed!");
  2061.  
  2062.     SetPVarInt(playerid, "SelectedObject",slot);
  2063.     format(msg, sizeof(msg),"Object slot %d has been selected. You can use /oedit and /oinfo to move the object.",slot);
  2064.     Info(playerid, msg);
  2065.  
  2066.     Info(playerid, "Use /osave to unselect this object.");
  2067.     UpdateObjectInfoTextdraws(playerid,objects[slot],slot);
  2068.  
  2069.     CreateObjectTextdraw(playerid);
  2070.     UpdateObjectTextdraw(playerid);
  2071.     ShowObjectTextdraw(playerid);
  2072.     return 1;
  2073. }
  2074.  
  2075. CMD:ocopy(playerid,params[])
  2076. {
  2077.     if(!isnull(params)) return Usage(playerid, "/ocopy");
  2078.  
  2079.     new slot = -1;
  2080.     new selected = GetPVarInt(playerid, "SelectedObject");
  2081.     if(selected == -1) return Error(playerid, "You don't have any object selected. Use /osel first.");
  2082.  
  2083.     if(!IsValidDynamicObject(objects[selected]))
  2084.         return Error(playerid,"There's nothing on the slot you selected!");
  2085.  
  2086.     SetPVarInt(playerid,"Modifying",1);
  2087.     cmd_osave(playerid, "");
  2088.  
  2089.     new Float:X,Float:Y,Float:Z,Float:RX,Float:RY,Float:RZ;
  2090.     GetDynamicObjectPos(objects[selected],X,Y,Z);
  2091.     GetDynamicObjectRot(objects[selected],RX,RY,RZ);
  2092.  
  2093.     for(new h = 0; h < MAX_PLAYER_OBJECTS; h++)
  2094.     {
  2095.         if(objects[h] == -1  && !IsValidDynamicObject(objects[h]))
  2096.         {
  2097.             slot = h;
  2098.             break;
  2099.         }
  2100.     }
  2101.  
  2102.     if(slot == -1) return Error(playerid, "You have no more slots avaialble, maximun is 500!");
  2103.  
  2104.     objects[slot] = CreateDynamicObject(objectmodel[selected],X,Y,Z,RX,RY,RZ);
  2105.     objectmodel[slot] = objectmodel[selected];
  2106.     objectmatinfo[slot][0] = objectmatinfo[selected][0];
  2107.     objectmatinfo[slot][1] = objectmatinfo[selected][1];
  2108.     objectmatinfo[slot][2] = objectmatinfo[selected][2];
  2109.     ApplyDynamicObjectMaterial(objects[slot],slot,0);
  2110.     ApplyDynamicObjectMaterial(objects[slot],slot,1);
  2111.     ApplyDynamicObjectMaterial(objects[slot],slot,2);
  2112.     UpdateNearPlayers(playerid);
  2113.  
  2114.     format(msg, sizeof(msg),"Object id %d (%d) copied on slot %d. Type /ohelp for object help.",selected,objectmodel[selected],slot);
  2115.     Info(playerid,msg);
  2116.  
  2117.  
  2118.     format(msg, sizeof(msg),"%d",slot);
  2119.     if(!GetPVarInt(playerid,"oinfo"))
  2120.         cmd_osel(playerid,msg);
  2121.     else
  2122.         cmd_oinfo(playerid,msg);
  2123.  
  2124.     cmd_oedit(playerid, "");
  2125.     return 1;
  2126. }
  2127.  
  2128. CMD:ofind(playerid, params[])
  2129. {
  2130.     new model;
  2131.     if(sscanf(params,"i",model))
  2132.         return Usage(playerid,"/ofind <model id>");
  2133.  
  2134.     new plobjects = GetPVarInt(playerid, "Objects"), objectsfound = 0;
  2135.     if(plobjects == 0) return Error(playerid, "You don't have any object created at this moment.");
  2136.  
  2137.     OtherMsg(playerid, "Objects you created that have that model:");
  2138.     for(new i = 0; i < plobjects; i ++)
  2139.     {
  2140.         if(objectmodel[i] == model)
  2141.         {
  2142.             format(msg, sizeof(msg),"Slot %d - Object ID: %d",i,objectmodel[i]);
  2143.             OtherMsg(playerid, msg);
  2144.             objectsfound ++;
  2145.         }
  2146.     }
  2147.     if(objectsfound == 0)
  2148.     {
  2149.         OtherMsg(playerid, "No objects found.");
  2150.     }
  2151.     else
  2152.     {
  2153.         format(msg, sizeof(msg),"%d objects were found.",objectsfound);
  2154.         OtherMsg(playerid,msg);
  2155.     }
  2156.     return 1;
  2157. }
  2158.  
  2159. CMD:myobjects(playerid, params[])
  2160. {
  2161.     if(!isnull(params)) return Usage(playerid, "/myobjects");
  2162.  
  2163.     new plobjects = GetPVarInt(playerid, "Objects");
  2164.  
  2165.     if(plobjects != 0)
  2166.     {
  2167.         format(msg, sizeof(msg),"You have a total of %d objects created right now.",plobjects);
  2168.         Info(playerid,msg);
  2169.     }
  2170.     else
  2171.     {
  2172.         Info(playerid, "You don't have any object created right now.");
  2173.     }
  2174.  
  2175.     return 1;
  2176. }
  2177.  
  2178. CMD:ocreate(playerid,params[])
  2179. {
  2180.     new idx,slot = -5;
  2181.     if (sscanf(params, "i", idx))
  2182.         return Usage(playerid, "/ocreate <id>");
  2183.  
  2184.     new Float:X,Float:Y,Float:Z;
  2185.     GetPlayerPos(playerid, X,Y,Z);
  2186.     GetXYInFrontOfPlayer(playerid, X, Y, 2.0);
  2187.  
  2188.     for(new h = 0; h < MAX_PLAYER_OBJECTS; h++)
  2189.     {
  2190.         if(objects[h] == -1 && !IsValidDynamicObject(objects[h]))
  2191.         {
  2192.             slot = h;
  2193.             break;
  2194.         }
  2195.     }
  2196.  
  2197.     if(slot == -5) return Error(playerid, "You have no more slots avaialble, maximun is 500!");
  2198.     objects[slot] = CreateDynamicObject(idx,X,Y,Z,0,0,0);
  2199.     objectmodel[slot] = idx;
  2200.     objectmatinfo[slot][0] = "None";
  2201.     objectmatinfo[slot][1] = "None";
  2202.     objectmatinfo[slot][2] = "None";
  2203.     SetPVarInt(playerid,"Objects",GetPVarInt(playerid,"Objects") + 1);
  2204.     UpdateNearPlayers(playerid);
  2205.  
  2206.     format(msg, sizeof(msg),"Object id %d created on slot %d. Type /ohelp for object help.",idx,slot);
  2207.     Info(playerid,msg);
  2208.  
  2209.     format(msg, sizeof(msg),"%d",slot);
  2210.     if(!GetPVarInt(playerid,"oinfo"))
  2211.         cmd_oedit(playerid,msg);
  2212.     else
  2213.         cmd_oinfo(playerid,msg);
  2214.  
  2215.     if(GetPVarInt(playerid,"NoObject"))
  2216.         DeletePVar(playerid, "NoObject");
  2217.     return 1;
  2218. }
  2219.  
  2220. CMD:obj(playerid, params[])
  2221. {
  2222.     new model[24], numericmodel,totalobjects = 0;
  2223.     if(sscanf(params, "s[24]", model))
  2224.     {
  2225.         Usage(playerid, "/obj <name or ID>");
  2226.         format(msg, sizeof(msg),"There are %d objects in our database right now.",sizeof(ObjectNames));
  2227.         Info(playerid, msg);
  2228.         return 1;
  2229.     }
  2230.  
  2231.     format(msg, sizeof(msg),"Results for '%s' are:",model);
  2232.     OtherMsg(playerid,msg);
  2233.     for(new i = 0; i < sizeof(ObjectNames); i ++)
  2234.     {
  2235.         if (strfind(ObjectNames[i][ObjectName], model, true) != -1)
  2236.         {
  2237.             numericmodel = ObjectNames[i][ObjectID];
  2238.             format(msg, sizeof(msg),"Object Name: %s - Object model id: %d",ObjectNames[i][ObjectName],numericmodel);
  2239.             OtherMsg(playerid, msg);
  2240.             totalobjects ++;
  2241.         }
  2242.     }
  2243.     if(totalobjects == 0)
  2244.     {
  2245.         OtherMsg(playerid, "None.");
  2246.     }
  2247.     else
  2248.     {
  2249.         format(msg, sizeof(msg),"%d objects were found.",totalobjects);
  2250.         OtherMsg(playerid,msg);
  2251.     }
  2252.  
  2253.     return 1;
  2254. }
  2255.  
  2256. CMD:odestroyall(playerid,params[])
  2257. {
  2258.     if(!isnull(params)) return Usage(playerid, "/odestroyall");
  2259.  
  2260.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  2261.     {
  2262.         DestroyDynamicObject(objects[i]);
  2263.         objects[i] = -1;
  2264.     }
  2265.     SetPVarInt(playerid,"SelectedObject",-1);
  2266.     SetPVarInt(playerid,"Objects",0);
  2267.     DestroyObjectTextdraw(playerid);
  2268.  
  2269.     if(IsPlayerEdittingObject(playerid))
  2270.         CancelEdit(playerid);
  2271.  
  2272.     OnObjectEditMode(playerid, false);
  2273.  
  2274.     Info(playerid,"Every object that belonged to you was deleted.");
  2275.     if(GetPVarInt(playerid,"oinfo"))
  2276.         cmd_oinfo(playerid, "-1");
  2277.     return 1;
  2278. }
  2279.  
  2280. CMD:odestroy(playerid,params[])
  2281. {
  2282.     if(!isnull(params)) return Usage(playerid, "/odestroy");
  2283.  
  2284.     new slot = GetPVarInt(playerid, "SelectedObject");
  2285.     if(slot == -1) return Error(playerid, "You don't have any object selected. Use /osel first.");
  2286.  
  2287.     DestroyDynamicObject(objects[slot]);
  2288.     objects[slot] = -1;
  2289.     oinfoPREV(playerid);
  2290.     if(!GetPVarInt(playerid,"oinfo"))
  2291.         SetPVarInt(playerid,"SelectedObject",-1);
  2292.     SetPVarInt(playerid,"Objects",GetPVarInt(playerid,"Objects") - 1);
  2293.  
  2294.     if(IsPlayerEdittingObject(playerid))
  2295.         CancelEdit(playerid);
  2296.  
  2297.     OnObjectEditMode(playerid, false);
  2298.     DestroyObjectTextdraw(playerid);
  2299.  
  2300.     format(msg, sizeof(msg),"Object on slot %d has been deleted.",slot);
  2301.     Info(playerid,msg);
  2302.     return 1;
  2303. }
  2304.  
  2305. CMD:ohelp(playerid, params[])
  2306. {
  2307.     if(!isnull(params)) return Usage(playerid, "/ohelp");
  2308.  
  2309.     RenderMessage(playerid,COLOR_CYAN,"Map Commands:");
  2310.     RenderMessage(playerid,COLOR_WHITE,"{FFFF00}Managment: {FFFFFF}/odestroy(all) /ocreate /ogoto /myobjects /obj /osel /osave /oedit /oinfo /oswap /ocopy");
  2311.     RenderMessage(playerid,COLOR_WHITE,"{FFFF00}Movement: {FFFFFF}/oy(all) /ox(all) /oz(all) /rx(all) /ry(all) /rz(all) /resetrx /resetry /resetrz /omove(all) /omove(all)top /omove(all)to");
  2312.     RenderMessage(playerid,COLOR_WHITE,"{FFFF00}Save/load: {FFFFFF}/exportmap /savemap /deletemap /loadmap");
  2313.     RenderMessage(playerid,COLOR_WHITE,"{FFFF00}Other: {FFFFFF}/omat /otextmat /otextmatset /oclearmat");
  2314.  
  2315.     if(Chance(33))
  2316.         Tip(playerid, "Did you know you can press {FF6600}~k~~CONVERSATION_YES~ {FFFFFF}to copy the object you're editing?");
  2317.     if(Chance(33))
  2318.         Tip(playerid, "You can use {FF6600}~k~~CONVERSATION_NO~ {FFFFFF}to delete the object you're editing.");
  2319.     return 1;
  2320. }
  2321.  
  2322. stock Chance(minchance)
  2323. {
  2324.     new chance = random(100);
  2325.     if(chance <= minchance) return 1;
  2326.     else return 0;
  2327. }
  2328.  
  2329. stock ShowObjectInfoTextdraws(playerid)
  2330. {
  2331.     for(new i = 0; i < sizeof(objinfo[]); i ++)
  2332.         if(objinfo[playerid][i] != PlayerText:INVALID_TEXT_DRAW)
  2333.             PlayerTextDrawShow(playerid, objinfo[playerid][i]);
  2334.  
  2335.     return 1;
  2336. }
  2337.  
  2338. stock HideObjectInfoTextdraws(playerid)
  2339. {
  2340.     for(new i = 0; i < sizeof(objinfo[]); i ++)
  2341.         if(objinfo[playerid][i] != PlayerText:INVALID_TEXT_DRAW)
  2342.             PlayerTextDrawHide(playerid, objinfo[playerid][i]);
  2343.  
  2344.     return 1;
  2345. }
  2346.  
  2347. stock DestroyObjectInfoTextdraws(playerid)
  2348. {
  2349.     for(new i = 0; i < sizeof(objinfo[]); i ++)
  2350.         if(objinfo[playerid][i] != PlayerText:INVALID_TEXT_DRAW)
  2351.             PlayerTextDrawDestroy(playerid, objinfo[playerid][i]);
  2352.  
  2353.     return 1;
  2354. }
  2355.  
  2356. public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
  2357. {
  2358.     if(playertextid == objinfo[playerid][1])
  2359.     { // setting X
  2360.         SetPVarInt(playerid, "TextSlot",1);
  2361.         ShowPlayerDialog(playerid, 1697, DIALOG_STYLE_INPUT,"SETTING NEW VALUES","{FFFFFF}Type on the box below the new value for {FFFF00}X\n{BBBBBB}You can use +,-,/ & * operators before the number to apply a mathematical formula","Ok","Cancel");
  2362.     }
  2363.     else if(playertextid == objinfo[playerid][2])
  2364.     { // setting Y
  2365.         SetPVarInt(playerid, "TextSlot",2);
  2366.         ShowPlayerDialog(playerid, 1697, DIALOG_STYLE_INPUT,"SETTING NEW VALUES","{FFFFFF}Type on the box below the new value for {FFFF00}Y\n{BBBBBB}You can use +,-,/ & * operators before the number to apply a mathematical formula","Ok","Cancel");
  2367.     }
  2368.     else if(playertextid == objinfo[playerid][3])
  2369.     { // setting Y
  2370.         SetPVarInt(playerid, "TextSlot",3);
  2371.         ShowPlayerDialog(playerid, 1697, DIALOG_STYLE_INPUT,"SETTING NEW VALUES","{FFFFFF}Type on the box below the new value for {FFFF00}Z\n{BBBBBB}You can use +,-,/ & * operators before the number to apply a mathematical formula","Ok","Cancel");
  2372.     }
  2373.     else if(playertextid == objinfo[playerid][6])
  2374.     { // setting RX
  2375.         SetPVarInt(playerid, "TextSlot",4);
  2376.         ShowPlayerDialog(playerid, 1697, DIALOG_STYLE_INPUT,"SETTING NEW VALUES","{FFFFFF}Type on the box below the new value for {FFFF00}RX\n{BBBBBB}You can use +,-,/ & * operators before the number to apply a mathematical formula","Ok","Cancel");
  2377.     }
  2378.     else if(playertextid == objinfo[playerid][7])
  2379.     { // setting RY
  2380.         SetPVarInt(playerid, "TextSlot",5);
  2381.         ShowPlayerDialog(playerid, 1697, DIALOG_STYLE_INPUT,"SETTING NEW VALUES","{FFFFFF}Type on the box below the new value for {FFFF00}RY\n{BBBBBB}You can use +,-,/ & * operators before the number to apply a mathematical formula","Ok","Cancel");
  2382.     }
  2383.     else if(playertextid == objinfo[playerid][8])
  2384.     { // setting RZ
  2385.         SetPVarInt(playerid, "TextSlot",6);
  2386.         ShowPlayerDialog(playerid, 1697, DIALOG_STYLE_INPUT,"SETTING NEW VALUES","{FFFFFF}Type on the box below the new value for {FFFF00}RZ\n{BBBBBB}You can use +,-,/ & * operators before the number to apply a mathematical formula","Ok","Cancel");
  2387.     }
  2388.     else if(playertextid == objinfo[playerid][10])
  2389.     { // save
  2390.         cmd_osave(playerid, "");
  2391.         cmd_oinfo(playerid, "-1");
  2392.     }
  2393.     else if(playertextid == objinfo[playerid][11])
  2394.     { // destroy
  2395.         cmd_odestroy(playerid, "");
  2396.         //cmd_oinfo(playerid, "-1");
  2397.     }
  2398.     else if(playertextid == objinfo[playerid][12])
  2399.     { // copy
  2400.         cmd_ocopy(playerid, "");
  2401.     }
  2402.     else if(playertextid == objinfo[playerid][14])
  2403.     { // goto
  2404.         format(msg, sizeof(msg),"%d",GetPVarInt(playerid,"SelectedObject"));
  2405.         cmd_ogoto(playerid, msg);
  2406.     }
  2407.     else if(playertextid == objinfo[playerid][15])
  2408.     { // get
  2409.         format(msg, sizeof(msg),"%d",GetPVarInt(playerid,"SelectedObject"));
  2410.         cmd_oget(playerid, msg);
  2411.     }
  2412.     else if(playertextid == objinfo[playerid][22])
  2413.     { // mat1
  2414.         SetPVarInt(playerid, "TextSlot",7);
  2415.         ShowPlayerDialog(playerid, 1699, DIALOG_STYLE_INPUT,"SETTING NEW VALUES","{FFFFFF}Type on the box below the new value for {FFFF00}MAT 1\n{BBBBBB}Syntax: <model> [txd] [txt] [color]\nType in \"None\" to clear field.","Ok","Cancel");
  2416.     }
  2417.     else if(playertextid == objinfo[playerid][23])
  2418.     { // mat2
  2419.         SetPVarInt(playerid, "TextSlot",8);
  2420.         ShowPlayerDialog(playerid, 1699, DIALOG_STYLE_INPUT,"SETTING NEW VALUES","{FFFFFF}Type on the box below the new value for {FFFF00}MAT 2\n{BBBBBB}Syntax: <model> [txd] [txt] [color]\nType in \"None\" to clear field.","Ok","Cancel");
  2421.     }
  2422.     else if(playertextid == objinfo[playerid][24])
  2423.     { // mat3
  2424.         SetPVarInt(playerid, "TextSlot",9);
  2425.         ShowPlayerDialog(playerid, 1699, DIALOG_STYLE_INPUT,"SETTING NEW VALUES","{FFFFFF}Type on the box below the new value for {FFFF00}MAT 3\n{BBBBBB}Syntax: <model> [txd] [txt] [color]\nType in \"None\" to clear field.","Ok","Cancel");
  2426.     }
  2427.     else if(playertextid == objinfo[playerid][5])
  2428.     { // model
  2429.         ShowPlayerDialog(playerid, 1698, DIALOG_STYLE_INPUT,"SETTING NEW VALUES","{FFFFFF}Type on the box below the new value for {FFFF00}new model\n{BBBBBB}Syntax: <new model>","Ok","Cancel");
  2430.     }
  2431.     else if(playertextid == objinfo[playerid][16])
  2432.     { // >
  2433.         new slot = GetPVarInt(playerid, "SelectedObject");
  2434.         for(new i = slot+1; i < MAX_PLAYER_OBJECTS; i ++)
  2435.         {
  2436.             if(objects[i] != -1  && IsValidDynamicObject(objects[i]))
  2437.             {
  2438.                 slot = i;
  2439.                 break;
  2440.             }
  2441.         }
  2442.         format(msg, 3, "%d", slot);
  2443.         cmd_oinfo(playerid, msg);
  2444.     }
  2445.     else if(playertextid == objinfo[playerid][25])
  2446.     { // <
  2447.         new slot = GetPVarInt(playerid, "SelectedObject");
  2448.         for(new i = slot-1; i >= 0; i --)
  2449.         {
  2450.             if(objects[i] != -1  && IsValidDynamicObject(objects[i]))
  2451.             {
  2452.                 slot = i;
  2453.                 break;
  2454.             }
  2455.         }
  2456.  
  2457.         format(msg, 3, "%d", slot);
  2458.         cmd_oinfo(playerid, msg);
  2459.     }
  2460.     else if(playertextid == objinfo[playerid][26])
  2461.     {//oedit
  2462.         if(!IsPlayerEdittingObject(playerid))
  2463.         {
  2464.             PlayerTextDrawSetString(playerid, objinfo[playerid][26], "~b~SAVE");
  2465.             format(msg, sizeof(msg),"%d",GetPVarInt(playerid,"SelectedObject"));
  2466.             cmd_oedit(playerid, msg);
  2467.         }
  2468.         else
  2469.         {
  2470.             PlayerTextDrawSetString(playerid, objinfo[playerid][26], "~b~EDIT");
  2471.             format(msg, sizeof(msg),"%d",GetPVarInt(playerid,"SelectedObject"));
  2472.             if(IsPlayerEdittingObject(playerid))
  2473.                 CancelEdit(playerid);
  2474.  
  2475.             OnObjectEditMode(playerid, false);
  2476.         }
  2477.     }
  2478.     else if(playertextid == objinfo[playerid][27])
  2479.     {//close
  2480.         cmd_oinfo(playerid,"-1");
  2481.     }
  2482.     else if(playertextid == objinfo[playerid][28])
  2483.     {//refresh
  2484.         format(msg, sizeof(msg),"%d",GetPVarInt(playerid,"SelectedObject"));
  2485.         cmd_oinfo(playerid,msg);
  2486.     }
  2487.     else if(playertextid == objinfo[playerid][17])
  2488.     {//index set
  2489.         SetPVarInt(playerid, "TextSlot",10);
  2490.         ShowPlayerDialog(playerid, 1701, DIALOG_STYLE_INPUT,"SETTING NEW VALUES","{FFFFFF}Type on the box below the new value for {FFFF00}new index\n{BBBBBB}Syntax: <index>","Ok","Cancel");
  2491.     }
  2492.     else if(playertextid == objinfo[playerid][18])
  2493.     {//set model
  2494.         SetPVarInt(playerid, "TextSlot",11);
  2495.         ShowPlayerDialog(playerid, 1701, DIALOG_STYLE_INPUT,"SETTING NEW VALUES","{FFFFFF}Type on the box below the new value for {FFFF00}new model\n{BBBBBB}Syntax: <model>","Ok","Cancel");
  2496.     }
  2497.     else if(playertextid == objinfo[playerid][19])
  2498.     {//set txd
  2499.         SetPVarInt(playerid, "TextSlot",12);
  2500.         ShowPlayerDialog(playerid, 1701, DIALOG_STYLE_INPUT,"SETTING NEW VALUES","{FFFFFF}Type on the box below the new value for {FFFF00}new TXD\n{BBBBBB}Syntax: <TXD>","Ok","Cancel");
  2501.     }
  2502.     else if(playertextid == objinfo[playerid][20])
  2503.     {//set txt
  2504.         SetPVarInt(playerid, "TextSlot",13);
  2505.         ShowPlayerDialog(playerid, 1701, DIALOG_STYLE_INPUT,"SETTING NEW VALUES","{FFFFFF}Type on the box below the new value for {FFFF00}new TXT\n{BBBBBB}Syntax: <TXT>","Ok","Cancel");
  2506.     }
  2507.     else if(playertextid == objinfo[playerid][21])
  2508.     {//apply
  2509.         new txd[24],txt[24];
  2510.         GetPVarString(playerid, "SettingTxd",txd,24);
  2511.         GetPVarString(playerid, "SettingTxt",txt,24);
  2512.  
  2513.         format(msg, sizeof(msg),"%d %d %s %s 0",GetPVarInt(playerid,"SettingIdx"),
  2514.         GetPVarInt(playerid,"SettingModel"),txd,txt);
  2515.         cmd_omat(playerid, msg);
  2516.     }
  2517.     else if(playertextid == objinfo[playerid][29])
  2518.     {//quick save
  2519.         new mapname[24];
  2520.         if(!GetPVarString(playerid, "LastSavedMap", mapname, 24))
  2521.             return Error(playerid, "There's nothing to quick save.");
  2522.  
  2523.         GetPVarString(playerid, "LastSavedMap", mapname, 24);
  2524.         SaveMap(playerid, mapname);
  2525.     }
  2526.     else if(playertextid == objinfo[playerid][30])
  2527.     {//new
  2528.         SetPVarInt(playerid, "TextSlot",14);
  2529.         ShowPlayerDialog(playerid, 1702, DIALOG_STYLE_INPUT,"NEW OBJECT","{FFFFFF}Type on the box below the {FFFF00}model {FFFFFF}for the {FFFF00}new object\n{BBBBBB}Syntax: <model>","Ok","Cancel");
  2530.     }
  2531.     else if(playertextid == objinfo[playerid][31])
  2532.     {//-- index
  2533.         SetPVarInt(playerid, "SettingIdx", GetPVarInt(playerid,"SettingIdx") -1);
  2534.         if(GetPVarInt(playerid,"SettingIdx") == 0)
  2535.         {
  2536.             SetPVarInt(playerid, "SettingIdx", 0);
  2537.             PlayerTextDrawHide(playerid,objinfo[playerid][31]);
  2538.         }
  2539.  
  2540.         format(msg, sizeof(msg),"~b~INDEX: ~l~%d",GetPVarInt(playerid,"SettingIdx"));
  2541.         PlayerTextDrawSetString(playerid,objinfo[playerid][17],msg);
  2542.     }
  2543.     else if(playertextid == objinfo[playerid][32])
  2544.     {//++ index
  2545.         SetPVarInt(playerid, "SettingIdx", GetPVarInt(playerid,"SettingIdx")+1);
  2546.         if(GetPVarInt(playerid, "SettingIdx") == 1)
  2547.             PlayerTextDrawShow(playerid,objinfo[playerid][31]);
  2548.  
  2549.         format(msg, sizeof(msg),"~b~INDEX: ~l~%d",GetPVarInt(playerid,"SettingIdx"));
  2550.         PlayerTextDrawSetString(playerid,objinfo[playerid][17],msg);
  2551.     }
  2552.     else if(playertextid == objinfo[playerid][33])
  2553.     {//clear index
  2554.         format(msg, sizeof(msg),"%d",GetPVarInt(playerid,"SettingIdx"));
  2555.         cmd_oclearmat(playerid, msg);
  2556.  
  2557.         UpdateObjectInfoTextdraws(playerid, objects[GetPVarInt(playerid,"SelectedObject")],GetPVarInt(playerid,"SelectedObject"));
  2558.     }
  2559.     return 0;
  2560. }
  2561. stock UpdateObjectInfoTextdraws(playerid, object, slot)
  2562. {
  2563.     if(!GetPVarInt(playerid,"oinfo"))
  2564.         return 1;
  2565.  
  2566.     new Float:Float[6],littlestr[24];
  2567.     if(object != 999 && slot != 999)
  2568.     {
  2569.         GetDynamicObjectPos(object, Float[0], Float[1], Float[2]);
  2570.         GetDynamicObjectRot(object, Float[3], Float[4], Float[5]);
  2571.     }
  2572.     else
  2573.     {
  2574.         SetPVarInt(playerid,"NoObject",1);
  2575.         for(new i = 0; i < sizeof(Float); i ++)
  2576.             Float[i] = 0.0;
  2577.     }
  2578.  
  2579.     format(littlestr, 24, "~g~X: ~l~%.2f",Float[0]);
  2580.     PlayerTextDrawSetString(playerid, objinfo[playerid][1],littlestr);
  2581.     format(littlestr, 24, "~g~Y: ~l~%.2f",Float[1]);
  2582.     PlayerTextDrawSetString(playerid, objinfo[playerid][2],littlestr);
  2583.     format(littlestr, 24, "~g~Z: ~l~%.2f",Float[2]);
  2584.     PlayerTextDrawSetString(playerid, objinfo[playerid][3],littlestr);
  2585.  
  2586.     format(littlestr, 24, "~b~SLOT: ~l~%d",slot);
  2587.     PlayerTextDrawSetString(playerid, objinfo[playerid][4],littlestr);
  2588.  
  2589.     if(object != 999 && slot != 999)
  2590.         format(littlestr, 24, "~b~MODEL: ~l~%d",objectmodel[slot]);
  2591.     else
  2592.         littlestr = "NULL";
  2593.     PlayerTextDrawSetString(playerid, objinfo[playerid][5],littlestr);
  2594.  
  2595.     format(littlestr, 24, "~g~RX: ~l~%.2f",Float[3]);
  2596.     PlayerTextDrawSetString(playerid, objinfo[playerid][6],littlestr);
  2597.     format(littlestr, 24, "~g~RY: ~l~%.2f",Float[4]);
  2598.     PlayerTextDrawSetString(playerid, objinfo[playerid][7],littlestr);
  2599.     format(littlestr, 24, "~g~RZ: ~l~%.2f",Float[5]);
  2600.     PlayerTextDrawSetString(playerid, objinfo[playerid][8],littlestr);
  2601.  
  2602.     if(object != 999 && slot != 999)
  2603.         format(msg, 64, "~g~MAT 0: ~l~%s",objectmatinfo[slot][0]);
  2604.     else
  2605.         msg = "NULL";
  2606.     PlayerTextDrawSetString(playerid, objinfo[playerid][22],msg);
  2607.     if(object != 999 && slot != 999)
  2608.         format(msg, 64, "~g~MAT 1: ~l~%s",objectmatinfo[slot][1]);
  2609.     else
  2610.         msg = "NULL";
  2611.     PlayerTextDrawSetString(playerid, objinfo[playerid][23],msg);
  2612.     if(object != 999 && slot != 999)
  2613.         format(msg, 64, "~g~MAT 2: ~l~%s",objectmatinfo[slot][2]);
  2614.     else
  2615.         msg = "NULL";
  2616.     PlayerTextDrawSetString(playerid, objinfo[playerid][24],msg);
  2617.  
  2618.     format(msg, 64, "~b~INDEX: ~l~%d",GetPVarInt(playerid,"SettingIdx"));
  2619.     PlayerTextDrawSetString(playerid, objinfo[playerid][17],msg);
  2620.     format(msg, 64, "~b~MODEL: ~l~%d",GetPVarInt(playerid,"SettingModel"));
  2621.     PlayerTextDrawSetString(playerid, objinfo[playerid][18],msg);
  2622.     new txd[24],txt[24];
  2623.     GetPVarString(playerid,"SettingTxd",txd,24);
  2624.     GetPVarString(playerid,"SettingTxt",txt,24);
  2625.     format(msg, 64, "~b~TXD: ~l~%s",txd);
  2626.     PlayerTextDrawSetString(playerid, objinfo[playerid][19],msg);
  2627.     format(msg, 64, "~b~TXT: ~l~%s",txt);
  2628.     PlayerTextDrawSetString(playerid, objinfo[playerid][20],msg);
  2629.  
  2630.  
  2631.     CheckForNextPrev(playerid);
  2632.     return 1;
  2633. }
  2634.  
  2635. stock oinfoPREV(playerid)
  2636. {
  2637.     if(!GetPVarInt(playerid,"oinfo"))
  2638.         return 1;
  2639.  
  2640.     new slot = GetPVarInt(playerid, "SelectedObject");
  2641.     for(new i = slot-1; i >= 0; i --)
  2642.     {
  2643.         if(objects[i] != -1  && IsValidDynamicObject(objects[i]))
  2644.         {
  2645.             slot = i;
  2646.             break;
  2647.         }
  2648.     }
  2649.     if(slot == GetPVarInt(playerid, "SelectedObject"))
  2650.         cmd_oinfo(playerid, "-1");
  2651.     else
  2652.     {
  2653.         format(msg, 5, "%d",slot);
  2654.         cmd_oinfo(playerid, msg);
  2655.     }
  2656.  
  2657.     return 1;
  2658. }
  2659.  
  2660. stock CheckForNextPrev(playerid)
  2661. {
  2662.     if(GetPVarInt(playerid,"NoObject"))
  2663.     {
  2664.         PlayerTextDrawHide(playerid, objinfo[playerid][25]);
  2665.         return PlayerTextDrawHide(playerid, objinfo[playerid][16]);
  2666.     }
  2667.  
  2668.     new slot = GetPVarInt(playerid, "SelectedObject");
  2669.     for(new i = slot-1; i >= 0; i --)
  2670.     {
  2671.         if(objects[i] != -1  && IsValidDynamicObject(objects[i]))
  2672.         {
  2673.             slot = i;
  2674.             break;
  2675.         }
  2676.     }
  2677.     if(slot == GetPVarInt(playerid, "SelectedObject"))
  2678.         PlayerTextDrawHide(playerid, objinfo[playerid][25]);
  2679.     else
  2680.         PlayerTextDrawShow(playerid, objinfo[playerid][25]);
  2681.  
  2682.     slot = GetPVarInt(playerid, "SelectedObject");
  2683.     for(new i = slot+1; i < MAX_PLAYER_OBJECTS; i ++)
  2684.     {
  2685.         if(objects[i] != -1  && IsValidDynamicObject(objects[i]))
  2686.         {
  2687.             slot = i;
  2688.             break;
  2689.         }
  2690.     }
  2691.  
  2692.     if(slot == GetPVarInt(playerid, "SelectedObject"))
  2693.         PlayerTextDrawHide(playerid, objinfo[playerid][16]);
  2694.     else
  2695.         PlayerTextDrawShow(playerid, objinfo[playerid][16]);
  2696.     return 1;
  2697. }
  2698.  
  2699. stock CreateObjectInfoTextdraws(playerid)
  2700. {
  2701.     if(GetPVarInt(playerid,"Created"))
  2702.         return 1;
  2703.  
  2704.     objinfo[playerid][0] = CreatePlayerTextDraw(playerid, 136.000000, 116.000000, "~b~~h~OBJECT~w~INFORMATION ~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~");
  2705.     PlayerTextDrawLetterSize(playerid,objinfo[playerid][0], 0.400000, 2.000000);
  2706.     PlayerTextDrawTextSize(playerid, objinfo[playerid][0], 0.000000, 210.000000);
  2707.  
  2708.     objinfo[playerid][1] = CreatePlayerTextDraw(playerid, 66.000000, 173.000000, "~g~X: ~l~13337.22");
  2709.     PlayerTextDrawTextSize(playerid, objinfo[playerid][1], 10.000000, 59.000000);
  2710.  
  2711.     objinfo[playerid][2] = CreatePlayerTextDraw(playerid, 137.000000, 173.000000, "~g~Y: ~l~13337.22");
  2712.     PlayerTextDrawTextSize(playerid, objinfo[playerid][2], 10.000000, 58.000000);
  2713.  
  2714.     objinfo[playerid][3] = CreatePlayerTextDraw(playerid, 207.000000, 173.000000, "~g~Z: ~l~13337.22");
  2715.     PlayerTextDrawTextSize(playerid, objinfo[playerid][3], 10.000000, 59.000000);
  2716.  
  2717.     objinfo[playerid][4] = CreatePlayerTextDraw(playerid, 37.000000, 144.000000, "~b~SLOT: ~l~12");
  2718.     PlayerTextDrawTextSize(playerid, objinfo[playerid][4], 96.000000, 58.000000);
  2719.  
  2720.     objinfo[playerid][5] = CreatePlayerTextDraw(playerid, 108.000000, 144.000000, "~b~MODEL: ~l~16442");
  2721.     PlayerTextDrawTextSize(playerid, objinfo[playerid][5], 236.000000, 10.000000);
  2722.  
  2723.     objinfo[playerid][6] = CreatePlayerTextDraw(playerid, 66.000000, 193.000000, "~g~RX: ~l~169.69");
  2724.     PlayerTextDrawTextSize(playerid, objinfo[playerid][6], 10.000000, 59.000000);
  2725.  
  2726.     objinfo[playerid][7] = CreatePlayerTextDraw(playerid, 137.000000, 193.000000, "~g~RY: ~l~169.69");
  2727.     PlayerTextDrawTextSize(playerid,objinfo[playerid][7], 10.000000, 59.000000);
  2728.  
  2729.     objinfo[playerid][8] = CreatePlayerTextDraw(playerid, 207.000000, 193.000000, "~g~RZ: ~l~169.69");
  2730.     PlayerTextDrawTextSize(playerid,objinfo[playerid][8], 10.000000, 59.000000);
  2731.  
  2732.     objinfo[playerid][9] = CreatePlayerTextDraw(playerid, 36.000000, 216.000000, "~g~SET OBJECT MATERIAL ~n~~n~~n~");
  2733.     PlayerTextDrawFont(playerid, objinfo[playerid][9], 1);
  2734.     PlayerTextDrawTextSize(playerid,objinfo[playerid][9], 236.000000, 57.000000);
  2735.  
  2736.     objinfo[playerid][10] = CreatePlayerTextDraw(playerid, 46.000000, 318.000000, "~g~SAVE");
  2737.     PlayerTextDrawTextSize(playerid,objinfo[playerid][10], 10.000000, 21.000000);
  2738.  
  2739.     objinfo[playerid][11] = CreatePlayerTextDraw(playerid, 77.000000, 318.000000, "~g~DELETE");
  2740.     PlayerTextDrawTextSize(playerid,objinfo[playerid][11], 10.000000, 26.000000);
  2741.  
  2742.     objinfo[playerid][12] = CreatePlayerTextDraw(playerid, 151.000000, 318.000000, "~b~COPY");
  2743.     PlayerTextDrawTextSize(playerid,objinfo[playerid][12], 10.000000, 21.000000);
  2744.  
  2745.     //objinfo[playerid][13] = CreatePlayerTextDraw(playerid, 161.000000, 318.000000, "_");
  2746.     //PlayerTextDrawTextSize(playerid,objinfo[playerid][13], 17.000000, 17.000000);
  2747.  
  2748.     objinfo[playerid][14] = CreatePlayerTextDraw(playerid, 198.000000, 318.000000, "~r~~h~GOTO");
  2749.     PlayerTextDrawTextSize(playerid,objinfo[playerid][14], 10.000000, 25.000000);
  2750.  
  2751.     objinfo[playerid][15] = CreatePlayerTextDraw(playerid, 226.000000, 318.000000, "~r~~h~GET");
  2752.     PlayerTextDrawTextSize(playerid,objinfo[playerid][15], 10.000000, 17.000000);
  2753.  
  2754.     objinfo[playerid][16] = CreatePlayerTextDraw(playerid, 86.000000, 144.000000, "~>~");
  2755.     PlayerTextDrawTextSize(playerid,objinfo[playerid][16], 95.000000, 10.000000);
  2756.     PlayerTextDrawLetterSize(playerid,objinfo[playerid][16], 0.200000, 0.799999);
  2757.  
  2758.     objinfo[playerid][17] = CreatePlayerTextDraw(playerid, 38.000000, 229.000000, "~b~Index: ~l~1");
  2759.     PlayerTextDrawTextSize(playerid,objinfo[playerid][17], 85.000000, 10.000000);
  2760.  
  2761.     objinfo[playerid][18] = CreatePlayerTextDraw(playerid, 38.000000, 242.000000, "~b~Model: ~l~click to set");
  2762.     PlayerTextDrawTextSize(playerid,objinfo[playerid][18], 130.000000, 10.000000);
  2763.  
  2764.     objinfo[playerid][19] = CreatePlayerTextDraw(playerid, 125.000000, 229.000000, "~b~TXD: ~l~click to set");
  2765.     PlayerTextDrawTextSize(playerid,objinfo[playerid][19], 234.000000, 10.000000);
  2766.  
  2767.     objinfo[playerid][20] = CreatePlayerTextDraw(playerid, 125.000000, 242.000000, "~b~TXT: ~l~click to set");
  2768.     PlayerTextDrawTextSize(playerid,objinfo[playerid][20], 234.000000, 10.000000);
  2769.  
  2770.     objinfo[playerid][21] = CreatePlayerTextDraw(playerid, 213.000000, 217.000000, "~l~APPLY TO INDEX");
  2771.     PlayerTextDrawLetterSize(playerid, objinfo[playerid][21], 0.129999, 0.799998);
  2772.     PlayerTextDrawTextSize(playerid,objinfo[playerid][21], 9.000000, 43.000000);
  2773.  
  2774.     objinfo[playerid][22] = CreatePlayerTextDraw(playerid, 36.000000, 259.000000, "~g~MAT 1: ~l~None");
  2775.     PlayerTextDrawLetterSize(playerid, objinfo[playerid][22], 0.229999, 1.000000);
  2776.     PlayerTextDrawTextSize(playerid,objinfo[playerid][22], 236.000000, 10.000000);
  2777.  
  2778.     objinfo[playerid][23] = CreatePlayerTextDraw(playerid, 36.000000, 274.000000, "~g~MAT 2: ~l~None");
  2779.     PlayerTextDrawLetterSize(playerid, objinfo[playerid][23], 0.229999, 1.000000);
  2780.     PlayerTextDrawTextSize(playerid,objinfo[playerid][23], 236.000000, 10.000000);
  2781.  
  2782.     objinfo[playerid][24] = CreatePlayerTextDraw(playerid, 36.000000, 289.200012, "~g~MAT 3: ~l~None");
  2783.     PlayerTextDrawLetterSize(playerid, objinfo[playerid][24], 0.229999, 1.000000);
  2784.     PlayerTextDrawTextSize(playerid,objinfo[playerid][24], 236.000000, 10.000000);
  2785.  
  2786.     objinfo[playerid][25] = CreatePlayerTextDraw(playerid, 77.000000, 144.000000, "~<~");
  2787.     PlayerTextDrawTextSize(playerid,objinfo[playerid][25], 86.000000, 10.000000);
  2788.     PlayerTextDrawLetterSize(playerid,objinfo[playerid][25], 0.200000, 0.799999);
  2789.  
  2790.     objinfo[playerid][26] = CreatePlayerTextDraw(playerid, 125.000000, 318.000000, "~b~EDIT");
  2791.     PlayerTextDrawAlignment(playerid, objinfo[playerid][26], 2);
  2792.     PlayerTextDrawLetterSize(playerid, objinfo[playerid][26], 0.259999, 1.000000);
  2793.     PlayerTextDrawTextSize(playerid, objinfo[playerid][26], 10.000000, 19.000000);
  2794.  
  2795.     objinfo[playerid][27] = CreatePlayerTextDraw(playerid, 234.000000, 114.000000, "~w~x");
  2796.     PlayerTextDrawLetterSize(playerid, objinfo[playerid][27], 0.259999, 0.599999);
  2797.     PlayerTextDrawTextSize(playerid, objinfo[playerid][27], 239.000000, 10.000000);
  2798.  
  2799.     objinfo[playerid][28] = CreatePlayerTextDraw(playerid, 225.000000, 114.000000, "~w~r");
  2800.     PlayerTextDrawLetterSize(playerid, objinfo[playerid][28], 0.259999, 0.599999);
  2801.     PlayerTextDrawTextSize(playerid, objinfo[playerid][28], 229.000000, 10.000000);
  2802.  
  2803.     objinfo[playerid][29] = CreatePlayerTextDraw(playerid,216.000000, 114.000000, "~w~s");
  2804.     PlayerTextDrawLetterSize(playerid,objinfo[playerid][29], 0.259999, 0.599999);
  2805.     PlayerTextDrawTextSize(playerid,objinfo[playerid][29], 219.000000, 10.000000);
  2806.  
  2807.     objinfo[playerid][30] = CreatePlayerTextDraw(playerid,207.000000, 114.000000, "~w~n");
  2808.     PlayerTextDrawLetterSize(playerid,objinfo[playerid][30], 0.259998, 0.599999);
  2809.     PlayerTextDrawTextSize(playerid,objinfo[playerid][30], 211.000000, 10.000000);
  2810.  
  2811.     objinfo[playerid][31] = CreatePlayerTextDraw(playerid,85.000000, 229.000000, "~<~");
  2812.     PlayerTextDrawLetterSize(playerid,objinfo[playerid][31], 0.450000, 0.799999);
  2813.     PlayerTextDrawTextSize(playerid,objinfo[playerid][31], 91.000000, 10.000000);
  2814.  
  2815.     objinfo[playerid][32] = CreatePlayerTextDraw(playerid,95.000000, 229.000000, "~>~");
  2816.     PlayerTextDrawLetterSize(playerid,objinfo[playerid][32], 0.450000, 0.799999);
  2817.     PlayerTextDrawTextSize(playerid,objinfo[playerid][32], 101.000000, 10.000000);
  2818.  
  2819.     objinfo[playerid][33] = CreatePlayerTextDraw(playerid,163.000000, 217.000000, "~l~CLEAR INDEX");
  2820.     PlayerTextDrawLetterSize(playerid,objinfo[playerid][33], 0.129999, 0.799998);
  2821.     PlayerTextDrawTextSize(playerid,objinfo[playerid][33], 9.000000, 43.000000);
  2822.  
  2823.     for(new i = 0; i < sizeof(objinfo[]); i ++)
  2824.     {
  2825.         if(i != 0 && i != 4 && i != 9)
  2826.             PlayerTextDrawSetSelectable(playerid, objinfo[playerid][i], 1);
  2827.  
  2828.         PlayerTextDrawSetOutline(playerid, objinfo[playerid][i], 0);
  2829.         PlayerTextDrawSetShadow(playerid, objinfo[playerid][i], 0);
  2830.         PlayerTextDrawSetProportional(playerid, objinfo[playerid][i], 1);
  2831.         PlayerTextDrawUseBox(playerid, objinfo[playerid][i], 1);
  2832.  
  2833.         if(i != 21 && i != 33)
  2834.             PlayerTextDrawFont(playerid, objinfo[playerid][i], 1);
  2835.  
  2836.         if(i != 0 && i != 16 && i < 21)
  2837.             PlayerTextDrawLetterSize(playerid, objinfo[playerid][i], 0.259999, 1.000000);
  2838.  
  2839.         if(i != 4 && i != 5 && i != 9 && i != 16 && i != 19 && i != 20 && i != 17 && i != 18 && (i < 22 || i == 33))
  2840.             PlayerTextDrawAlignment(playerid, objinfo[playerid][i], 2);
  2841.  
  2842.         if(i == 14)
  2843.             PlayerTextDrawBackgroundColor(playerid, objinfo[playerid][i], 65535);
  2844.         else
  2845.             PlayerTextDrawBackgroundColor(playerid, objinfo[playerid][i], 255);
  2846.  
  2847.         if(i == 0 || i == 16 || i == 21 || i == 33)
  2848.             PlayerTextDrawColor(playerid, objinfo[playerid][i], -1);
  2849.         else
  2850.             PlayerTextDrawColor(playerid, objinfo[playerid][i], 255);
  2851.  
  2852.         if(i == 0)
  2853.             PlayerTextDrawBoxColor(playerid, objinfo[playerid][i], 0x00000088);
  2854.         else if(i == 21 || i == 33)
  2855.             PlayerTextDrawBoxColor(playerid, objinfo[playerid][i], 119);
  2856.         else if(i == 16 || i == 17 || i == 18 || i == 19 || i == 20 || i == 25 || i >= 27 && i <= 32)
  2857.             PlayerTextDrawBoxColor(playerid, objinfo[playerid][i], 0);
  2858.         else if(i == 10 || i == 11)
  2859.             PlayerTextDrawBoxColor(playerid, objinfo[playerid][i], 0x30642755);
  2860.         else if(i == 12 || i == 26)
  2861.             PlayerTextDrawBoxColor(playerid, objinfo[playerid][i], 0x4D5690FF);
  2862.         else if(i == 14 ||i == 15)
  2863.             PlayerTextDrawBoxColor(playerid, objinfo[playerid][i], 0xFF424755);
  2864.         else
  2865.             PlayerTextDrawBoxColor(playerid, objinfo[playerid][i], -1);
  2866.     }
  2867.     SetPVarInt(playerid,"Created",1);
  2868.     return 1;
  2869. }
  2870.  
  2871. stock DestroyObjectTextdraw(playerid)
  2872. {
  2873.     if(ObjTextdraw[playerid] != PlayerText:INVALID_TEXT_DRAW)
  2874.         PlayerTextDrawDestroy(playerid, ObjTextdraw[playerid]), _:ObjTextdraw[playerid] = _:INVALID_TEXT_DRAW;
  2875.  
  2876.     return 1;
  2877. }
  2878.  
  2879. stock ShowObjectTextdraw(playerid)
  2880.     return PlayerTextDrawShow(playerid, ObjTextdraw[playerid]);
  2881.  
  2882. stock CreateObjectTextdraw(playerid)
  2883. {
  2884.     if(ObjTextdraw[playerid] != PlayerText:INVALID_TEXT_DRAW)
  2885.         return 1;
  2886.  
  2887.     ObjTextdraw[playerid] = CreatePlayerTextDraw(playerid, 2.000000, 434.000000, " ");
  2888.     PlayerTextDrawBackgroundColor(playerid, ObjTextdraw[playerid], 255);
  2889.     PlayerTextDrawFont(playerid, ObjTextdraw[playerid], 1);
  2890.     PlayerTextDrawLetterSize(playerid, ObjTextdraw[playerid], 0.290000, 1.300000);
  2891.     PlayerTextDrawColor(playerid, ObjTextdraw[playerid], -1);
  2892.     PlayerTextDrawSetOutline(playerid, ObjTextdraw[playerid], 0);
  2893.     PlayerTextDrawSetProportional(playerid, ObjTextdraw[playerid], 1);
  2894.     PlayerTextDrawSetShadow(playerid, ObjTextdraw[playerid], 1);
  2895.     PlayerTextDrawUseBox(playerid, ObjTextdraw[playerid], 1);
  2896.     PlayerTextDrawBoxColor(playerid, ObjTextdraw[playerid], 170);
  2897.     PlayerTextDrawTextSize(playerid, ObjTextdraw[playerid], 990.000000, 180.000000);
  2898.     return 1;
  2899. }
  2900.  
  2901. stock UpdateObjectTextdraw(playerid, const str2[] = "_")
  2902. {
  2903.     new bigmsg[256];
  2904.     if(GetPVarInt(playerid, "SelectedObject") != -1)
  2905.     {
  2906.         new slot = GetPVarInt(playerid, "SelectedObject");
  2907.         new Float:Float[6];
  2908.         GetDynamicObjectPos(objects[slot],Float[0],Float[1],Float[2]);
  2909.         GetDynamicObjectRot(objects[slot],Float[3],Float[4],Float[5]);
  2910.         format(bigmsg,256,"  ~y~Slot: ~w~%d  ~y~Model: ~w~%d           ~p~X: ~w~%.1f ~p~Y: ~w~%.1f ~p~Z: ~w~%.1f       ~p~RX: ~w~%.1f ~p~RY: ~w~%.1f ~p~RZ: ~w~%.1f       ~r~%s",
  2911.         slot,objectmodel[slot],Float[0],Float[1],Float[2],Float[3],Float[4],Float[5],str2);
  2912.     }
  2913.     else
  2914.         bigmsg = "                          You are on ~y~object selection mode~w~.    Click in ~y~any object~w~ to begin with the ~y~object edition system~w~.";
  2915.  
  2916.     PlayerTextDrawSetString(playerid, ObjTextdraw[playerid], bigmsg);
  2917.     return 1;
  2918. }
  2919.  
  2920. public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
  2921. {
  2922.     if(!IsValidDynamicObject(objectid)) return 0;
  2923.  
  2924.  
  2925.     if(response == EDIT_RESPONSE_CANCEL)
  2926.     {
  2927.         if(!GetPVarInt(playerid,"Modifying"))
  2928.         {
  2929.             Info(playerid, "You canceled the object edition, you're no longer on edition mode.");
  2930.             OnObjectEditMode(playerid, false);
  2931.             CancelEdit(playerid);
  2932.             if(GetPVarInt(playerid,"oinfo"))
  2933.             {
  2934.                 DestroyObjectTextdraw(playerid);
  2935.                 PlayerTextDrawSetString(playerid, objinfo[playerid][26], "~b~EDIT");
  2936.                 return SelectTextDraw(playerid, 0xBBBBBBBB);
  2937.             }
  2938.             //SetPVarInt(playerid, "SelectedObject", -1);
  2939.         }
  2940.         DeletePVar(playerid,"Modifying");
  2941.     }
  2942.     else if(response == EDIT_RESPONSE_FINAL)
  2943.     {
  2944.         if(!GetPVarInt(playerid,"Modifying"))
  2945.         {
  2946.             MoveDynamicObject(objectid, x,y,z,10000,rx,ry,rz);
  2947.        
  2948.             Info(playerid, "You successfully moved the object to it's new position.");
  2949.             Info(playerid, "You have been put back in selection mode, use {FF6600}ESC {ffffff}to exit it.");
  2950.             UpdateObjectTextdraw(playerid);
  2951.             SelectObject(playerid);
  2952.             OnObjectEditMode(playerid, false);
  2953.  
  2954.             if(GetPVarInt(playerid,"oinfo"))
  2955.             {
  2956.                 CancelEdit(playerid);
  2957.                 DestroyObjectTextdraw(playerid);
  2958.                 PlayerTextDrawSetString(playerid, objinfo[playerid][26], "~b~EDIT");
  2959.                 return SelectTextDraw(playerid, 0xBBBBBBBB);
  2960.             }
  2961.         }
  2962.         //SetPVarInt(playerid, "SelectedObject", -1);
  2963.     }
  2964.     else
  2965.     {
  2966.         if(!GetPVarInt(playerid,"Modifying"))
  2967.         {
  2968.             MoveDynamicObject(objectid, x,y,z,10000,rx,ry,rz);
  2969.             UpdateObjectTextdraw(playerid,"(edit mode)");
  2970.             UpdateObjectInfoTextdraws(playerid,objectid,GetPVarInt(playerid,"SelectedObject"));
  2971.         }
  2972.     }
  2973.     return 0;
  2974. }
  2975.  
  2976. public OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z)
  2977. {
  2978.     new slot = -1;
  2979.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  2980.     {
  2981.         if(objectid == objects[i])
  2982.         {
  2983.             slot = i;
  2984.             break;
  2985.         }
  2986.         else continue;
  2987.     }
  2988.     if(slot == -1)
  2989.         return Error(playerid, "That's not your object...");
  2990.  
  2991.     format(msg, sizeof(msg),"%d",slot);
  2992.     cmd_oedit(playerid,msg);
  2993.     OnObjectEditMode(playerid,true);
  2994.     UpdateObjectTextdraw(playerid);
  2995.     return 0;
  2996. }
  2997.  
  2998. stock OnObjectEditMode(playerid, bool:mode)
  2999. {
  3000.     if(mode == true)
  3001.     {
  3002.         if(IsPlayerEdittingObject(playerid))
  3003.         {
  3004.             UpdateObjectTextdraw(playerid);
  3005.             return 0;
  3006.         }
  3007.  
  3008.         SetPVarInt(playerid,"OnObjectEditMode",1);
  3009.         //CreateObjectTextdraw(playerid);
  3010.         UpdateObjectTextdraw(playerid);
  3011.         //ShowObjectTextdraw(playerid);
  3012.         return 1;
  3013.     }
  3014.     else
  3015.     {
  3016.         if(!IsPlayerEdittingObject(playerid))
  3017.             return 0;
  3018.  
  3019.         SetPVarInt(playerid,"OnObjectEditMode",0);
  3020.         //DestroyObjectTextdraw(playerid);
  3021.         return 1;
  3022.     }
  3023. }
  3024.  
  3025. stock IsPlayerEdittingObject(playerid)
  3026. {
  3027.     return GetPVarInt(playerid,"OnObjectEditMode");
  3028. }
  3029.  
  3030.  
  3031. stock ExportMap(playerid, mapname[], function[])
  3032. {
  3033.     new map[64],totalobjects = 0,File:mapfile;
  3034.     format(map, sizeof(map),"/maps/%s.map",mapname);
  3035.  
  3036.     if(dini_Exists(map))
  3037.         fremove(map);
  3038.  
  3039.     dini_Create(map);
  3040.     mapfile = fopen(map,io_write);
  3041.     new Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz;
  3042.     new model, txd[24], txt[24], col;
  3043.  
  3044.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  3045.     {
  3046.         if(IsValidDynamicObject(objects[i]))
  3047.         {
  3048.             GetDynamicObjectPos(objects[i],x,y,z);
  3049.             GetDynamicObjectRot(objects[i],rx,ry,rz);
  3050.  
  3051.             format(msg, sizeof(msg),"object[%d] = %s(%d,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f);\n\r",i,function,objectmodel[i],x,y,z,rx,ry,rz);
  3052.             fwrite(mapfile, msg);
  3053.             if(strcmp(objectmatinfo[i][0],"None",true))
  3054.             {
  3055.                 sscanf(objectmatinfo[i][0],"is[16]s[16]h",model,txd,txt,col);
  3056.                 format(msg, sizeof(msg),"SetDynamicObjectMaterial(object[%d],%d,%d,%s,%s,%d);\n\r",i,0,model,txd,txt,col);
  3057.                 fwrite(mapfile, msg);
  3058.             }
  3059.             if(strcmp(objectmatinfo[i][1],"None",true))
  3060.             {
  3061.                 sscanf(objectmatinfo[i][1],"is[16]s[16]h",model,txd,txt,col);
  3062.                 format(msg, sizeof(msg),"SetDynamicObjectMaterial(object[%d],%d,%d,%s,%s,%d);\n\r",i,1,model,txd,txt,col);
  3063.                 fwrite(mapfile, msg);
  3064.             }
  3065.             if(strcmp(objectmatinfo[i][2],"None",true))
  3066.             {
  3067.                 sscanf(objectmatinfo[i][2],"is[16]s[16]h",model,txd,txt,col);
  3068.                 format(msg, sizeof(msg),"SetDynamicObjectMaterial(object[%d],%d,%d,%s,%s,%d);\n\r",i,2,model,txd,txt,col);
  3069.                 fwrite(mapfile, msg);
  3070.             }
  3071.             totalobjects ++;
  3072.         }
  3073.     }
  3074.  
  3075.     fclose(mapfile);
  3076.  
  3077.     if(totalobjects == 0)
  3078.     {
  3079.         fremove(map);
  3080.         Error(playerid, "You must have atleast one object to save a map!");
  3081.         return 1;
  3082.     }
  3083.  
  3084.     dini_IntSet(map,"Objects",totalobjects);
  3085.     format(msg, sizeof(msg),"Map has been saved as '%s' (%s).",mapname,function);
  3086.     Info(playerid, msg);
  3087.  
  3088.     return 1;
  3089. }
  3090.  
  3091. stock SaveMap(playerid, mapname[])
  3092. {
  3093.     new map[64],totalobjects = 0,slotname[5];
  3094.     format(map, sizeof(map),"maps/%s.ini",mapname);
  3095.  
  3096.     if(dini_Exists(map))
  3097.     {
  3098.         fremove(map);
  3099.     }
  3100.  
  3101.     dini_Create(map);
  3102.     dini_Set(map,"Owner",PlayerName(playerid));
  3103.     SetPVarString(playerid,"LastSavedMap",mapname);
  3104.     new Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz;
  3105.  
  3106.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  3107.     {
  3108.         if(IsValidDynamicObject(objects[i]))
  3109.         {
  3110.             GetDynamicObjectPos(objects[i],x,y,z);
  3111.             GetDynamicObjectRot(objects[i],rx,ry,rz);
  3112.  
  3113.             format(bigmatinfo, sizeof(bigmatinfo),"%d,%f,%f,%f,%f,%f,%f,%s|%s|%s",objectmodel[i],x,y,z,rx,ry,rz,objectmatinfo[i][0],objectmatinfo[i][1],objectmatinfo[i][2]);
  3114.             format(slotname, sizeof(slotname),"%d",i);
  3115.             dini_Set(map,slotname,bigmatinfo);
  3116.             totalobjects ++;
  3117.         }
  3118.     }
  3119.  
  3120.     if(totalobjects == 0)
  3121.     {
  3122.         fremove(map);
  3123.         Error(playerid, "You must have atleast one object to save a map!");
  3124.         return 1;
  3125.     }
  3126.  
  3127.     dini_IntSet(map,"Objects",totalobjects);
  3128.     format(msg, sizeof(msg),"Map has been saved as '%s', Use /loadmap to load it whenever you want.",mapname);
  3129.     Info(playerid, msg);
  3130.  
  3131.     Tip(playerid, "You can use {FF6600}~k~~GROUP_CONTROL_BWD~ {FFFFFF}to perform a {FF6600}quick save {FFFFFF}of this map.");
  3132.     return 1;
  3133. }
  3134.  
  3135. CMD:orot(playerid, params[])
  3136. {
  3137.     new Float:Float_1,Float:Float_2,Float:Float_3,Float:Float_4;
  3138.     if (sscanf(params, "ffff",Float_1,Float_2,Float_3,Float_4))
  3139.         return Usage(playerid, "/orot <rx> <ry> <rz> <speed>");
  3140.  
  3141.     new editting = GetPVarInt(playerid, "SelectedObject");
  3142.     if(editting == -1) return Error(playerid, "You're not editting any object!");
  3143.     if(Attached[editting] >= 1) return Error(playerid, "You can't do this with attached objects");
  3144.  
  3145.     SetPVarInt(playerid,"Modifying",1);
  3146.     CancelEdit(playerid);
  3147.     new Float:X,Float:Y,Float:Z,Float:RX,Float:RY,Float:RZ;
  3148.     GetDynamicObjectPos(objects[editting],X,Y,Z);
  3149.     GetDynamicObjectRot(objects[editting],RX,RY,RZ);
  3150.  
  3151.     MoveDynamicObject(objects[editting],X,Y,Z+0.0001,Float_4,RX+Float_1,RY+Float_2,RZ+Float_3);
  3152.     if(IsPlayerEdittingObject(playerid))
  3153.         EditDynamicObject(playerid,objects[editting]);
  3154.     UpdateObjectInfoTextdraws(playerid,objects[editting],editting);
  3155.     format(msg, sizeof(msg),"(RX %s;RY %s;RZ %s)",ProcessFloat(Float_1),ProcessFloat(Float_2),ProcessFloat(Float_3));
  3156.     UpdateObjectTextdraw(playerid, msg);
  3157.     return 1;
  3158. }
  3159.  
  3160.  
  3161. stock UpdateNearPlayers(playerid)
  3162. {
  3163.     new Float:x,Float:y,Float:z;
  3164.     GetPlayerPos(playerid, x,y,z);
  3165.     for(new i = 0; i < PLAYERS; i ++)
  3166.     {
  3167.         if(IsPlayerConnected(i))
  3168.         {
  3169.             if(IsPlayerInRangeOfPoint(i,200, x,y,z))
  3170.             {
  3171.                 Streamer_Update(i);
  3172.             }
  3173.         }
  3174.     }
  3175.     return 1;
  3176. }
  3177.  
  3178. stock GetObjectSlot(object)
  3179. {
  3180.     if(!IsValidDynamicObject(object)) return -1;
  3181.  
  3182.     new slt = -1;
  3183.  
  3184.     for(new i = 0; i < MAX_PLAYER_OBJECTS; i ++)
  3185.     {
  3186.         if(object == objects[i])
  3187.         {
  3188.             return i;
  3189.         }
  3190.     }
  3191.     return slt;
  3192. }
  3193.  
  3194. stock IsNumeric(const string[])
  3195. {
  3196.     for (new i = 0, j = strlen(string); i < j; i++)
  3197.     {
  3198.         if (string[i] > '9' || string[i] < '0') return 0;
  3199.     }
  3200.     return 1;
  3201. }
  3202.  
  3203. stock timestamp() //By Y-Less
  3204. {
  3205.     new h,m,s,d,n,y;
  3206.     gettime(h, m, s);
  3207.     getdate(y, n, d);
  3208.     return maketime(h, m, s, d, n, y);
  3209. }
  3210.  
  3211. stock maketime(hour, minute, second, day, month, year) //By Y-Less
  3212. {
  3213.     static days_of_month[12] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
  3214.     static lMinute, lHour,lDay,lMonth, lYear, lMinuteS, lHourS, lDayS, lMonthS, lYearS;
  3215.     if (year != lYear)
  3216.     {
  3217.         lYearS = 0;
  3218.         for (new j = 1970; j < year; j++)
  3219.         {
  3220.             lYearS += 31536000;
  3221.             if ((!(j % 4) && (j % 100)) || !(j % 400)) lYearS += 86400;
  3222.         }
  3223.         lYear = year;
  3224.     }
  3225.     if (month != lMonth)
  3226.     {
  3227.         lMonthS = 0;
  3228.         month--;
  3229.         for (new i = 0; i < month; i++)
  3230.         {
  3231.             lMonthS += days_of_month[i] * 86400;
  3232.             if ((i == 1) && ((!(year % 4) && (year % 100)) || !(year % 400))) lMonthS += 86400;
  3233.         }
  3234.         lMonth = month;
  3235.     }
  3236.     if (day != lDay)
  3237.     {
  3238.         lDayS = day * 86400;
  3239.         lDay = day;
  3240.     }
  3241.     if (hour != lHour)
  3242.     {
  3243.         lHourS = hour * 3600;
  3244.         lHour = hour;
  3245.     }
  3246.     if (minute != lMinute)
  3247.     {
  3248.         lMinuteS = minute * 60;
  3249.         lMinute = minute;
  3250.     }
  3251.     return lYearS + lMonthS + lDayS + lHourS + lMinuteS + second;
  3252. }
  3253.  
  3254.  
  3255. stock Tip(playerid, const message[])
  3256. {
  3257.     new string[200];
  3258.     format(string, sizeof(string),"{008080}TIP: {FFFFFF}%s",message);
  3259.     RenderMessage(playerid,COLOR_WHITE,string);
  3260.     return 1;
  3261. }
  3262. stock Error(playerid, const message[])
  3263. {
  3264.     new string[200];
  3265.     format(string, sizeof(string),"{FF6347}ERROR: {FFFFFF}%s",message);
  3266.     RenderMessage(playerid,COLOR_WHITE,string);
  3267.     return 1;
  3268. }
  3269. stock Warning(playerid, const message[])
  3270. {
  3271.     new string[200];
  3272.     format(string, sizeof(string),"{FF0000}WARNING: {FFFFFF}%s",message);
  3273.     RenderMessage(playerid,COLOR_WHITE,string);
  3274.     return 1;
  3275. }
  3276. stock OtherMsg(playerid, const message[])
  3277. {
  3278.     RenderMessage(playerid,COLOR_TIP,message);
  3279.     return 1;
  3280. }
  3281. stock Info(playerid, const message[])
  3282. {
  3283.     new string[200];
  3284.     format(string, sizeof(string),"{00FFFF}INFO: {FFFFFF}%s",message);
  3285.     RenderMessage(playerid,COLOR_WHITE,string);
  3286.     return 1;
  3287. }
  3288. stock Usage(playerid, const message[])
  3289. {
  3290.     new string[200];
  3291.     format(string, sizeof(string),"{FFFF00}USAGE: {FFFFFF}%s",message);
  3292.     RenderMessage(playerid,COLOR_WHITE,string);
  3293.     return 1;
  3294. }
  3295.  
  3296. stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
  3297. {
  3298.     new Float:a;
  3299.     GetPlayerPos(playerid, x, y, a);
  3300.     GetPlayerFacingAngle(playerid, a);
  3301.     x += (distance * floatsin(-a, degrees));
  3302.     y += (distance * floatcos(-a, degrees));
  3303. }
  3304.  
  3305. stock PlayerName(playerid)
  3306. {
  3307.     GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  3308.     return name;
  3309. }
  3310.  
  3311. stock RenderMessage(top, color, const text[])
  3312. {
  3313.     new temp[156], tosearch = 0, colorint, posscolor, lastcol[12];
  3314.     new mess[356], colors, tempc; format(mess, 356, "%s",text);
  3315.  
  3316.     while(strlen(mess) > 0)
  3317.     {
  3318.         if(strlen(mess) < 140)
  3319.         {
  3320.             SendClientMessage(top, color, mess);
  3321.             break;
  3322.         }
  3323.  
  3324.         strmid(temp, mess, 0, 128);
  3325.         while(strfind(temp, "{", true) != -1)
  3326.         {
  3327.             tempc = strfind(temp, "{", true);
  3328.             if(temp[tempc+7] == '}')
  3329.             {
  3330.                 colors ++;
  3331.                 strdel(temp, tempc, tempc+7);
  3332.             }
  3333.             else
  3334.             {
  3335.                 temp[tempc] = '0';
  3336.                 continue;
  3337.             }
  3338.         }
  3339.         temp = "";
  3340.  
  3341.         if(strfind(mess," ",true,100+colors*8) != -1)
  3342.         {
  3343.             tosearch = strfind(mess," ",true,100+colors*8)+1;
  3344.             while(tosearch > 140)
  3345.             {
  3346.                 colors --;
  3347.                 tosearch = strfind(mess," ",true,100+colors*8)+1;
  3348.             }
  3349.         }
  3350.  
  3351.         if(strfind(mess,"{",true) != -1) //color codes detection , YAY
  3352.         {
  3353.             posscolor = strfind(mess,"{",true);
  3354.  
  3355.             if(mess[posscolor+7] == '}') //detected one color
  3356.                 colorint = posscolor;
  3357.  
  3358.             while(strfind(mess,"{",true,colorint+1) != -1) //repeat until none are found
  3359.             {
  3360.                 posscolor = strfind(mess,"{",true,colorint+1);
  3361.                 if(posscolor > tosearch) //if next color will be on the other line, use last color found to render on the next line
  3362.                 {
  3363.                     posscolor = colorint;
  3364.                     break;
  3365.                 }
  3366.                 if(mess[posscolor+7] == '}') //if found, then assign the color
  3367.                 {
  3368.                     colorint = posscolor;
  3369.                 }
  3370.                 else
  3371.                 {
  3372.                     posscolor = colorint; //else, leave the last color.
  3373.                     break;
  3374.                 }
  3375.             }
  3376.  
  3377.             if(colorint == posscolor) //if the color position equals the one that was found
  3378.                 strmid(lastcol,mess,colorint,colorint+8); //get the last used color string.
  3379.         }
  3380.  
  3381.         strmid(temp, mess, 0, tosearch);
  3382.         SendClientMessage(top, color, temp);
  3383.         strdel(mess, 0, tosearch);
  3384.         strins(mess, lastcol, 0); //insert last used color into the new line to be processed.
  3385.  
  3386.  
  3387.         temp = "";
  3388.         tosearch = 0;
  3389.         colors = 0;
  3390.     }
  3391.     return 1;
  3392. }
  3393.  
  3394. stock RenderMessageToAll(color, const text[])
  3395. {
  3396.     new temp[156], tosearch = 0, colorint, posscolor, lastcol[12];
  3397.     new mess[356], colors, tempc; format(mess, 356, "%s",text);
  3398.  
  3399.     while(strlen(mess) > 0)
  3400.     {
  3401.         strmid(temp, mess, 0, 128);
  3402.         while(strfind(temp, "{", true) != -1)
  3403.         {
  3404.             tempc = strfind(temp, "{", true);
  3405.             if(temp[tempc+7] == '}')
  3406.             {
  3407.                 colors ++;
  3408.                 strdel(temp, tempc, tempc+7);
  3409.             }
  3410.             else
  3411.             {
  3412.                 temp[tempc] = '0';
  3413.                 continue;
  3414.             }
  3415.         }
  3416.         temp = "";
  3417.  
  3418.         if(strfind(mess," ",true,100+colors*8) != -1)
  3419.         {
  3420.             tosearch = strfind(mess," ",true,100+colors*8)+1;
  3421.             while(tosearch > 140)
  3422.             {
  3423.                 colors --;
  3424.                 tosearch = strfind(mess," ",true,100+colors*8)+1;
  3425.             }
  3426.         }
  3427.         if(tosearch <= 0)
  3428.         {
  3429.             SendClientMessageToAll(color, mess);
  3430.             break;
  3431.         }
  3432.  
  3433.         if(strfind(mess,"{",true) != -1) //color codes detection , YAY
  3434.         {
  3435.             posscolor = strfind(mess,"{",true);
  3436.  
  3437.             if(mess[posscolor+7] == '}') //detected one color
  3438.                 colorint = posscolor;
  3439.  
  3440.             while(strfind(mess,"{",true,colorint+1) != -1) //repeat until none are found
  3441.             {
  3442.                 posscolor = strfind(mess,"{",true,colorint+1);
  3443.                 if(posscolor > tosearch) //if next color will be on the other line, use last color found to render on the next line
  3444.                 {
  3445.                     posscolor = colorint;
  3446.                     break;
  3447.                 }
  3448.                 if(mess[posscolor+7] == '}') //if found, then assign the color
  3449.                 {
  3450.                     colorint = posscolor;
  3451.                 }
  3452.                 else
  3453.                 {
  3454.                     posscolor = colorint; //else, leave the last color.
  3455.                     break;
  3456.                 }
  3457.             }
  3458.  
  3459.             if(colorint == posscolor) //if the color position equals the one that was found
  3460.                 strmid(lastcol,mess,colorint,colorint+8); //get the last used color string.
  3461.         }
  3462.  
  3463.         strmid(temp, mess, 0, tosearch);
  3464.         SendClientMessageToAll(color, temp);
  3465.         strdel(mess,0,tosearch);
  3466.         strins(mess, lastcol, 0);
  3467.  
  3468.         temp = "";
  3469.         tosearch = 0;
  3470.         colors = 0;
  3471.     }
  3472.     return 1;
  3473. }
Add Comment
Please, Sign In to add comment