Advertisement
Guest User

Gamemode Bem Simples

a guest
Feb 10th, 2015
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GwBasic 20.69 KB | None | 0 0
  1. //~~~~~~~~~~PLÁGIO É CRIME~~~~~~~~~//
  2. //~~~~~~~~MANTENHA OS CRÉDITOS~~~~~//
  3. //~~~~~~~~~~~~CRÉDITOS~~~~~~~~~~~~~//
  4. //~~~~~~~~~~BY-Sweet3D~~~~~~~~~~~~~//
  5. //~~~~~~~~~~PLÁGIO É CRIME~~~~~~~~~//
  6.  
  7. #include <a_samp>
  8.  
  9. new pickup_Cash;
  10. new pickup_Health;
  11. new Menu:examplemenu;
  12.  
  13. #if defined FILTERSCRIPT
  14.  
  15. public OnFilterScriptInit()
  16. {
  17.     print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  18.     print("~~~~~~~~~~~GAMEMODE By-Sweet3D-ON~~~~~~~~");
  19.     print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  20.     return 1;
  21. }
  22.  
  23. public OnFilterScriptExit()
  24. {
  25.     return 1;
  26. }
  27.  
  28. #else
  29.  
  30. main()
  31. {
  32.     print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  33.     print("~~~~~~~~~~~GAMEMODE By-Sweet3D-ON~~~~~~~~");
  34.     print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  35. }
  36.  
  37. #endif
  38.  
  39. public OnGameModeInit()
  40. {
  41.     // Don't use these lines if it's a filterscript
  42.     SetGameModeText("LOS SANTOS [RPG]"); // <~~ Edite Aqui <~~//
  43.     AddPlayerClass(303, 78,1480.9490,-1766.6674,18.7958, 269.1425, 0, 0, 0, 0, 0, 0);
  44.    
  45.     pickup_Cash = CreatePickup(1274, 78,1480.9490,-1766.6674,18.7958, 269.1425);
  46.     pickup_Health = CreatePickup(1240, 78,1480.9490,-1766.6674,18.7958, 269.1425);
  47.    
  48.     examplemenu = CreateMenu("CREDITOS", 0, 200.0, 100.0, 150.0, 150.0);
  49.     AddMenuItem(examplemenu, 0, "GAMEMODE ~~> Layky");
  50.     AddMenuItem(examplemenu, 0, "MAPA ~~> Sweet3D");
  51.  
  52.     //~~MAPA LOMBADAS~~//
  53.  
  54.     CreateObject(3865, 2431.477051, -1662.562378, 23.346226, 0.0000, 0.0000, 90.0000);
  55.     CreateObject(3865, 2331.300537, -1732.902344, 10.866785, 0.0000, 0.0000, 0.0000);
  56.     CreateObject(3865, 2822.697021, -1969.249634, 8.446474, 0.0000, 0.0000, 270.0000);
  57.     CreateObject(3865, 2837.791260, -1968.909790, 8.421474, 0.0000, 0.0000, 270.0000);
  58.     CreateObject(3865, 1928.193970, -1751.836670, 10.716782, 0.0000, 0.0000, 180.0000);
  59.     CreateObject(3865, 1613.119751, -1732.000244, 10.716789, 0.0000, 0.0000, 180.0000);
  60.     CreateObject(3865, 1529.771484, -1720.911865, 10.841787, 0.0000, 0.0000, 90.0001);
  61.     CreateObject(3865, 1520.375244, -1732.240356, 10.749582, 0.0000, 0.0000, 0.0000);
  62.     CreateObject(3865, 1529.424561, -1603.775513, 10.766790, 0.0000, 0.0000, 270.0000);
  63.     CreateObject(3865, 1323.189087, -1731.666870, 10.741789, 0.0000, 0.0000, 180.0002);
  64.     CreateObject(3865, 1160.055054, -1711.628662, 11.140226, 0.0000, 0.0000, 180.0002);
  65.     CreateObject(3865, 369.826508, -1657.199341, 30.101086, 0.0000, 0.0000, 270.0000);
  66.     CreateObject(3865, 369.718628, -1722.624146, 19.197357, 0.0000, 0.0000, 270.0000);
  67.     CreateObject(3865, 369.665771, -1829.674561, 5.005795, 0.0000, 0.0000, 270.0000);
  68.     CreateObject(3865, 551.933533, -1668.723267, 15.915226, 0.0000, 0.0000, 0.0000);
  69.     CreateObject(3865, 369.869354, -1982.568359, 4.980794, 0.0000, 0.0000, 270.0000);
  70.     CreateObject(3865, 1261.886353, -1079.179199, 24.798252, 0.0000, 0.0000, 270.0000);
  71.     CreateObject(3865, 1323.420654, -1038.153931, 26.337036, 0.0000, 0.0000, 0.0000);
  72.     CreateObject(3865, 1482.021362, -1057.819458, 21.238293, 0.0000, 0.0000, 90.0001);
  73.     CreateObject(3865, 1589.030884, -1160.881226, 21.365175, 0.0000, 0.0000, 180.0001);
  74.     CreateObject(3865, 2244.503418, -1139.947632, 23.579838, 0.0000, 0.0000, 168.7501);
  75.     CreateObject(3865, 2370.846191, -1327.036133, 21.369862, 0.0000, 0.0000, 270.0001);
  76.     CreateObject(3865, 2450.775635, -1518.902710, 35.425476, 0.0000, 0.0000, 270.0001);
  77.     CreateObject(3865, 2430.737793, -1470.459473, 21.367035, 0.0000, 0.0000, 270.0001);
  78.     CreateObject(3865, 2430.773682, -1662.756348, 23.073957, 0.0000, 0.0000, 270.0000);
  79.     CreateObject(3865, 2463.247803, -1658.498779, 10.716391, 0.0000, 0.0000, 180.0000);
  80.     CreateObject(3865, 2463.461182, -1659.396729, 10.744118, 0.0000, 0.0000, 0.0000);
  81.     CreateObject(3865, 2331.122070, -1731.971313, 10.844513, 0.0000, 0.0000, 180.0001);
  82.     CreateObject(3865, 1928.404663, -1752.843994, 10.756287, 0.0000, 0.0000, 0.0000);
  83.     CreateObject(3865, 1613.330078, -1732.830933, 10.762777, 0.0000, 0.0000, 0.0000);
  84.     CreateObject(3865, 1520.179810, -1731.617065, 10.791788, 0.0000, 0.0000, 180.0001);
  85.     CreateObject(3865, 1529.126587, -1721.031372, 10.791788, 0.0000, 0.0000, 270.0000);
  86.     CreateObject(3865, 1530.076660, -1603.610840, 10.794518, 0.0000, 0.0000, 90.0000);
  87.     CreateObject(3865, 1323.363281, -1732.769409, 10.716789, 0.0000, 0.0000, 0.0000);
  88.     CreateObject(3865, 1160.283081, -1712.683594, 11.117954, 0.0000, 0.0000, 0.0000);
  89.     CreateObject(3865, 370.659607, -1657.000244, 30.078672, 0.0000, 0.0000, 90.0000);
  90.     CreateObject(3865, 370.500366, -1722.399292, 19.193628, 0.0000, 0.0000, 90.0000);
  91.     CreateObject(3865, 370.023102, -1829.540161, 4.983466, 0.0000, 0.0000, 90.0000);
  92.     CreateObject(3865, 370.045380, -1982.343506, 5.005794, 0.0000, 0.0000, 90.0000);
  93.     CreateObject(3865, 1263.092773, -1078.985840, 24.775980, 0.0000, 0.0000, 90.0002);
  94.     CreateObject(3865, 1323.274780, -1037.234497, 26.289764, 0.0000, 0.0000, 180.0000);
  95.     CreateObject(3865, 1589.247559, -1161.398438, 21.328182, 0.0000, 0.0000, 0.0000);
  96.     CreateObject(3865, 2471.438965, -1732.692017, 10.899067, 0.0000, 0.0000, 0.0000);
  97.     CreateObject(3865, 2471.192627, -1731.901733, 10.896339, 0.0000, 0.0000, 180.0000);
  98.     CreateObject(3865, 2185.634277, -1742.818848, 10.683977, 0.0000, 0.0000, 90.0001);
  99.     CreateObject(3865, 2184.976563, -1743.038086, 10.661705, 0.0000, 0.0000, 270.0000);
  100.     CreateObject(3865, 2081.134033, -1906.306152, 10.941786, 0.0000, 0.0000, 270.0000);
  101.     CreateObject(3865, 2081.802246, -1906.137207, 10.994513, 0.0000, 0.0000, 90.0002);
  102.     CreateObject(3865, 1941.795654, -1931.945435, 10.941786, 0.0000, 0.0000, 180.0000);
  103.     CreateObject(3865, 1942.000244, -1932.614624, 10.969513, 0.0000, 0.0000, 0.0001);
  104.     CreateObject(3865, 1701.721436, -1592.865723, 10.883875, 0.0000, 0.0000, 0.0001);
  105.     CreateObject(3865, 1701.480591, -1592.149414, 10.911602, 0.0000, 0.0000, 180.0002);
  106.     CreateObject(3865, 1158.438721, -931.988098, 40.877213, 0.0000, 0.0000, 270.0001);
  107.     CreateObject(3865, 1159.107300, -931.840698, 41.000446, 0.0000, 0.0000, 90.0001);
  108.     CreateObject(3865, 925.623047, -948.598267, 37.538677, 0.0000, 0.0000, 180.0003);
  109.     CreateObject(3865, 925.835327, -950.811218, 37.566128, 0.0000, 0.0000, 0.0001);
  110.     CreateObject(3865, 355.255707, -1773.039551, 2.743529, 0.0000, 0.0000, 360.0000);
  111.     CreateObject(3865, 355.125214, -1772.422607, 2.846187, 0.0000, 0.0000, 179.9999);
  112.     CreateObject(3865, 721.254333, -1586.136841, 11.725403, 0.0000, 0.0000, 179.9999);
  113.     CreateObject(3865, 721.424805, -1586.838379, 11.703085, 0.0000, 0.0000, 359.9997);
  114.     CreateObject(3865, 944.614075, -1572.733643, 10.791788, 0.0000, 0.0000, 359.9997);
  115.     CreateObject(3865, 944.399841, -1571.812500, 10.794516, 0.0000, 0.0000, 179.9994);
  116.     CreateObject(3865, 1296.987305, -1660.287354, 10.741789, 0.0000, 0.0000, 269.9996);
  117.     CreateObject(3865, 1297.920410, -1660.110474, 10.719517, 0.0000, 0.0000, 89.9996);
  118.     CreateObject(3865, 1312.898438, -1660.130859, 10.791788, 0.0000, 0.0000, 89.9996);
  119.     CreateObject(3865, 1311.871582, -1660.327515, 10.816788, 0.0000, 0.0000, 269.9995);
  120.     CreateObject(3865, 1357.469604, -1922.608154, 17.813128, 0.0000, 0.0000, 348.7497);
  121.     CreateObject(3865, 1357.431763, -1921.695679, 17.840855, 0.0000, 0.0000, 168.7492);
  122.     CreateObject(3865, 1289.793579, -2056.125000, 56.030380, 0.0000, 0.0000, 179.9992);
  123.     CreateObject(3865, 1289.957642, -2057.000488, 56.057831, 0.0000, 0.0000, 359.9987);
  124.     CreateObject(3865, 1389.576538, -1743.191528, 10.766788, 0.0000, 0.0000, 89.9989);
  125.     CreateObject(3865, 1388.664185, -1743.370361, 10.719517, 0.0000, 0.0000, 269.9984);
  126.     CreateObject(3865, 2823.456055, -1969.039063, 8.474201, 0.0000, 0.0000, 89.9988);
  127.     CreateObject(3865, 2838.529785, -1968.712524, 8.394894, 0.0000, 0.0000, 89.9988);
  128.     CreateObject(3865, 2287.913330, -2304.382568, 11.077242, 0.0000, 0.0000, 315.0000);
  129.     CreateObject(3865, 2288.336670, -2303.660400, 11.086193, 0.0000, 0.0000, 135.0000);
  130.     CreateObject(3865, 1962.146973, -2177.654297, 11.130848, 0.0000, 0.0000, 90.0000);
  131.     CreateObject(3865, 1961.116943, -2177.814697, 11.208574, 0.0000, 0.0000, 270.0000);
  132.     CreateObject(3865, 1821.394165, -1876.714111, 10.897945, 0.0000, 0.0000, 270.0000);
  133.     CreateObject(3865, 1822.076172, -1876.460693, 10.809561, 0.0000, 0.0000, 90.0002);
  134.     CreateObject(3865, 1649.388184, -1872.750488, 10.791788, 0.0000, 0.0000, 0.0003);
  135.     CreateObject(3865, 1649.187500, -1871.835205, 10.744516, 0.0000, 0.0000, 180.0004);
  136.     CreateObject(3865, 1320.845825, -1851.750488, 10.732838, 0.0000, 0.0000, 180.0004);
  137.     CreateObject(3865, 1321.046021, -1852.676392, 10.716789, 0.0000, 0.0000, 0.0002);
  138.     CreateObject(3865, 942.996826, -1230.425659, 14.144801, 0.0000, 0.0000, 90.0000);
  139.     CreateObject(3865, 942.221802, -1230.550781, 14.153721, 0.0000, 0.0000, 270.0000);
  140.     CreateObject(3865, 1150.647583, -1227.181885, 14.675970, 0.0000, 0.0000, 270.0000);
  141.     CreateObject(3865, 1151.469360, -1227.008667, 14.703636, 0.0000, 0.0000, 90.0001);
  142.     CreateObject(3865, 1343.078735, -1417.874634, 10.691790, 0.0000, 0.0000, 90.0001);
  143.     CreateObject(3865, 1342.445068, -1418.044800, 10.694517, 0.0000, 0.0000, 270.0000);
  144.     CreateObject(3865, 1357.110107, -1418.191162, 10.822189, 0.0000, 0.0000, 270.0000);
  145.     CreateObject(3865, 1358.108398, -1418.019897, 10.774204, 0.0000, 0.0000, 90.0002);
  146.     CreateObject(3865, 2431.374756, -1662.555542, 23.097296, 0.0000, 0.0000, 90.0000);
  147.     CreateObject(3865, 551.722961, -1667.656372, 15.954409, 0.0000, 0.0000, 180.0002);
  148.     CreateObject(3865, 751.345642, -1643.067261, 3.024577, 0.0000, 0.0000, 270.0000);
  149.     CreateObject(3865, 751.942383, -1642.891602, 3.052244, 0.0000, 0.0000, 90.0001);
  150.     CreateObject(3865, 728.731018, -1674.371704, 7.991571, 0.0000, 0.0000, 0.0000);
  151.     CreateObject(3865, 728.493958, -1673.562866, 8.062235, 0.0000, 0.0000, 180.0002);
  152.     CreateObject(3865, 809.758667, -1702.931396, 10.741789, 0.0000, 0.0000, 270.0000);
  153.     CreateObject(3865, 810.708984, -1702.733521, 10.766788, 0.0000, 0.0000, 90.0001);
  154.     CreateObject(3865, 917.848938, -1762.018188, 10.790501, 0.0000, 0.0000, 90.0001);
  155.     CreateObject(3865, 916.648743, -1762.241211, 10.790455, 0.0000, 0.0000, 270.0003);
  156.     CreateObject(3865, 1034.107422, -1790.956055, 11.030943, 0.0000, 0.0000, 247.5003);
  157.     CreateObject(3865, 1035.075073, -1791.027344, 11.093517, 0.0000, 0.0000, 67.5002);
  158.     CreateObject(3865, 1048.655029, -1712.691650, 10.841787, 0.0000, 0.0000, 360.0000);
  159.     CreateObject(3865, 1048.483276, -1711.638672, 10.894461, 0.0000, 0.0000, 179.9998);
  160.     CreateObject(3865, 1133.167114, -1572.739868, 10.761063, 0.0000, 0.0000, 359.9996);
  161.     CreateObject(3865, 1443.931274, -1440.247070, 10.816746, 0.0000, 0.0000, 179.9995);
  162.     CreateObject(3865, 1444.171875, -1441.324341, 10.841738, 0.0000, 0.0000, 359.9994);
  163.     CreateObject(3865, 1454.179565, -1451.536621, 10.752022, 0.0000, 0.0000, 269.9992);
  164.     CreateObject(3865, 1455.138306, -1451.353638, 10.777037, 0.0000, 0.0000, 89.9987);
  165.     CreateObject(3865, 1658.413818, -1451.878784, 10.866716, 0.0000, 0.0000, 89.9977);
  166.     CreateObject(3865, 1645.255371, -1440.412842, 10.858278, 0.0000, 0.0000, 179.9980);
  167.     CreateObject(3865, 1657.391968, -1452.048340, 10.819395, 0.0000, 0.0000, 269.9974);
  168.     CreateObject(3865, 1862.536743, -1341.274048, 10.766762, 0.0000, 0.0000, 359.9977);
  169.     CreateObject(3865, 1862.311523, -1340.149414, 10.816742, 0.0000, 0.0000, 179.9974);
  170.     CreateObject(3865, 1835.640259, -1260.315918, 10.952724, 0.0000, 0.0000, 179.9974);
  171.     CreateObject(3865, 1835.828735, -1261.352173, 10.993334, 0.0000, 0.0000, 359.9969);
  172.     CreateObject(3865, 1520.460449, -1591.673462, 10.691755, 0.0000, 0.0000, 180.0002);
  173.     CreateObject(3865, 1429.895752, -1721.351318, 10.791788, 0.0000, 0.0000, 90.0002);
  174.     CreateObject(3865, 1428.939697, -1721.552490, 10.827032, 0.0000, 0.0000, 270.0002);
  175.     CreateObject(3865, 1429.192139, -1603.109619, 10.816790, 0.0000, 0.0000, 270.0002);
  176.     CreateObject(3865, 1430.112427, -1602.950806, 10.791758, 0.0000, 0.0000, 90.0003);
  177.     CreateObject(3865, 1455.152222, -1313.456665, 10.816761, 0.0000, 0.0000, 90.0003);
  178.     CreateObject(3865, 1454.332642, -1313.624512, 10.869434, 0.0000, 0.0000, 270.0001);
  179.     CreateObject(3865, 1609.789307, -1314.432373, 14.764170, 0.0000, 0.0000, 90.0005);
  180.     CreateObject(3865, 1604.048584, -1314.554688, 14.820707, 0.0000, 0.0000, 270.0005);
  181.     CreateObject(3865, 1714.301636, -1184.646484, 21.046417, 0.0000, 0.0000, 270.0005);
  182.     CreateObject(3865, 1715.294067, -1184.392334, 21.099091, 0.0000, 0.0000, 90.0003);
  183.     CreateObject(3865, 1442.673096, -1160.448242, 21.090176, 0.0000, 0.0000, 180.0006);
  184.     CreateObject(3865, 1442.827393, -1161.364746, 21.117846, 0.0000, 0.0000, 0.0007);
  185.     CreateObject(3865, 1228.913208, -1280.291504, 10.874914, 0.0000, 0.0000, 180.0006);
  186.     CreateObject(3865, 1229.058960, -1281.279053, 10.952602, 0.0000, 0.0000, 0.0004);
  187.     CreateObject(3865, 1062.941406, -1428.453979, 10.770216, 0.0000, 0.0000, 90.0006);
  188.     CreateObject(3865, 1061.890381, -1428.657593, 10.795212, 0.0000, 0.0000, 270.0007);
  189.     CreateObject(3865, 990.221741, -1490.114136, 10.791727, 0.0000, 0.0000, 0.0009);
  190.     CreateObject(3865, 990.003357, -1489.201538, 10.816698, 0.0000, 0.0000, 180.0011);
  191.     CreateObject(3865, 1036.928833, -1626.829834, 10.766735, 0.0000, 0.0000, 270.0007);
  192.     CreateObject(3865, 1037.928345, -1626.630249, 10.716774, 0.0000, 0.0000, 90.0000);
  193.     CreateObject(3865, 1095.737427, -1852.780029, 10.791739, 0.0000, 0.0000, 0.0010);
  194.     CreateObject(3865, 1095.500244, -1851.807861, 10.819412, 0.0000, 0.0000, 180.0009);
  195.     CreateObject(3865, 1492.031982, -1871.860596, 10.716759, 0.0000, 0.0000, 180.0009);
  196.     CreateObject(3865, 1492.196777, -1872.732300, 10.769455, 0.0000, 0.0000, 0.0004);
  197.     CreateObject(3865, 1715.294067, -1184.392334, 21.099091, 0.0000, 0.0000, 90.0003);
  198.     CreateObject(3865, 1442.673096, -1160.448242, 21.090176, 0.0000, 0.0000, 180.0006);
  199.     CreateObject(3865, 1442.827393, -1161.364746, 21.117846, 0.0000, 0.0000, 0.0007);
  200.     CreateObject(3865, 1228.913208, -1280.291504, 10.874914, 0.0000, 0.0000, 180.0006);
  201.     CreateObject(3865, 1229.058960, -1281.279053, 10.952602, 0.0000, 0.0000, 0.0004);
  202.     CreateObject(3865, 1062.941406, -1428.453979, 10.770216, 0.0000, 0.0000, 90.0006);
  203.     CreateObject(3865, 1061.890381, -1428.657593, 10.795212, 0.0000, 0.0000, 270.0007);
  204.     return 1;
  205. }
  206.  
  207. public OnGameModeExit()
  208. {
  209.     print("Gamemode finalizado.");
  210.     return 1;
  211. }
  212.  
  213. public OnPlayerRequestClass(playerid, classid)
  214. {
  215.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  216.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  217.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  218.     return 1;
  219. }
  220.  
  221. public OnPlayerConnect(playerid)
  222. {
  223.     new string[64], pName[MAX_PLAYER_NAME];
  224.     GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  225.     format(string,sizeof string,"[x] %s Entrou No Servidor...Seja Bem Vindo :D",pName);
  226.     SendClientMessageToAll(0xFFFFFFAA,string);
  227.     return 1;
  228. }
  229.  
  230. public OnPlayerDisconnect(playerid, reason)
  231. {
  232.     new
  233.         szString[64],
  234.         name[MAX_PLAYER_NAME];
  235.  
  236.     GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  237.  
  238.     switch(reason)
  239.     {
  240.         case 0: format(szString, sizeof szString, "[x] %s Saiu Do servidor. (Tempo esgotado/Crash)", name);
  241.         case 1: format(szString, sizeof szString, "[x] %s Saiu Do servidor. (Saindo)", name);
  242.         case 2: format(szString, sizeof szString, "[x] %s Saiu Do servidor. (Kickado/Banido)", name);
  243.     }
  244.  
  245.     SendClientMessageToAll(0xC4C4C4FF, szString);
  246.     return 1;
  247. }
  248.  
  249. public OnPlayerSpawn(playerid)
  250. {
  251.     new PlayerName[MAX_PLAYER_NAME],
  252.     string[40];
  253.     GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  254.     format(string, sizeof(string), "[x] %s Conectado Com Sucesso.", PlayerName);
  255.     SendClientMessageToAll(0xFFFFFFFF, string);
  256.     return 1;
  257. }
  258.  
  259. public OnPlayerDeath(playerid, killerid, reason)
  260. {
  261.     SendDeathMessage(killerid, playerid, reason); // Mostra a morte na Kill List
  262.  
  263.     if(killerid != INVALID_PLAYER_ID) // Se a causa da morte é um jogador.
  264.     {
  265.         SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
  266.         GivePlayerMoney(killerid, 100);
  267.     }
  268.  
  269.     SetPlayerScore(playerid, GetPlayerScore(playerid)-1);
  270.     GivePlayerMoney(playerid, -100);
  271.  
  272.     return 1;
  273. }
  274.  
  275. public OnVehicleSpawn(vehicleid)
  276. {
  277.     printf("[x] Veículo %i Fez O Respaw!",vehicleid);
  278.     return 1;
  279. }
  280.  
  281. public OnVehicleDeath(vehicleid, killerid)
  282. {
  283.     new string[40];
  284.     format(string, sizeof(string), "[x] Veículo %i Foi Destruido Por ~~> %i.", vehicleid, killerid);
  285.     SendClientMessageToAll(0xFFFFFFFF, string);
  286.     return 1;
  287. }
  288.  
  289. public OnPlayerText(playerid, text[])
  290. {
  291.     new textv2[128], name[MAX_PLAYER_NAME];
  292.     GetPlayerName(playerid, name, sizeof (name));
  293.     format(textv2, sizeof (textv2), "%s(%d): %s", name, playerid, text);
  294.     SendPlayerMessageToAll(playerid, textv2);
  295.     return 0; // Envia apenas a mensagem acima e cancela a mensagem nativa.
  296. }
  297.  
  298. public OnPlayerCommandText(playerid, cmdtext[])
  299. {
  300.     if(!strcmp(cmdtext, "/creditos", true))
  301.     {
  302.     ShowMenuForPlayer(examplemenu, playerid);
  303.         return 1;
  304.     }
  305.     return 0;
  306. }
  307.  
  308. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  309. {
  310.     new string[128];
  311.     format(string, sizeof(string), "[x] Você Entrou Em Um ~~> %i", vehicleid);
  312.     SendClientMessage(playerid, 0xFFFFFFFF, string);
  313.     return 1;
  314. }
  315.  
  316. public OnPlayerExitVehicle(playerid, vehicleid)
  317. {
  318.     new string[35];
  319.     format(string, sizeof(string), "[x] Você Saiu De Um ~~> %i", vehicleid);
  320.     SendClientMessage(playerid, 0xFFFFFFFF, string);
  321.     return 1;
  322. }
  323.  
  324. public OnPlayerStateChange(playerid, newstate, oldstate)
  325. {
  326.     if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) // Player entered a vehicle as a driver
  327.     {
  328.         new vehicleid = GetPlayerVehicleID(playerid);
  329.         AddVehicleComponent(vehicleid, 1010); // Add NOS to the vehicle
  330.     }
  331.     return 1;
  332. }
  333.  
  334. public OnPlayerEnterCheckpoint(playerid)
  335. {
  336.     CreateVehicle(520, 1480.9490,-1766.6674,18.7958, 269.1425, 0, 0, 0, 0, 0, 0);
  337.     DisablePlayerCheckpoint(playerid);
  338.     return 1;
  339. }
  340.  
  341. public OnPlayerLeaveCheckpoint(playerid)
  342. {
  343.     printf("[x] O Player %i Chegou Ao Seu Destino.",playerid);
  344.     return 1;
  345. }
  346.  
  347. public OnRconCommand(cmd[])
  348. {
  349.     printf("[x] Você Digitou ~~> '/rcon %s'!", cmd);
  350.     return 0;
  351. }
  352.  
  353. public OnPlayerRequestSpawn(playerid)
  354. {
  355.     if(!IsPlayerAdmin(playerid))
  356.     {
  357.         SendClientMessage(playerid, -1, "[x] Você  Não Consegui Conecção Com O Servidor.");
  358.         return 0;
  359.     }
  360.     return 1;
  361. }
  362.  
  363. public OnPlayerPickUpPickup(playerid, pickupid)
  364. {
  365.     if(pickupid == pickup_Cash)
  366.     {
  367.         GivePlayerMoney(playerid, 1000);
  368.     }
  369.     else if(pickupid == pickup_Health)
  370.     {
  371.         SetPlayerHealth(playerid, 100);
  372.     }
  373.     return 1;
  374. }
  375.  
  376. public OnPlayerSelectedMenuRow(playerid, row)
  377. {
  378.     if(GetPlayerMenu(playerid) == examplemenu)
  379.     {
  380.         switch(row)
  381.         {
  382.             case 0: print("GAMEMDE ~~> Layky");
  383.             case 1: print("MAPA ~~> Sweet3D");
  384.         }
  385.     }
  386.     return 1;
  387. }
  388.  
  389. public OnPlayerExitedMenu(playerid)
  390. {
  391.     TogglePlayerControllable(playerid,1); // unfreeze the player when they exit a menu
  392.     return 1;
  393. }
  394.  
  395. public OnRconLoginAttempt(ip[], password[], success)
  396. {
  397.     if(!success) //If the password was incorrect
  398.     {
  399.         printf("[ERRO] Você Não É Administrador Para Executar Esse Comando!!!",ip, password);
  400.         new pip[16];
  401.         for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players
  402.         {
  403.             GetPlayerIp(i, pip, sizeof(pip));
  404.             if(!strcmp(ip, pip, true)) //If a player's IP is the IP that failed the login
  405.             {
  406.                 SendClientMessage(i, 0xFFFFFFFF, "Administrador Logado Com Sucesso!!!"); //Send a message
  407.                 Ban(i); //They are now banned.
  408.             }
  409.         }
  410.     }
  411.     return 1;
  412. }
  413.  
  414. public OnPlayerUpdate(playerid)
  415. {
  416.     new iCurWeap = GetPlayerWeapon(playerid); // Return the player's current weapon
  417.     if(iCurWeap != GetPVarInt(playerid, "iCurrentWeapon")) // If he changed weapons since the last update
  418.     {
  419.         // Lets call a callback named OnPlayerChangeWeapon
  420.         OnPlayerChangeWeapon(playerid, GetPVarInt(playerid, "iCurrentWeapon"), iCurWeap);
  421.         SetPVarInt(playerid, "iCurrentWeapon", iCurWeap);//Update the weapon variable
  422.     }
  423.     return 1; // Send this update to other players.
  424. }
  425.  
  426. stock OnPlayerChangeWeapon(playerid, oldweapon, newweapon)
  427. {
  428.     new     s[128],
  429.         oWeapon[24],
  430.         nWeapon[24];
  431.  
  432.     GetWeaponName(oldweapon, oWeapon, sizeof(oWeapon));
  433.     GetWeaponName(newweapon, nWeapon, sizeof(nWeapon));
  434.  
  435.     format(s, sizeof(s), "[x] Você Mudou Da Arma ~~> %s Para ~~> %s!", oWeapon, nWeapon);
  436.  
  437.     SendClientMessage(playerid, 0xFFFFFFFF, s);
  438. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement