Advertisement
Guest User

Untitled

a guest
Mar 14th, 2011
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 80.03 KB | None | 0 0
  1. //=================== [ Includes do Game Mode ] ===========================
  2. #include <a_samp>
  3. #include <dini>
  4. //=================== [ Defines do Game Mode ] ===========================
  5. #define DialogAdmin 1570#
  6. #define senha
  7. #define Adms "Admins/%s.ini"
  8. //=================== [ Static's do Game Mode ] ===========================
  9. static i_ServerSeconds;
  10. static i_ServerMinutes;
  11. static i_ServerHours;
  12. static i_ServerDays;
  13. static i_ServerMonths;
  14. static i_ServerYears;
  15. //=================== [ Defines de Corres ] ===========================
  16. #define COLOR_YELLOW 0xFFFF00AA
  17. #define COLOR_FADE1 0xE6E6E6E6
  18. #define COLOR_FADE2 0xC8C8C8C8
  19. #define COLOR_FADE3 0xAAAAAAAA
  20. #define COLOR_FADE4 0x8C8C8C8C
  21. #define COLOR_FADE5 0x6E6E6E6E
  22. #define COLOR_AZULBB 0xCCCCFFFF
  23. #define COLOR_LARANJA 0xFF830000
  24. #define COLOR_YELLOW 0xFFFF00AA
  25. #define COLOR_YELLOW2 0xF5DEB3AA
  26. #define COLOR_LIGHTRED 0xFF6347AA
  27. #define COLOR_LIGHTBLUE 0x33CCFFAA
  28. #define COLOR_WHITE 0xFFFFFFAA
  29. #define COLOR_GRAD1 0xB4B5B7FF
  30. #define COLOR_GRAD1 0xB4B5B7FF
  31. #define COLOR_GRAD2 0xBFC0C2FF
  32. #define COLOR_GRAD3 0xCBCCCEFF
  33. #define COLOR_GRAD4 0xD8D8D8FF
  34. #define COLOR_GRAD5 0xE3E3E3FF
  35. #define COLOR_GRAD6 0xF0F0F0FF
  36. #define COLOR_GREY 0xAFAFAFAA
  37. #define COLOR_DBLUE 0x2641FEAA
  38. #define ErrorColor 0xFF0000FF
  39. #define GreyColor 0x999999FF
  40. #define BroadCastColor 0xFFFF00FF
  41. #define BroadCastColor2 0x33FF00FF
  42. #define ActionColor 0x9900FFFF
  43. #define BroadCastWarningColor 0xFF0066FF
  44. #define COLOR_GREEN BroadCastColor
  45. #define VERDE 0x33FF00FF
  46. //=================== [ Define dialogs ] ===========================
  47. #define DialogoLogar 33
  48. #define DialogoRegistrar 34
  49. //=================== [ Player Info ] ===========================
  50. enum pInfo
  51. {
  52. pKey[128],
  53. pName[64],
  54. pLevel,
  55. pAdmin,
  56. pCash,
  57. pReg,
  58. pVip,
  59. pSocio,
  60. pMaconha,
  61. pCrack,
  62. pCocaina,
  63. pLider,
  64. pMembro,
  65. pCargo,
  66. pMatou,
  67. pMorreu,
  68. pRespeito,
  69. pOrigem,
  70. pHorasjogadas,
  71. pSkin,
  72. pEmprego,
  73. pTutorial,
  74. pLocal,
  75. pLoged,
  76. };
  77. new PlayerInfo[MAX_PLAYERS][pInfo];
  78. enum pCrime
  79. {
  80. pBplayer[32],
  81. pAccusing[32],
  82. pAccusedof[32],
  83. pVictim[32],
  84. };
  85. new PlayerCrime[MAX_PLAYERS][pCrime];
  86. //=================== [ Arryais (float) ] ===========================
  87. new Float:TelePos[MAX_PLAYERS][6];
  88. //=================== [ Arryais (text) ] ===========================
  89. new Text:forum2[MAX_PLAYERS];
  90. new Text:txtTimeDisp;
  91. new Text:txtDateDisp;
  92. //=================== [ Arryais (news) ] ===========================
  93. new admhide[MAX_PLAYERS];
  94. new year, month,day;
  95. new hour, minute, second;
  96. new gstring[200];
  97. new TempoAdministrador;
  98. new admtrampando[MAX_PLAYERS];
  99. new sendername[MAX_PLAYER_NAME];
  100. new BigEar[MAX_PLAYERS];
  101. new gPlayerLogged[MAX_PLAYERS];
  102. new gPlayerLogTries[MAX_PLAYERS];
  103. new ConsumingMoney[MAX_PLAYERS];
  104. new CurrentMoney[MAX_PLAYERS];
  105. new playermoney[MAX_PLAYERS];
  106. new CreatedCars[100];
  107. new CreatedCar = 0;
  108. new cdivulgar[MAX_PLAYERS];
  109. new PlayerPaintballing[MAX_PLAYERS];
  110. //new Text:Forum[MAX_PLAYERS];
  111. //new MaxPlayers;
  112. new TotalOnline;
  113. new NicksProibidos[][MAX_PLAYER_NAME] ={
  114. "com1","com2","com3","com4","com5","com6","com7","com8","com9","lpt1","lpt2","lpt3","lpt4","lpt5","lpt6","lpt7",
  115. "lpt8","lpt9","clock$","prn","nul","con","CON","con","con1","aux","aux1","prn","PRN","AUX","BPF","BPG","BPL",
  116. "Server_Lixao","crashar_servidor","Crashar_Servidor","com1.aux.com.ipt3"
  117. };
  118. //=================== [ Forwards (usando em publics) ] ===========================
  119. forward MessageAdmins(COLOR,const string[],level);
  120. forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  121. forward OnPlayerCommandText(playerid, cmdtext[]);
  122. forward MensagensRandomicas();
  123. forward Encriptar(string[]);
  124. forward SetPlayerSpawn(playerid);
  125. forward split(const strsrc[], strdest[][], delimiter);
  126. forward SetPlayerUnjail();
  127. forward GameModeExitFunc();
  128. forward ini_GetKey( line[] );
  129. forward ini_GetValue( line[] );
  130. forward OtherTimer();
  131. forward forum(playerid);
  132. forward PlayersOnline();
  133. forward Encrypt(string[]);
  134. forward SetPlayerCriminal(playerid,declare,reason[]);
  135. //=================== [ Main Do Game Mode ] ====================================
  136. main()
  137. {
  138. print("\n\n|--------------------------------|");
  139. print("Projeto Gamemode construido do 0");
  140. print("Data de Ínicio: 6/3/2011");
  141. print("Scripter's:jonas_OwNer");
  142. print("|------------------------------------|\n\n");
  143. }
  144. //=================== [ Stock que verifica o Nome do Player ] ===========================
  145. stock pNome(playerid)
  146. {
  147. new nome[MAX_PLAYER_NAME];
  148. GetPlayerName(playerid, nome, sizeof(nome));
  149. return nome;
  150. }
  151. stock PlayerName(playerid)
  152. {
  153. new Name[MAX_PLAYER_NAME];
  154. GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
  155. return Name;
  156. }
  157. //=================== [ Ongamemodeinit nucleo do GM ] ===========================
  158. public OnGameModeInit()
  159. {
  160. //=================== [ Codigos do Rcon ] ===========================
  161. SetGameModeText("BG RP v0.1");
  162. SendRconCommand("hostname ..:: |>> [RPG] Brasil [4]ever v0.1 <<| ::..");
  163. //=================== [ Outros Codigos ] ===========================
  164. UsePlayerPedAnims();
  165. DisableInteriorEnterExits();
  166. //=================== [ Veiculos ] ===========================
  167. AddPlayerClass(29,-1549.1127,696.8275,7.1797,324.8698,0,0,0,0,0,0);
  168. AddStaticVehicle(474,-1565.0460,635.6127,6.7661,181.9424,0,0);//Hermes
  169. AddStaticVehicle(401,-1522.8557,905.6686,6.7661,359.2625,0,0);//Bravura
  170. AddStaticVehicle(555,-1695.8822,834.6603,24.4614,91.0338,0,0);//Windsor
  171. AddStaticVehicle(415,-1553.5587,685.4747,6.8019,5.1831,0,0); // fod
  172. AddStaticVehicle(415,-1553.1975,696.6088,6.8019,356.2798,0,0); // fod
  173. AddStaticVehicle(415,-1538.8088,718.9227,6.8014,356.7770,0,0);
  174. //=================== [ Objetos ] ===========================
  175. CreateObject(4639, -2590.287598, 1358.478638, 7.743454, 0.0000, 0.0000, 41.2530);
  176. CreateObject(989, -2589.342285, 1358.919189, 10.665578, 0.0000, 0.0000, 329.9197);
  177. CreateObject(5822, -2656.021240, 1350.445801, 10.939837, 0.0000, 0.0000, 184.6749);
  178. CreateObject(8210, -2620.526367, 1329.473877, 9.287321, 0.0000, 0.0000, 43.8313);
  179. CreateObject(3749, -2593.792480, 1355.989624, 11.897477, 0.0000, 0.0000, 42.1124);
  180. CreateObject(987, -2659.707031, 1305.786987, 6.000000, 0.0000, 0.0000, 8.5944);
  181. CreateObject(987, -2649.254883, 1307.261475, 6.158150, 0.0000, 0.0000, 24.0642);
  182. CreateObject(987, -2587.155518, 1362.786133, 6.191296, 0.0000, 0.0000, 81.6464);
  183. CreateObject(987, -2585.611816, 1373.678955, 6.125481, 0.0000, 0.0000, 87.6625);
  184. CreateObject(8210, -2605.264160, 1401.605591, 9.218561, 0.0000, 0.0000, 317.8876);
  185. CreateObject(8210, -2684.917480, 1378.942993, 9.049091, 0.0000, 0.0000, 88.5219);
  186. CreateObject(8210, -1719.526611, 96.281364, 7.710401, 0.0000, 0.0000, 48.1284);
  187. CreateObject(8210, -1740.554077, 60.530273, 7.805194, 0.0000, 0.0000, 269.7592);
  188. CreateObject(8210, -1740.798218, -3.488058, 7.955191, 0.0000, 0.0000, 91.1002);
  189. CreateObject(8210, -1690.831421, -82.406937, 5.655715, 0.0000, 0.0000, 312.7310);
  190. CreateObject(8210, -1664.006104, 117.819084, 5.655715, 0.0000, 0.0000, 45.5501);
  191. CreateObject(8210, -1626.802734, 155.407089, 5.541300, 0.0000, 0.0000, 44.6907);
  192. CreateObject(8210, -1591.893921, 151.627151, 6.197569, 0.0000, 0.0000, 313.5905);
  193. CreateObject(8210, -1561.523438, 120.049675, 5.655715, 0.0000, 0.0000, 315.3093);
  194. CreateObject(8210, -1725.471924, -40.147419, 5.655715, 0.0000, 0.0000, 303.2772);
  195. CreateObject(3279, -1542.472046, 477.722198, 6.263100, 0.0000, 0.0000, 268.2809);
  196. CreateObject(3279, -1565.602295, 442.006805, 6.255300, 0.0000, 0.0000, 326.2528);
  197. CreateObject(3279, -1387.468750, 479.509308, 6.263100, 0.0000, 0.0000, 0.0000);
  198. CreateObject(3279, -1236.652344, 479.435913, 6.263100, 0.0000, 0.0000, 0.0000);
  199. CreateObject(3279, -1236.688843, 438.265289, 6.106500, 0.0000, 0.0000, 359.1406);
  200. CreateObject(3279, -1595.786255, 402.327698, 6.263100, 0.0000, 0.0000, 320.2367);
  201. CreateObject(3279, -1725.053467, 268.537598, 6.263100, 0.0000, 0.0000, 327.9717);
  202. CreateObject(3279, -1628.375732, 367.598999, 6.263100, 0.0000, 0.0000, 314.9999);
  203. CreateObject(3279, -1663.824463, 334.888092, 6.263100, 0.0000, 0.0000, 311.5621);
  204. CreateObject(3279, -1696.161255, 305.195404, 6.263100, 0.0000, 0.0000, 317.5782);
  205. CreateObject(3279, -1493.663452, 479.570404, 6.263100, 0.0000, 0.0000, 0.0000);
  206. CreateObject(3279, -1440.654541, 479.534302, 6.263100, 0.0000, 0.0000, 0.0000);
  207. CreateObject(3279, -1326.381348, 479.501099, 6.256500, 0.0000, 0.0000, 0.0000);
  208. CreateObject(3279, -1325.588745, 438.266388, 6.188100, 0.0000, 0.0000, 0.0000);
  209. CreateObject(3279, -1657.192261, 262.435089, 6.113100, 0.0000, 0.0000, 89.9994);
  210. CreateObject(3279, -1601.592041, 262.395386, 6.138100, 0.0000, 0.0000, 89.9994);
  211. CreateObject(3279, -1546.663696, 262.405212, 6.088100, 0.0000, 0.0000, 89.9994);
  212. CreateObject(3279, -1495.587280, 262.413513, 6.141300, 0.0000, 0.0000, 89.9994);
  213. CreateObject(3279, -1447.094849, 262.390808, 6.138100, 0.0000, 0.0000, 179.9996);
  214. CreateObject(3279, -1435.998779, 294.222290, 6.131500, 0.0000, 0.0000, 89.9994);
  215. CreateObject(3279, -1398.171997, 294.195099, 6.156500, 0.0000, 0.0000, 89.9994);
  216. CreateObject(3279, -1361.093750, 294.197113, 6.163100, 0.0000, 0.0000, 89.9994);
  217. CreateObject(3279, -1330.072876, 312.873810, 6.188100, 0.0000, 0.0000, 179.9996);
  218. CreateObject(3279, -1329.697144, 372.826111, 6.113100, 0.0000, 0.0000, 179.9996);
  219. CreateObject(3279, -1329.718384, 408.504303, 6.138100, 0.0000, 0.0000, 179.9996);
  220. CreateObject(3268, -1539.929077, 370.517395, 6.187500, 0.0000, 0.0000, 269.9998);
  221. CreateObject(3268, -1573.855835, 370.495087, 6.187500, 0.0000, 0.0000, 269.9998);
  222. CreateObject(3749, -1527.275879, 481.966400, 12.038100, 0.0000, 0.0000, 0.0000);
  223. CreateObject(987, -1497.820557, 481.839996, 6.187500, 0.0000, 0.0000, 179.9996);
  224. CreateObject(987, -1479.790161, 481.806091, 6.187500, 0.0000, 0.0000, 179.9996);
  225. CreateObject(987, -1467.789551, 481.816315, 6.187500, 0.0000, 0.0000, 179.9996);
  226. CreateObject(987, -1455.862793, 481.824097, 6.187500, 0.0000, 0.0000, 179.9996);
  227. CreateObject(987, -1444.867188, 481.826599, 6.187500, 0.0000, 0.0000, 179.9996);
  228. CreateObject(987, -1426.639526, 481.715302, 6.187500, 0.0000, 0.0000, 179.9996);
  229. CreateObject(987, -1414.680054, 481.707306, 6.187500, 0.0000, 0.0000, 179.9996);
  230. CreateObject(987, -1402.738037, 481.709106, 6.187500, 0.0000, 0.0000, 179.9996);
  231. CreateObject(987, -1391.683350, 481.695801, 6.187500, 0.0000, 0.0000, 179.9996);
  232. CreateObject(987, -1373.802124, 481.743988, 6.187500, 0.0000, 0.0000, 179.9996);
  233. CreateObject(987, -1361.842041, 481.737793, 6.187500, 0.0000, 0.0000, 179.9996);
  234. CreateObject(987, -1349.916870, 481.722107, 6.187500, 0.0000, 0.0000, 179.9996);
  235. CreateObject(987, -1341.278198, 481.738800, 6.187500, 0.0000, 0.0000, 179.9996);
  236. CreateObject(987, -1312.563843, 481.755310, 6.187500, 0.0000, 0.0000, 179.9996);
  237. CreateObject(987, -1300.578979, 481.756989, 6.187500, 0.0000, 0.0000, 179.9996);
  238. CreateObject(987, -1288.642456, 481.746002, 6.187500, 0.0000, 0.0000, 179.9996);
  239. CreateObject(987, -1276.755859, 481.747986, 6.187500, 0.0000, 0.0000, 179.9996);
  240. CreateObject(987, -1264.823242, 481.743805, 6.187500, 0.0000, 0.0000, 179.9996);
  241. CreateObject(987, -1252.875854, 481.733704, 6.187500, 0.0000, 0.0000, 179.9996);
  242. CreateObject(987, -1240.915771, 481.740601, 6.187500, 0.0000, 0.0000, 179.9996);
  243. CreateObject(987, -1733.655396, 263.317993, 6.187500, 0.0000, 0.0000, 345.3896);
  244. CreateObject(987, -1722.126831, 260.311096, 6.187500, 0.0000, 0.0000, 0.0000);
  245. CreateObject(987, -1710.155762, 260.301788, 6.187500, 0.0000, 0.0000, 0.0000);
  246. CreateObject(987, -1698.192139, 260.304993, 6.187500, 0.0000, 0.0000, 0.0000);
  247. CreateObject(987, -1686.186646, 260.299988, 6.187500, 0.0000, 0.0000, 0.0000);
  248. CreateObject(987, -1674.234741, 260.295898, 6.187500, 0.0000, 0.0000, 0.0000);
  249. CreateObject(987, -1652.468384, 260.139099, 6.187500, 0.0000, 0.0000, 0.0000);
  250. CreateObject(987, -1640.496460, 260.136688, 6.187500, 0.0000, 0.0000, 0.0000);
  251. CreateObject(987, -1628.503540, 260.139801, 6.187500, 0.0000, 0.0000, 0.0000);
  252. CreateObject(987, -1617.659058, 260.116791, 6.187500, 0.0000, 0.0000, 0.0000);
  253. CreateObject(987, -1596.919189, 260.155487, 6.187500, 0.0000, 0.0000, 0.0000);
  254. CreateObject(987, -1584.978394, 260.171387, 6.187500, 0.0000, 0.0000, 0.0000);
  255. CreateObject(987, -1573.010132, 260.173798, 6.187500, 0.0000, 0.0000, 0.0000);
  256. CreateObject(987, -1562.735474, 260.174011, 6.187500, 0.0000, 0.0000, 0.0000);
  257. CreateObject(987, -1541.996338, 260.127411, 6.187500, 0.0000, 0.0000, 0.0000);
  258. CreateObject(987, -1530.056763, 260.129303, 6.187500, 0.0000, 0.0000, 0.0000);
  259. CreateObject(987, -1518.126831, 260.123596, 6.187500, 0.0000, 0.0000, 0.0000);
  260. CreateObject(987, -1511.654541, 260.115204, 6.187500, 0.0000, 0.0000, 0.0000);
  261. CreateObject(987, -1490.919556, 260.124207, 6.187500, 0.0000, 0.0000, 0.0000);
  262. CreateObject(987, -1478.941284, 260.127686, 6.187500, 0.0000, 0.0000, 0.0000);
  263. CreateObject(987, -1466.987671, 260.144287, 6.187500, 0.0000, 0.0000, 0.0000);
  264. CreateObject(987, -1458.789063, 260.139313, 6.187500, 0.0000, 0.0000, 0.0000);
  265. CreateObject(987, -1444.838379, 267.050201, 6.187500, 0.0000, 0.0000, 89.9994);
  266. CreateObject(987, -1444.846436, 278.988312, 6.187500, 0.0000, 0.0000, 89.9994);
  267. CreateObject(987, -1431.327759, 291.906403, 6.187500, 0.0000, 0.0000, 0.0000);
  268. CreateObject(987, -1419.372437, 291.901398, 6.187500, 0.0000, 0.0000, 0.0000);
  269. CreateObject(987, -1414.301758, 291.896912, 6.187500, 0.0000, 0.0000, 0.0000);
  270. CreateObject(987, -1393.502441, 291.907288, 6.187500, 0.0000, 0.0000, 0.0000);
  271. CreateObject(987, -1381.528442, 291.897797, 6.187500, 0.0000, 0.0000, 0.0000);
  272. CreateObject(987, -1377.153564, 291.906097, 6.187500, 0.0000, 0.0000, 0.0000);
  273. CreateObject(987, -1356.418945, 291.931702, 6.187500, 0.0000, 0.0000, 0.0000);
  274. CreateObject(987, -1353.520752, 291.919403, 6.187500, 0.0000, 0.0000, 0.0000);
  275. CreateObject(987, -1341.673584, 291.902191, 6.187500, 0.0000, 0.0000, 44.9993);
  276. CreateObject(987, -1336.280151, 297.297302, 6.187500, 0.0000, 0.0000, 44.9993);
  277. CreateObject(987, -1327.812744, 317.541504, 6.187500, 0.0000, 0.0000, 89.9994);
  278. CreateObject(987, -1327.822876, 329.503296, 6.187500, 0.0000, 0.0000, 89.9994);
  279. CreateObject(1662, 982.332092, 754.719971, 12.064900, 0.0000, 0.0000, 212.8931);
  280. CreateObject(1662, 397.031403, 1021.231018, 29.640900, 0.0000, 0.0000, 213.7525);
  281. CreateObject(1662, 416.230713, 2700.482422, 61.952499, 0.0000, 0.0000, 191.2525);
  282. CreateObject(993, -1701.797363, 694.623108, 25.504400, 0.0000, 0.0000, 269.9998);
  283. CreateObject(993, -1701.798584, 704.617920, 25.504400, 0.0000, 0.0000, 269.9998);
  284. CreateObject(993, -1696.602173, 718.333130, 25.504400, 0.0000, 0.0000, 0.0000);
  285. CreateObject(993, -1701.790527, 713.657104, 25.504400, 0.0000, 0.0000, 269.9998);
  286. CreateObject(968, -1572.186279, 658.869507, 6.712300, 0.0000, 0.0000, 269.9998);
  287. CreateObject(983, -1432.054199, 291.770203, 5.578700, 90.2400, 1.7180, 268.2809);
  288. CreateObject(983, -1444.617554, 291.357697, 9.046000, 269.7591, 279.2130, 97.2530);
  289. CreateObject(987, -1452.079956, 292.217285, 6.037400, 0.0000, 0.0000, 0.0000);
  290. CreateObject(983, -1439.472656, 292.035797, 8.071000, 90.2400, 87.6617, 2.5775);
  291. CreateObject(983, -1438.703857, 292.062805, 8.071000, 90.2400, 91.9589, 359.1406);
  292. CreateObject(983, -1401.913574, 291.725006, 8.096000, 91.0994, 90.2400, 0.0000);
  293. CreateObject(983, -1400.844971, 291.752014, 8.096000, 91.0994, 89.3806, 0.0000);
  294. CreateObject(983, -1444.116455, 481.940887, 8.196000, 90.2400, 90.2400, 0.0000);
  295. CreateObject(983, -1442.999390, 481.915100, 8.171000, 269.7591, 86.8023, 355.7028);
  296. CreateObject(983, -1497.074585, 481.971008, 8.246000, 89.3806, 88.5211, 0.0000);
  297. CreateObject(983, -1522.110840, 482.095886, 10.285600, 89.3806, 0.0000, 269.9998);
  298. CreateObject(983, -1523.385498, 482.126801, 10.308300, 89.3806, 91.0994, 358.2811);
  299. CreateObject(12839, -2551.482910, 953.723511, 70.673897, 0.0000, 0.0000, 0.0000);
  300. CreateObject(1270, -1571.645996, 645.897156, 7.034597, 0.0000, 0.0000, 67.5000);
  301. CreateObject(987, -1571.989624, 676.162170, 9.712734, 0.0000, 0.0000, 90.0000);
  302. CreateObject(987, -1571.992554, 666.053223, 9.712734, 0.0000, 0.0000, 90.0000);
  303. CreateObject(987, -1583.579468, 646.173279, 9.712738, 0.0000, 0.0000, 0.0000);
  304. CreateObject(987, -1595.432251, 646.101257, 9.712738, 0.0000, 0.0000, 0.0000);
  305. CreateObject(987, -1607.335205, 646.172119, 9.712738, 0.0000, 0.0000, 0.0000);
  306. CreateObject(987, -1619.202881, 646.241760, 9.712738, 0.0000, 0.0000, 0.0000);
  307. CreateObject(987, -1631.079224, 646.233826, 9.712738, 0.0000, 0.0000, 0.0000);
  308. CreateObject(987, -1641.496338, 646.087402, 9.712738, 0.0000, 0.0000, 0.0000);
  309. CreateObject(987, -1641.367188, 657.927368, 9.712738, 0.0000, 0.0000, 270.0000);
  310. CreateObject(987, -1641.362305, 669.784546, 9.712738, 0.0000, 0.0000, 270.0000);
  311. CreateObject(987, -1641.441650, 676.441467, 9.712738, 0.0000, 0.0000, 270.0000);
  312. CreateObject(3550, -1571.712158, 648.813904, 10.878860, 0.0000, 0.0000, 0.0000);
  313. CreateObject(3475, -1572.007690, 649.137268, 12.088913, 0.0000, 0.0000, 180.0000);
  314. CreateObject(3475, -1572.112549, 653.538208, 11.987762, 0.0000, 0.0000, 0.0000);
  315. CreateObject(3550, -1571.587036, 653.584167, 10.910962, 0.0000, 0.0000, 0.0000);
  316. //=================== [ Veiculos ] ===========================
  317. AddPlayerClass(249,-2500.6243,-705.0093,279.7344,5.5812,0,0,0,0,0,0); // paisagen
  318. AddStaticVehicle(487,2184.7444,-989.7562,72.5752,167.8220,54,29); // heli
  319. AddStaticVehicle(494,2174.6384,-995.1772,62.8670,168.8737,36,13); // carro
  320. AddStaticVehicle(409,-2643.9001,1379.0566,6.9614,89.9158,0,0); // limoo.O
  321. AddStaticVehicle(409,-2644.0823,1373.4092,6.9599,89.8031,0,0); // limoo.O
  322. AddStaticVehicle(409,-2644.2107,1368.2054,6.9605,89.9603,0,0); // limoo.O
  323. AddStaticVehicle(520,-2670.8213,1345.9985,17.7161,270.2014,0,0); // hydra o certooooooooooooo
  324. AddStaticVehicle(432,-2643.5322,1337.1980,7.1776,270.8201,43,0); // rinobase
  325. AddStaticVehicle(444,-2645.0742,1344.8915,7.5358,270.4459,32,53); // monsterbase
  326. AddStaticVehicle(481,-2685.2893,1341.1033,16.5163,271.2230,46,46); // bmxbase
  327. AddStaticVehicle(481,-2686.2542,1351.2836,16.5131,264.1203,46,46); // bmxbase
  328. AddStaticVehicle(522,-2677.5386,1332.7638,16.5630,170.5911,6,25); // nrgbase
  329. AddStaticVehicle(522,-2673.6870,1332.6533,16.5548,177.5616,6,25); // nrgbase
  330. AddStaticVehicle(522,-2670.7629,1332.7754,16.5636,176.6977,6,25); // nrgbase
  331. AddStaticVehicle(522,-2668.2419,1332.7229,16.5653,178.3863,6,25); // nrgbase
  332. AddStaticVehicle(420,-2616.5950,-96.6816,4.1157,90.9115,6,1); // taxi kbabaum
  333. AddStaticVehicle(428,-2037.5372,137.5136,28.9600,90.1398,0,0); // carroseguroetira
  334. AddStaticVehicle(428,-1587.8529,652.0657,7.3092,359.2706,0,0); // carroseguroetira
  335. AddStaticVehicle(428,-1599.5914,652.1916,7.3105,0.4959,0,0); // carroseguroetira
  336. AddStaticVehicle(428,-1777.4722,957.6854,25.0058,89.6173,0,0); // carrosegurobanco
  337. AddStaticVehicle(438,-1995.0477,147.8887,27.6074,1.3322,0,0); // taxicolokkkkkkkkk
  338. AddStaticVehicle(413,-1988.3452,275.4367,35.2554,87.6447,88,1); // carrin:D
  339. AddStaticVehicle(475,-1988.2168,271.5232,34.9761,87.5821,2,39); // sabre
  340. AddStaticVehicle(475,-1991.4525,241.5675,34.9726,86.1969,2,39); // sabre
  341. AddStaticVehicle(475,-1993.8685,215.6526,27.4929,90.9924,2,39); // sabre
  342. AddStaticVehicle(449,-1943.7792,146.9424,26.1223,358.2097,1,74); // bondim:D
  343. AddStaticVehicle(481,-1998.2927,167.0615,27.1208,86.6163,3,3); // bmx
  344. AddStaticVehicle(481,-1998.0479,169.0941,27.2037,91.0608,6,6); // bmx
  345. AddStaticVehicle(522,-1997.9418,171.3165,27.2387,90.6109,3,3); // nrg
  346. AddStaticVehicle(522,-1997.6749,174.3806,27.2724,89.2741,3,8); // nrg
  347. AddStaticVehicle(596,-1588.2479,748.0393,-5.4903,359.9998,0,1); // carcop
  348. AddStaticVehicle(523,-1584.0217,749.4910,-5.6655,180.9966,0,0); // carcop
  349. AddStaticVehicle(523,-1579.8461,749.0732,-5.6571,181.8757,0,0); // car cop
  350. AddStaticVehicle(596,-1574.2565,742.4983,-5.5206,88.9996,0,1); // carcop
  351. AddStaticVehicle(523,-1573.5985,734.6492,-5.6689,90.0025,0,0); // carcop
  352. AddStaticVehicle(497,-1679.5951,706.1432,30.7954,90.5114,0,1); // helicop
  353. AddStaticVehicle(437,-1988.5007,162.0946,27.6508,0.0000,1,1); // busao
  354. AddStaticVehicle(437,-1988.3359,131.3477,27.6943,0.0000,1,1); // busao
  355. AddStaticVehicle(410,-2084.6643,-83.5934,34.7976,359.9729,5,5); // carroescola
  356. AddStaticVehicle(410,-2081.2825,-83.4888,34.8086,4.0901,6,6); // carroescola
  357. AddStaticVehicle(461,-2022.3977,-124.3720,34.7832,179.9717,6,6); // motoescola
  358. AddStaticVehicle(487,-2032.2460,-155.6209,35.4656,0.0060,1,6); // heliesc
  359. AddStaticVehicle(475,-2088.8313,-156.0123,35.0983,359.9812,6,6); // carroesc
  360. AddStaticVehicle(475,-2092.4036,-145.2734,35.0986,0.0400,6,6); // carroesc
  361. AddStaticVehicle(475,-2092.3503,-132.4997,35.0966,0.4676,6,6); // carroesc
  362. AddStaticVehicle(425,-2625.0493,1376.3342,7.6928,178.5375,43,0); // hunter base
  363. AddStaticVehicle(487,-1829.1174,1300.2819,59.8817,204.0558,54,29); // mavmoto
  364. AddStaticVehicle(453,-1556.1755,1260.8345,-0.5926,234.7669,69,69); // barco pesca
  365. AddStaticVehicle(453,-1565.1833,1259.7523,-0.5379,227.8785,69,69); // barcopesca
  366. AddStaticVehicle(453,-1578.2352,1260.0367,-0.0551,228.0564,69,69); // barco pesca
  367. AddStaticVehicle(493,-1474.4727,687.5856,-0.2037,268.8839,6,6); // barco escola
  368. AddStaticVehicle(453,-1473.3943,703.5046,-0.4342,272.7462,6,6); // barco escola
  369. AddStaticVehicle(420,-1703.0906,1003.9794,17.3778,91.1514,6,1); // taxi
  370. AddStaticVehicle(420,-1687.7856,999.6074,17.3444,270.7191,6,1); // taxi
  371. AddStaticVehicle(409,-1816.4678,1311.4034,50.2892,275.5558,1,1); // limomoto
  372. AddStaticVehicle(409,-1829.7208,1289.6337,50.2512,110.5457,1,1); // lomomoto
  373. AddStaticVehicle(433,-1307.1633,456.9036,7.5909,89.9428,0,0); // caminhao
  374. AddStaticVehicle(433,-1306.5189,463.9994,7.6436,89.6543,0,0); // caminhao
  375. AddStaticVehicle(433,-1306.5568,460.6202,7.6451,90.4466,0,0); // caminhao
  376. AddStaticVehicle(433,-1309.4952,444.8434,7.6132,55.0000,0,0); // caminhao
  377. AddStaticVehicle(433,-1307.2222,447.7583,7.5937,54.9896,0,0); // caminhao
  378. AddStaticVehicle(470,-1241.5155,445.2168,7.1593,326.9936,44,44); // carro
  379. AddStaticVehicle(470,-1232.7764,451.6962,7.1680,89.9980,0,0); // carro
  380. AddStaticVehicle(425,-1403.2001,465.2320,7.7642,181.0000,0,0); // hunter
  381. AddStaticVehicle(425,308.9300,1990.3328,18.2170,180.0703,0,0); // hunter
  382. AddStaticVehicle(425,309.5915,2056.1018,18.1976,180.0104,0,0); // hunter
  383. AddStaticVehicle(420,-1760.7411,947.5501,24.5889,88.3836,6,1); // taxi
  384. AddStaticVehicle(409,-1748.7618,947.4760,24.6092,90.4037,1,1); // limo
  385. AddStaticVehicle(411,-1766.7913,938.6655,24.5412,271.1453,106,1); // infernus
  386. AddStaticVehicle(522,-1736.4423,960.4474,24.4462,182.1301,6,25); // nrg
  387. AddStaticVehicle(522,-1739.7595,960.3264,24.4543,177.5538,6,25); // nrg
  388. AddStaticVehicle(522,-1745.4110,941.4691,24.4626,221.9273,6,25); // nrg
  389. AddStaticVehicle(522,-1750.4796,941.8193,24.4623,221.0215,6,25); // nrg
  390. AddStaticVehicle(522,-1754.1982,941.4381,24.4310,216.0489,6,25); // nrg
  391. AddStaticVehicle(601,-1634.5223,651.0744,6.9463,1.2162,1,1); // carroswat
  392. AddStaticVehicle(601,-1628.3643,651.0035,6.9464,0.3379,1,1); // carroswat
  393. AddStaticVehicle(528,-1622.5157,651.2703,7.2311,0.0320,0,0); // carros
  394. AddStaticVehicle(528,-1616.5774,651.2204,7.2304,359.9736,0,0); // carros
  395. AddStaticVehicle(449,-2006.5000,149.9260,27.9973,0.0000,1,74); // Trem
  396. AddStaticVehicle(528,-1610.4725,651.7099,7.2303,359.7540,0,0); // carros
  397. AddStaticVehicle(598,-1612.0612,673.4278,6.9086,180.2092,0,1); // cop
  398. AddStaticVehicle(598,-1605.8036,673.6382,6.9079,179.0647,0,1); // cop
  399. AddStaticVehicle(597,-1600.1277,673.6027,6.9104,178.9945,0,1); // cop
  400. AddStaticVehicle(597,-1594.0265,673.7087,6.9101,179.2024,0,1); // cop
  401. AddStaticVehicle(598,-1588.1838,673.4647,6.9087,179.4776,0,1); // cop
  402. AddStaticVehicle(522,-2724.4651,-281.1224,6.6027,179.2122,6,25); // nrg
  403. AddStaticVehicle(522,-2726.9248,-282.1533,6.6107,178.2187,6,25); // nrg
  404. AddStaticVehicle(522,-2729.4827,-281.4014,6.6029,177.8034,6,25); // nrg
  405. AddStaticVehicle(409,-2724.8152,-312.3762,6.9099,135.3034,1,1); // limo
  406. AddStaticVehicle(415,-2736.0916,-295.1672,6.7854,48.1586,25,1); // cheat
  407. AddStaticVehicle(415,-2739.5640,-298.3662,6.7794,47.0555,25,1); // cheat
  408. AddStaticVehicle(495,-2314.3425,-1666.3127,483.3794,197.9262,116,115); // rally
  409. AddStaticVehicle(495,-2307.9377,-1663.0397,484.0178,203.1399,116,115); // rally
  410. AddStaticVehicle(495,-2303.5154,-1656.6115,483.8733,203.7143,116,115); // rally
  411. AddStaticVehicle(495,-2295.4548,-1655.3750,483.5567,195.1631,116,115); // rally
  412. AddStaticVehicle(520,-1665.9806,1211.0782,33.6340,262.4589,0,0); // hydra carpalace
  413. AddStaticVehicle(449,-1943.8337,145.1943,26.1223,358.2105,1,74); //
  414. AddStaticVehicle(538,-1628.8099,44.0939,5.1400,135.1463,1,1); //
  415. AddStaticVehicle(416,-2543.9534,586.9307,14.6012,270.1252,1,3); // ambulancia
  416. AddStaticVehicle(416,-2543.5486,592.9233,14.6027,269.7417,1,3); // ambulancia
  417. AddStaticVehicle(416,-2543.3372,599.2736,14.6024,270.1265,1,3); // ambulancia
  418. AddStaticVehicle(416,-2543.5833,604.8004,14.6023,269.4493,1,3); // ambulancia
  419. AddStaticVehicle(416,-2618.9651,608.2448,14.6012,180.0322,1,3); // ambulancia
  420. AddStaticVehicle(475,-2675.1841,629.7386,14.2575,267.6788,33,0); // carrin
  421. AddStaticVehicle(475,-2711.7742,573.0886,14.3073,91.4278,33,0); // carrin
  422. AddStaticVehicle(431,-2244.8237,550.4213,35.2771,270.5651,75,59); // busao
  423. AddStaticVehicle(420,-1976.5347,172.4142,27.4680,92.4543,6,1); // taxi
  424. AddStaticVehicle(420,-1976.7189,177.3136,27.4662,91.2223,6,1); // taxi
  425. AddStaticVehicle(420,-1976.9609,183.9905,27.4664,91.8704,6,1); // taxi
  426. AddStaticVehicle(525,-2034.4309,170.1951,28.7173,270.4796,7,1); // carrofik
  427. AddStaticVehicle(443,-2039.9423,131.8226,29.4691,90.9714,20,1); // pakercerto
  428. AddStaticVehicle(524,-2032.5421,178.7775,29.7703,89.5988,61,27); // cimento
  429. AddStaticVehicle(515,-1974.4406,104.9566,28.7055,88.8895,24,77); // caminhao
  430. AddStaticVehicle(584,-1965.4539,97.5674,28.8349,90.5119,1,1); // carga
  431. AddStaticVehicle(450,-1964.6888,92.2853,28.3127,88.9350,1,1); // carga
  432. AddStaticVehicle(515,-1974.4156,84.5510,28.7057,85.6849,63,78); // caminhao
  433. //=================== [ Pickup's ] ===========================
  434. AddStaticPickup(1238,1,-1757.9701,960.9874,24.8828);
  435. AddStaticPickup(1274,1,-1746.1521,962.3468,24.8906);//cifrao hotel sf
  436. AddStaticPickup(1274,1,-2446.8564,522.0898,30.2816);//cifrao sa federal mint
  437. AddStaticPickup(1274,1,1721.8188,-1718.9016,13.5341);//cifrao atrium
  438. AddStaticPickup(1274,1,398.1302,-1805.6890,7.8380);//cifrao praia
  439. AddStaticPickup(1274,1,1022.5526,-1122.4902,23.8712);//cifrao teatro chines
  440. AddStaticPickup(1274,1,1958.0383,1343.7804,15.3746);
  441. AddStaticPickup(1274,1,2437.0090,1677.0514,10.8203);
  442. AddStaticPickup(355,2,1420.5509,2880.0674,10.8203); // ak-casa
  443. AddStaticPickup(355,2,1420.4403,2878.8823,10.8203); // ak-casa 2
  444. AddStaticPickup(355,2,1420.3854,2878.2087,10.8203); // ak-casa 3
  445. AddStaticPickup(355,2,1420.3193,2877.3989,10.8203); // ak-casa 4
  446. AddStaticPickup(355,2,1420.2551,2876.6152,10.8203); // ak-casa 5
  447. AddStaticPickup(323,2,1420.5574,2871.9189,10.8203); // dildo-casa
  448. AddStaticPickup(324,2,1420.5702,2871.1716,10.8203); // dildo-casa 2
  449. AddStaticPickup(372,2,1420.5946,2869.7476,10.8203); // tec9-casa
  450. AddStaticPickup(372,2,1420.6025,2869.2869,10.8203); // tec9-casa 2
  451. AddStaticPickup(372,2,1420.6144,2868.5874,10.8203); // tec9-casa 3
  452. AddStaticPickup(372,2,1420.6254,2867.9458,10.8203); // tec9 casa 4
  453. AddStaticPickup(365,2,1421.0168,2864.0776,10.8203); // motoserra-casa
  454. AddStaticPickup(341,2,1420.9180,2863.3215,10.8203); // motosserra casa
  455. AddStaticPickup(349,2,1423.6455,2861.7571,10.8203); // 12-casa
  456. AddStaticPickup(349,2,1422.6477,2861.6487,10.8203); // 12-casa 2
  457. AddStaticPickup(349,2,1420.4092,2861.1465,10.8203); // 12-casa 3
  458. AddStaticPickup(349,2,1421.7029,2859.5039,10.8203); // 12-casa 4
  459. AddStaticPickup(349,2,1424.0735,2859.1077,10.8203); // 12-casa 6
  460. AddStaticPickup(351,2,1430.5070,2880.6848,10.8203); // combat-casa
  461. AddStaticPickup(351,2,1429.6902,2879.9668,10.8203); // combat-casa 2
  462. AddStaticPickup(351,2,1427.5771,2881.7117,10.8203); // combat-casa 3
  463. AddStaticPickup(351,2,1427.4128,2877.2107,10.8203); // combat-casa 4
  464. AddStaticPickup(351,2,1430.7842,2876.5879,10.8203); // combat-casa 5
  465. txtTimeDisp = TextDrawCreate(632.0,25.0,"--:--:--");
  466. TextDrawUseBox(txtTimeDisp, 0);
  467. TextDrawFont(txtTimeDisp, 3);
  468. TextDrawSetShadow(txtTimeDisp,0);
  469. TextDrawSetOutline(txtTimeDisp,2);
  470. TextDrawBackgroundColor(txtTimeDisp,0x000000FF);
  471. TextDrawColor(txtTimeDisp,COLOR_WHITE);
  472. TextDrawAlignment(txtTimeDisp,3);
  473. TextDrawLetterSize(txtTimeDisp,0.5,1.5);
  474.  
  475. txtDateDisp = TextDrawCreate(620.0,5.0,"00/00/0000");
  476. TextDrawUseBox(txtDateDisp, 0);
  477. TextDrawFont(txtDateDisp, 3);
  478. TextDrawSetShadow(txtDateDisp,0);
  479. TextDrawSetOutline(txtDateDisp,2);
  480. TextDrawBackgroundColor(txtDateDisp,0x000000FF);
  481. TextDrawColor(txtDateDisp,COLOR_WHITE);
  482. TextDrawAlignment(txtDateDisp,3);
  483. TextDrawLetterSize(txtDateDisp,0.5,1.5);
  484.  
  485. ProcessGameTime();
  486. SetTimer("ProcessGameTime", 1000, 1);
  487. for(new i=0; i<MAX_PLAYERS; i++)
  488. {
  489. forum2[i] = TextDrawCreate(1.000000,437.000000," ~b~||~g~Bem Vindo ao ~r~[RPG] Brasil [4]ever~b~||");
  490. TextDrawUseBox(forum2[i],1);
  491. TextDrawBoxColor(forum2[i],0x00000066);
  492. TextDrawTextSize(forum2[i],641.000000,0.000000);
  493. TextDrawAlignment(forum2[i],0);
  494. TextDrawBackgroundColor(forum2[i],0x000000ff);
  495. TextDrawFont(forum2[i],3);
  496. TextDrawLetterSize(forum2[i],0.399999,1.100000);
  497. TextDrawColor(forum2[i],0xffffffff);
  498. TextDrawSetOutline(forum2[i],1);
  499. TextDrawSetProportional(forum2[i],1);
  500. TextDrawSetShadow(forum2[i],1);
  501. }
  502. DisableInteriorEnterExits();
  503. }
  504.  
  505. public Encrypt(string[])
  506. {
  507. for(new x=0; x < strlen(string); x++)
  508. {
  509. string[x] += (3^x) * (x % 15);
  510. if(string[x] > (0xff))
  511. {
  512. string[x] -= 256;
  513. }
  514. }
  515. return 1;
  516. }
  517. stock IsValidPassword(pass[])
  518. {
  519. for(new i; i<strlen(pass); i++)
  520. {
  521. if((pass[i] < 48) || (pass[i] > 57 && pass[i] < 67) || (pass[i] > 90 && pass[i]< 97) || (pass[i] > 122)) return 0;
  522. }
  523. return 1;
  524. }
  525. forward SavePlayerConfig(playerid);
  526. forward LoadPlayerConfig(playerid);
  527.  
  528. public SavePlayerConfig(playerid)
  529. {
  530. new FilePath[256];
  531. new pname[MAX_PLAYER_NAME];
  532. GetPlayerName(playerid, pname, sizeof(pname));
  533. format(FilePath, sizeof(FilePath), "%s.ini",pname);
  534. if(!dini_Exists(FilePath))
  535. {
  536. }
  537. else if(PlayerInfo[playerid][pLoged] == 1)
  538. {
  539. dini_Set(FilePath, "Name", PlayerInfo[playerid][pName]);
  540. dini_IntSet(FilePath, "Level", PlayerInfo[playerid][pLevel]);
  541. dini_IntSet(FilePath, "AdmLevel", PlayerInfo[playerid][pAdmin]);
  542. dini_IntSet(FilePath, "Money", GetPlayerMoneyEx(playerid));
  543. dini_IntSet(FilePath, "Vip", PlayerInfo[playerid][pVip]);
  544. dini_IntSet(FilePath, "Socio", PlayerInfo[playerid][pSocio]);
  545. dini_IntSet(FilePath, "Maconha", PlayerInfo[playerid][pMaconha]);
  546. dini_IntSet(FilePath, "Crack", PlayerInfo[playerid][pCrack]);
  547. dini_IntSet(FilePath, "Cocaina", PlayerInfo[playerid][pCocaina]);
  548. dini_IntSet(FilePath, "Lider", PlayerInfo[playerid][pLider]);
  549. dini_IntSet(FilePath, "Morreu", PlayerInfo[playerid][pMorreu]);
  550. dini_IntSet(FilePath, "Matou", PlayerInfo[playerid][pMatou]);
  551. dini_IntSet(FilePath, "Cargo", PlayerInfo[playerid][pCargo]);
  552. dini_IntSet(FilePath, "Respeito", PlayerInfo[playerid][pRespeito]);
  553. dini_IntSet(FilePath, "Origem", PlayerInfo[playerid][pOrigem]);
  554. dini_IntSet(FilePath, "HorasJogadas", PlayerInfo[playerid][pHorasjogadas]);
  555. dini_IntSet(FilePath, "Emprego", PlayerInfo[playerid][pEmprego]);
  556. dini_IntSet(FilePath, "Tutorial", PlayerInfo[playerid][pTutorial]);
  557. dini_IntSet(FilePath, "Local", PlayerInfo[playerid][pLocal]);
  558. printf("Conta de %s salva com sucesso.",PlayerInfo[playerid][pName]);
  559. }
  560. }
  561. public LoadPlayerConfig(playerid)
  562. {
  563. new FilePath[256];
  564. new pname[MAX_PLAYER_NAME];
  565. GetPlayerName(playerid, pname, sizeof(pname));
  566. format(FilePath, sizeof(FilePath), "%s.ini",pname);
  567. if(!dini_Exists(FilePath))
  568. {
  569. dini_Create(FilePath);
  570. dini_Set(FilePath, "Name", PlayerInfo[playerid][pName]);
  571. dini_IntSet(FilePath, "Level",2);
  572. dini_IntSet(FilePath, "AdmLevel",0);
  573. dini_IntSet(FilePath, "Money",0);
  574. dini_IntSet(FilePath, "Vip", 0);
  575. dini_IntSet(FilePath, "Socio", 0);
  576. dini_IntSet(FilePath, "Maconha", 0);
  577. dini_IntSet(FilePath, "Crack", 0);
  578. dini_IntSet(FilePath, "Cocaina", 0);
  579. dini_IntSet(FilePath, "Lider", 0);
  580. dini_IntSet(FilePath, "Morreu", 0);
  581. dini_IntSet(FilePath, "Matou", 0);
  582. dini_IntSet(FilePath, "Cargo", 0);
  583. dini_IntSet(FilePath, "Respeito", 0);
  584. dini_IntSet(FilePath, "Origem", 0);
  585. dini_IntSet(FilePath, "HorasJogadas", 0);
  586. dini_IntSet(FilePath, "Emprego", 0);
  587. dini_IntSet(FilePath, "Tutorial", 0);
  588. dini_IntSet(FilePath, "Local", 0);
  589. GivePlayerMoneyEx(playerid,500);
  590. SetPlayerScore(playerid,1);
  591. printf("Conta de %s criada com sucesso.",PlayerInfo[playerid][pName]);
  592. }
  593. else
  594. {
  595. ResetPlayerMoneyEx(playerid);
  596. SetPlayerScore(playerid, dini_Int(FilePath, "Level"));
  597. PlayerInfo[playerid][pLevel] = dini_Int(FilePath, "Level");
  598. GivePlayerMoneyEx(playerid,dini_Int(FilePath, "Money"));
  599. PlayerInfo[playerid][pAdmin] = dini_Int(FilePath, "AdmLevel");
  600. PlayerInfo[playerid][pVip] = dini_Int(FilePath, "VipLevel");
  601. PlayerInfo[playerid][pSocio] = dini_Int(FilePath, "Socio");
  602. PlayerInfo[playerid][pMaconha] = dini_Int(FilePath, "Maconha");
  603. PlayerInfo[playerid][pCrack] = dini_Int(FilePath, "Crack");
  604. PlayerInfo[playerid][pCocaina] = dini_Int(FilePath, "Cocaina");
  605. PlayerInfo[playerid][pLider] = dini_Int(FilePath, "Lider");
  606. PlayerInfo[playerid][pMorreu] = dini_Int(FilePath, "Morreu");
  607. PlayerInfo[playerid][pMatou] = dini_Int(FilePath, "Matou");
  608. PlayerInfo[playerid][pCargo] = dini_Int(FilePath, "Cargo");
  609. PlayerInfo[playerid][pRespeito] = dini_Int(FilePath, "Respeito");
  610. PlayerInfo[playerid][pOrigem] = dini_Int(FilePath, "Origem");
  611. PlayerInfo[playerid][pHorasjogadas] = dini_Int(FilePath, "HorasJogadas");
  612. PlayerInfo[playerid][pEmprego] = dini_Int(FilePath, "Emprego");
  613. PlayerInfo[playerid][pTutorial] = dini_Int(FilePath, "Tutorial");
  614. PlayerInfo[playerid][pLocal] = dini_Int(FilePath, "Local");
  615. printf("Conta de %s carregada com sucesso.",PlayerInfo[playerid][pName]);
  616. }
  617. return 1;
  618. }
  619. //=================== [ Public de Mandar a Mensagem de lona distancia ] ===========================
  620. public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  621. {
  622. if(IsPlayerConnected(playerid))
  623. {
  624. new Float:posx, Float:posy, Float:posz;
  625. new Float:oldposx, Float:oldposy, Float:oldposz;
  626. new Float:tempposx, Float:tempposy, Float:tempposz;
  627. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  628. for(new i = 0; i < MAX_PLAYERS; i++)
  629. {
  630. if(IsPlayerConnected(i))
  631. {
  632. if(!BigEar[i])
  633. {
  634. GetPlayerPos(i, posx, posy, posz);
  635. tempposx = (oldposx -posx);
  636. tempposy = (oldposy -posy);
  637. tempposz = (oldposz -posz);
  638. if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  639. {
  640. SendClientMessage(i, col1, string);
  641. }
  642. else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  643. {
  644. SendClientMessage(i, col2, string);
  645. }
  646. else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  647. {
  648. SendClientMessage(i, col3, string);
  649. }
  650. else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  651. {
  652. SendClientMessage(i, col4, string);
  653. }
  654. else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  655. {
  656. SendClientMessage(i, col5, string);
  657. }
  658. }
  659. else
  660. {
  661. SendClientMessage(i, col1, string);
  662. }
  663. }
  664. }
  665. }
  666. return 1;
  667. }
  668. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  669. {
  670. if(dialogid == DialogoLogar)
  671. {
  672. if(response == 0) SendClientMessage(playerid,ErrorColor,"[BG]: É preciso se logar para jogar aqui."),Kick(playerid);
  673. else if(response == 1)
  674. {
  675. new tmp[256];
  676. new tmppass[64];
  677. strmid(tmp, inputtext, 0, strlen(inputtext), 75);
  678.  
  679. new FilePathUser[256];
  680. format(FilePathUser, sizeof(FilePathUser), "%s.ini",PlayerInfo[playerid][pName]);
  681. if (!dini_Exists(FilePathUser))
  682. {
  683. SendClientMessage(playerid, ErrorColor, "[BG]: Você não está registrado.");
  684. return 1;
  685. }
  686. if(PlayerInfo[playerid][pLoged] == 1)
  687. {
  688. SendClientMessage(playerid, ErrorColor, "[BG]: Voce já está logado.");
  689. return 1;
  690. }
  691. if(!strlen(tmp))
  692. {
  693. SendClientMessage(playerid,ErrorColor, "[BG]: /logar [Senha]");
  694. return 1;
  695. }
  696. format(FilePathUser, sizeof(FilePathUser), "%s.ini",PlayerInfo[playerid][pName]);
  697. strmid(PlayerInfo[playerid][pKey], dini_Get(FilePathUser,"Pass"), 0, strlen(dini_Get(FilePathUser,"Pass")), 255);
  698. strmid(tmppass, tmp, 0, strlen(tmp), 255);
  699. Encrypt(tmppass);
  700. new xIntPass = dini_Int(FilePathUser,"IntPass");
  701. if(strcmp(PlayerInfo[playerid][pKey],tmppass, true )==0||xIntPass == encodepass(tmp))
  702. {
  703. LoadPlayerConfig(playerid);
  704. dini_IntSet(FilePathUser,"IntPass",encodepass(tmp));
  705. SendClientMessage(playerid,BroadCastColor,"[BG]: Logado com sucesso!");
  706. SendClientMessage(playerid,VERDE,"[BG]: Tenha um bom jogo!");
  707. GivePlayerMoney(playerid, GetPlayerMoneyEx(playerid));
  708. PlayerInfo[playerid][pHorasjogadas] += 1;
  709. PlayerInfo[playerid][pLoged] = 1;
  710. TextDrawShowForPlayer(playerid, forum2[playerid]);
  711. TextDrawShowForPlayer(playerid,txtTimeDisp);
  712. TextDrawShowForPlayer(playerid,txtDateDisp);
  713. SpawnPlayer(playerid);
  714. }
  715. else
  716. {
  717. new string[256];
  718. format(string,sizeof(string),"Seja bem vindo %s.\nInsira sua senha:",PlayerInfo[playerid][pName]);
  719. ShowPlayerDialog(playerid,DialogoLogar,1,"Login",string,"Logar","Sair");
  720. SendClientMessage(playerid,VERDE,"[BG]: Senha Errada,tente novamente!");
  721. }
  722. }
  723. }
  724. if(dialogid == DialogoRegistrar)
  725. {
  726. if(response == 0) SendClientMessage(playerid,ErrorColor,"[BG]: É preciso se registrar para jogar aqui."),Kick(playerid);
  727. else if(response == 1)
  728. {
  729. new tmp[256];
  730. new tmppass[64];
  731. strmid(tmp, inputtext, 0, strlen(inputtext), 75);
  732. new FilePathUser[256];
  733. format(FilePathUser, sizeof(FilePathUser), "%s.ini",PlayerInfo[playerid][pName]);
  734. if(IsPlayerConnected(playerid))
  735. {
  736. if(PlayerInfo[playerid][pLoged] == 1)
  737. {
  738. SendClientMessage(playerid, ErrorColor, "[BG]: Voce já esta logado.");
  739. return 1;
  740. }
  741. if (dini_Exists(FilePathUser))
  742. {
  743. SendClientMessage(playerid, ErrorColor, "[BG]: Este nick já esta registrado.");
  744. return 1;
  745. }
  746. if(!strlen(tmp))
  747. {
  748. new string[256];
  749. format(string,sizeof(string),"Tente Novamente %s, motivo: nenhuma senha.",PlayerInfo[playerid][pName]);
  750. ShowPlayerDialog(playerid,DialogoRegistrar,1,"Registre-se",string,"Registrar","Sair");
  751. return 1;
  752. }
  753. if(IsValidPassword(tmp))
  754. {
  755. dini_IntSet(FilePathUser,"IntPass",encodepass(tmp));
  756. strmid(tmppass, tmp, 0, strlen(tmp), 255);
  757. Encrypt(tmppass);
  758. ResetPlayerMoneyEx(playerid);
  759. LoadPlayerConfig(playerid);
  760.  
  761. strmid(PlayerInfo[playerid][pKey], tmppass, 0, strlen(tmppass), 255);
  762.  
  763. dini_Set(FilePathUser,"Pass",PlayerInfo[playerid][pKey]);
  764.  
  765. PlayerInfo[playerid][pLoged] = 1;
  766. SendClientMessage(playerid,BroadCastColor,"[BG]: Registrado com Sucesso.");
  767. TextDrawShowForPlayer(playerid, forum2[playerid]);
  768. TextDrawShowForPlayer(playerid,txtTimeDisp);
  769. TextDrawShowForPlayer(playerid,txtDateDisp);
  770. SpawnPlayer(playerid);
  771. }
  772. else
  773. {
  774. new string[256];
  775. format(string,sizeof(string),"Tente Novamente %s, motivo: caracteres inválidos.",PlayerInfo[playerid][pName]);
  776. ShowPlayerDialog(playerid,DialogoRegistrar,1,"Registre-se",string,"Registrar","Sair");
  777. }
  778. }
  779. }
  780. }
  781. return 1;
  782. }
  783. public Encriptar(string[])
  784. {
  785. for(new x=0; x < strlen(string); x++)
  786. {
  787. string[x] += (3^x) * (x % 15);
  788. if(string[x] > (0xff))
  789. {
  790. string[x] -= 256;
  791. }
  792. }
  793. return 1;
  794. }
  795. public PlayersOnline()
  796. {
  797. TotalOnline = 0;
  798. for(new i=0; i<MAX_PLAYERS; i++) {
  799. if(IsPlayerConnected(i)) {
  800. if(TotalOnline == 0){
  801. TotalOnline = 1;
  802. }
  803. else if (TotalOnline > 0){
  804. TotalOnline++;
  805. }
  806. }
  807.  
  808. }
  809. return 1;
  810. }
  811. stock strtok(const string[], &index)
  812. {
  813. new length = strlen(string);
  814. while ((index < length) && (string[index] <= ' '))
  815. {
  816. index++;
  817. }
  818. new offset = index;
  819. new result[20];
  820. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  821. {
  822. result[index - offset] = string[index];
  823. index++;
  824. }
  825. result[index - offset] = EOS;
  826. return result;
  827. }
  828. IsNumeric(const string[])
  829. {
  830. for (new i = 0, j = strlen(string); i < j; i++)
  831. {
  832. if (string[i] > '9' || string[i] < '0') return 0;
  833. }
  834. return 1;
  835. }
  836. ReturnUser(text[], playerid = INVALID_PLAYER_ID)
  837. {
  838. new pos = 0;
  839. while (text[pos] < 0x21) // Strip out leading spaces
  840. {
  841. if (text[pos] == 0) return INVALID_PLAYER_ID; // No passed text
  842. pos++;
  843. }
  844. new userid = INVALID_PLAYER_ID;
  845. if (IsNumeric(text[pos])) // Check whole passed string
  846. {
  847. // If they have a numeric name you have a problem (although names are checked on id failure)
  848. userid = strval(text[pos]);
  849. if (userid >=0 && userid < MAX_PLAYERS)
  850. {
  851. if(!IsPlayerConnected(userid))
  852. {
  853. /*if (playerid != INVALID_PLAYER_ID)
  854. {
  855. SendClientMessage(playerid, 0xFF0000AA, "User not connected");
  856. }*/
  857. userid = INVALID_PLAYER_ID;
  858. }
  859. else
  860. {
  861. return userid; // A player was found
  862. }
  863. }
  864. /*else
  865. {
  866. if (playerid != INVALID_PLAYER_ID)
  867. {
  868. SendClientMessage(playerid, 0xFF0000AA, "Invalid user ID");
  869. }
  870. userid = INVALID_PLAYER_ID;
  871. }
  872. return userid;*/
  873. // Removed for fallthrough code
  874. }
  875. // They entered [part of] a name or the id search failed (check names just incase)
  876. new len = strlen(text[pos]);
  877. new count = 0;
  878. new name[MAX_PLAYER_NAME];
  879. for (new i = 0; i < MAX_PLAYERS; i++)
  880. {
  881. if (IsPlayerConnected(i))
  882. {
  883. GetPlayerName(i, name, sizeof (name));
  884. if (strcmp(name, text[pos], true, len) == 0) // Check segment of name
  885. {
  886. if (len == strlen(name)) // Exact match
  887. {
  888. return i; // Return the exact player on an exact match
  889. // Otherwise if there are two players:
  890. // Me and MeYou any time you entered Me it would find both
  891. // And never be able to return just Me's id
  892. }
  893. else // Partial match
  894. {
  895. count++;
  896. userid = i;
  897. }
  898. }
  899. }
  900. }
  901. if (count != 1)
  902. {
  903. if (playerid != INVALID_PLAYER_ID)
  904. {
  905. if (count)
  906. {
  907. SendClientMessage(playerid, 0xFF0000AA, "Multiple users found, please narrow earch");
  908. }
  909. else
  910. {
  911. SendClientMessage(playerid, 0xFF0000AA, "No matching user found");
  912. }
  913. }
  914. userid = INVALID_PLAYER_ID;
  915. }
  916. return userid; // INVALID_USER_ID for bad return
  917. }
  918. //=================== [ Spawn do Player] ===========================
  919. public OnPlayerSpawn(playerid)
  920. {
  921. if(PlayerInfo[playerid][pOrigem] == 0)
  922. {
  923. SetPlayerPos(playerid,-1549.1127,696.8275,7.1797);
  924. SetPlayerInterior(playerid, 0);
  925. }
  926. if(PlayerInfo[playerid][pTutorial] == 0)
  927. {
  928. ShowPlayerDialog(playerid, 500, DIALOG_STYLE_MSGBOX, "Regras:", "-Este é um servidor de Roleplay, Simulação de vida real.\n\n-Nós estamos absolutamente interessados em jogadores que não façam DM e DB.\n\n-Você Não mata ninguem na vida real, nao rouba ninguem na vida real.\n\n-Se você for um civil, jogue como um civil. Se for gangster... Ai Sim, Poderá Matar e Roubar.\n\n-Mais Sem Matar Civis ou Pessoas Que Não Fizeram Nada Com Você.\n\nSeja Bem Vindo ao Projeto", "Concordo", "Discordo");
  929. PlayerInfo[playerid][pTutorial] = 1;
  930. }
  931. return 1;
  932. }
  933. //=================== [ Public dos comandos] ===========================
  934. public OnPlayerCommandText(playerid, cmdtext[])
  935. {
  936. new string[128];
  937. new giveplayer[MAX_PLAYER_NAME];
  938. new playername[MAX_PLAYER_NAME];
  939. new cmd[128];
  940. new tmp[128];
  941. //new giveplayerid, moneys, idx;
  942. new idx;
  943. cmd = strtok(cmdtext, idx);
  944. //---------------------------------------[ Comandos de Admin ]--------------------------------------//
  945. if(strcmp(cmd,"/SetAdmin",true)==0)
  946. {
  947. new tmp2[256];
  948. tmp = strtok(cmdtext, idx);
  949. new id = ReturnUser(tmp);
  950. tmp2 = strtok(cmdtext, idx);
  951. new level = strval(tmp2);
  952. if(PlayerInfo[playerid][pAdmin] < 5) SendClientMessage(playerid,ErrorColor,"[BG]: Você Precisa Administrador Scripter para Usar Esse Comando.");
  953. else if(PlayerInfo[playerid][pAdmin]<= 4 && PlayerInfo[id][pAdmin]>=PlayerInfo[playerid][pAdmin]) SendClientMessage(playerid,ErrorColor,"[BG]: Você Não pode Seta o Level de um jogador com o level Maior ou Igual ao Seu.");
  954. else if(PlayerInfo[playerid][pAdmin]<= 4 && level>=PlayerInfo[playerid][pAdmin]) SendClientMessage(playerid,ErrorColor,"[BG]: Você Não pode Seta um level Maior ou Igual ao Seu.");
  955. else if(!IsPlayerConnected(id)) SendClientMessage(playerid,ErrorColor,"[BG]: Jogador Disconectado.");
  956. else if(!strlen(tmp)||!strlen(tmp2)) SendClientMessage(playerid,ErrorColor,"[BG]: /SetAdmin [playerid] [Level]");
  957. else if(level<0||level>1342) SendClientMessage(playerid,ErrorColor,"[BG]: Level de Admin Deve Ser Entre [1-1342].");
  958. else if(PlayerInfo[id][pLoged] == 0) SendClientMessage(playerid,ErrorColor,"[BG]: Jogador Não esta Logado.");
  959. else
  960. {
  961. //new string[256];
  962. PlayerInfo[id][pAdmin] = level;
  963. if(level==0) format(string, sizeof(string),"[BG]: '%s' Setou o Level Admin de '%s' Para %d (Jogador).",PlayerInfo[playerid][pName],PlayerInfo[id][pName],level);
  964. else if(level==1) format(string, sizeof(string),"[BG Admin]: '%s' Setou o Level Admin de '%s' Para %d (Sub-Moderador).",PlayerInfo[playerid][pName],PlayerInfo[id][pName],level);
  965. else if(level==2) format(string, sizeof(string),"[BG Admin]: '%s' Setou o Level Admin de '%s' Para %d (Moderador).",PlayerInfo[playerid][pName],PlayerInfo[id][pName],level);
  966. else if(level==3) format(string, sizeof(string),"[BG Admin]: '%s' Setou o Level Admin de '%s' Para %d (Sub-Administrador).",PlayerInfo[playerid][pName],PlayerInfo[id][pName],level);
  967. else if(level==4) format(string, sizeof(string),"[BG Admin]: '%s' Setou o Level Admin de '%s' Para %d (Administrador).",PlayerInfo[playerid][pName],PlayerInfo[id][pName],level);
  968. else if(level==5) format(string, sizeof(string),"[BG Admin]: '%s' Setou o Level Admin de '%s' Para %d (Administrador Scripter).",PlayerInfo[playerid][pName],PlayerInfo[id][pName],level);
  969. MessageAdmins(COLOR_LIGHTRED,string,1);
  970. }
  971. return 1;
  972. }
  973. if(strcmp(cmd, "/ir", true) == 0)
  974. {
  975. if(IsPlayerConnected(playerid))
  976. {
  977. tmp = strtok(cmdtext, idx);
  978. if(!strlen(tmp))
  979. {
  980. SendClientMessage(playerid, COLOR_GRAD2, "USE: /ir [id]");
  981. return 1;
  982. }
  983. new plname[MAX_PLAYER_NAME];
  984. new Float:plocx,Float:plocy,Float:plocz;
  985. new plo, world;
  986. plo = ReturnUser(tmp);
  987. world = GetPlayerVirtualWorld(plo);
  988. if (IsPlayerConnected(plo))
  989. {
  990. if(plo != INVALID_PLAYER_ID)
  991. {
  992. if (PlayerInfo[playerid][pAdmin] >= 1)
  993. {
  994. if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
  995. {
  996. SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
  997. return 1;
  998. }
  999. GetPlayerPos(plo, plocx, plocy, plocz);
  1000. if (GetPlayerState(playerid) == 2)
  1001. {
  1002. new tmpcar = GetPlayerVehicleID(playerid);
  1003. SetVehiclePos(tmpcar, plocx, plocy+4, plocz); LinkVehicleToInterior(tmpcar, 0);
  1004. TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
  1005. }
  1006. else
  1007. {
  1008. SetPlayerPos(playerid,plocx,plocy+2, plocz);
  1009. }
  1010. SetPlayerVirtualWorld(playerid, world);
  1011. SendClientMessage(playerid, 0x33FF00FF, "Você foi teleportado pelo Admin !");
  1012. GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
  1013. GetPlayerName(plo, plname, MAX_PLAYER_NAME);
  1014. if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
  1015. {}
  1016. else { format(string, sizeof(string), "O Admin %s Foi Até %s.",playername,plname); }
  1017. ProxDetector(30.0, playerid, string, 0x33FF00FF,0x33FF00FF,0x33FF00FF,0x33FF00FF,0x33FF00FF);
  1018. }
  1019. else
  1020. {
  1021. SendClientMessage(playerid, COLOR_GRAD1, " Você não esta autorizado a usar este comando!");
  1022. }
  1023. }
  1024. }
  1025. else
  1026. {
  1027. SendClientMessage(playerid, COLOR_GRAD1, " Esse não é um player ativo.");
  1028. }
  1029. }
  1030. return 1;
  1031. }
  1032. if(strcmp(cmd, "/tapa", true) == 0)
  1033. {
  1034. if(IsPlayerConnected(playerid))
  1035. {
  1036. tmp = strtok(cmdtext, idx);
  1037. if(!strlen(tmp))
  1038. {
  1039. SendClientMessage(playerid, COLOR_GRAD2, "USE: /tapa [id]");
  1040. return 1;
  1041. }
  1042. new playa;
  1043. new Float:slx, Float:sly, Float:slz;
  1044. playa = ReturnUser(tmp);
  1045. if (PlayerInfo[playerid][pAdmin] >=1)
  1046. {
  1047. if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
  1048. {
  1049. SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
  1050. return 1;
  1051. }
  1052. if(IsPlayerConnected(playa))
  1053. {
  1054. if(playa != INVALID_PLAYER_ID)
  1055. {
  1056. if(PlayerInfo[playa][pAdmin] >= 1340 && PlayerInfo[playerid][pAdmin] < 1338)
  1057. {
  1058. SendClientMessage(playerid, COLOR_GRAD1, "Você não pode dar tapas em um Admin Dono !");
  1059. return 1;
  1060. }
  1061. GetPlayerName(playa, giveplayer, sizeof(giveplayer));
  1062. GetPlayerName(playerid, sendername, sizeof(sendername));
  1063. GetPlayerPos(playa, slx, sly, slz);
  1064. SetPlayerPos(playa, slx, sly, slz+12);
  1065. PlayerPlaySound(playa, 1130, slx, sly, slz+12);
  1066. printf("AdmCmd: %s slapped %s",sendername, giveplayer);
  1067. if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
  1068. {
  1069. format(string, sizeof(string), "AdmCmd: %s ganhou um tapa de: Capetinha_Bozinho",giveplayer);
  1070. }
  1071. else
  1072. {
  1073. format(string, sizeof(string), "AdmCmd: %s ganhou um tapa de: %s",giveplayer ,sendername);
  1074. }
  1075. MessageAdmins(COLOR_LIGHTRED,string,1);
  1076. }
  1077. }
  1078. }
  1079. else
  1080. {
  1081. SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando!");
  1082. }
  1083. }
  1084. return 1;
  1085. }
  1086. if(strcmp(cmd, "/cveh", true) == 0)
  1087. {
  1088. if(IsPlayerConnected(playerid))
  1089. {
  1090. if (PlayerInfo[playerid][pAdmin] < 1338)
  1091. {
  1092. SendClientMessage(playerid, COLOR_GRAD1, " Você não esta autorizado a usar este comando!");
  1093. return 1;
  1094. }
  1095. if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
  1096. {
  1097. SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
  1098. return 1;
  1099. }
  1100. if(CreatedCar >= 96)
  1101. {
  1102. SendClientMessage(playerid, COLOR_GRAD1, "Já criaram muitos carros, destrua alguns primeiro /destruirid");
  1103. return 1;
  1104. }
  1105. tmp = strtok(cmdtext, idx);
  1106. if(!strlen(tmp))
  1107. {
  1108. SendClientMessage(playerid, COLOR_GRAD2, "USE: /cveh [IDCARRO] [COR1] [COR2]");
  1109. return 1;
  1110. }
  1111. new car;
  1112. car = strval(tmp);
  1113. if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, " Modelo Do Carro Tem Que Ser Entre 411 e 600 !"); return 1; }
  1114. tmp = strtok(cmdtext, idx);
  1115. if(!strlen(tmp))
  1116. {
  1117. SendClientMessage(playerid, COLOR_GRAD2, "USE: /cveh [IDCARRO] [COR1] [COR2]");
  1118. return 1;
  1119. }
  1120. new COLOR1;
  1121. COLOR1 = strval(tmp);
  1122. if(COLOR1 < 0 || COLOR1 > 126) { SendClientMessage(playerid, COLOR_GREY, " Número Da Cor tem que ser entre 0 e 126 !"); return 1; }
  1123. tmp = strtok(cmdtext, idx);
  1124. if(!strlen(tmp))
  1125. {
  1126. SendClientMessage(playerid, COLOR_GRAD2, "USE: /cveh [IDCARRO] [COR1] [COR2]");
  1127. return 1;
  1128. }
  1129. new COLOR2;
  1130. COLOR2 = strval(tmp);
  1131. if(COLOR2 < 0 || COLOR2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Número Da Cor tem que ser entre 0 e 126 !"); return 1; }
  1132. new Float:X,Float:Y,Float:Z;
  1133. GetPlayerPos(playerid, X,Y,Z);
  1134. new carid = CreateVehicle(car, X,Y,Z, 0.0, COLOR1, COLOR2, 60000);
  1135. CreatedCars[CreatedCar] = carid;
  1136. CreatedCar ++;
  1137. format(string, sizeof(string), " Veiculo %d Criado.", carid);
  1138. SendClientMessage(playerid, COLOR_GREY, string);
  1139. }
  1140. return 1;
  1141. }
  1142. if(strcmp(cmd, "/tapao", true) == 0)
  1143. {
  1144. if(IsPlayerConnected(playerid))
  1145. {
  1146. tmp = strtok(cmdtext, idx);
  1147. if(!strlen(tmp))
  1148. {
  1149. SendClientMessage(playerid, COLOR_GRAD2, "USE: /tapao [id]");
  1150. return 1;
  1151. }
  1152. new playa;
  1153. //new Float:shealth;
  1154. new Float:slx, Float:sly, Float:slz;
  1155. playa = ReturnUser(tmp);
  1156. if (PlayerInfo[playerid][pAdmin] >=1)
  1157. {
  1158. if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
  1159. {
  1160. SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
  1161. return 1;
  1162. }
  1163. if(IsPlayerConnected(playa))
  1164. {
  1165. if(playa != INVALID_PLAYER_ID)
  1166. {
  1167. if(PlayerInfo[playa][pAdmin] >= 1340 && PlayerInfo[playerid][pAdmin] < 1338)
  1168. {
  1169. SendClientMessage(playerid, COLOR_GRAD1, "Você não pode dar tapão em um Admin Dono !");
  1170. return 1;
  1171. }
  1172. GetPlayerName(playa, giveplayer, sizeof(giveplayer));
  1173. GetPlayerName(playerid, sendername, sizeof(sendername));
  1174. //GetPlayerHealth(playa, shealth);
  1175. //SetPlayerHealth(playa, shealth-5);
  1176. GetPlayerPos(playa, slx, sly, slz);
  1177. SetPlayerPos(playa, slx, sly, slz+130);
  1178. SetPlayerHealth(playerid, 100.0);
  1179. PlayerPlaySound(playa, 1130, slx, sly, slz+130);
  1180. printf("AdmCmd: %s slapped %s",sendername, giveplayer);
  1181. if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
  1182. {
  1183. format(string, sizeof(string), "AdmCmd: %s ganhou um tapao de: Capetinha_Bozinho",giveplayer);
  1184. }
  1185. else
  1186. {
  1187. format(string, sizeof(string), "AdmCmd: %s ganhou um tapao de: %s",giveplayer ,sendername);
  1188. }
  1189. MessageAdmins(COLOR_LIGHTRED,string,1);
  1190. }
  1191. }
  1192. }
  1193. else
  1194. {
  1195. SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando!");
  1196. }
  1197. }
  1198. return 1;
  1199. }
  1200. if(strcmp(cmd,"/matar",true)==0 || strcmp(cmd,"/kill",true)==0)
  1201. {
  1202. if(IsPlayerConnected(playerid))
  1203. {
  1204. tmp = strtok(cmdtext, idx);
  1205. if(!strlen(tmp))
  1206. {
  1207. SendClientMessage(playerid, COLOR_GRAD2, "USE: /matar [id]");
  1208. return 1;
  1209. }
  1210. new playa;
  1211. //new Float:shealth;
  1212. playa = ReturnUser(tmp);
  1213. if (PlayerInfo[playerid][pAdmin] >=1)
  1214. {
  1215. if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
  1216. {
  1217. SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
  1218. return 1;
  1219. }
  1220. if(IsPlayerConnected(playa))
  1221. {
  1222. if(playa != INVALID_PLAYER_ID)
  1223. {
  1224. if(PlayerInfo[playa][pAdmin] >= 1340 && PlayerInfo[playerid][pAdmin] < 1338)
  1225. {
  1226. SendClientMessage(playerid, COLOR_GRAD1, "Você não pode matar um Admin Dono !");
  1227. return 1;
  1228. }
  1229. GetPlayerName(playa, giveplayer, sizeof(giveplayer));
  1230. GetPlayerName(playerid, sendername, sizeof(sendername));
  1231. //GetPlayerHealth(playa, shealth);
  1232. //SetPlayerHealth(playa, shealth-5);
  1233. SetPlayerHealth(playa, 0.0);
  1234. SetPlayerVirtualWorld(playa,0);
  1235. printf("AdmCmd: %s matou %s",sendername, giveplayer);
  1236. if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
  1237. {
  1238. format(string, sizeof(string), "AdmCmd: %s ganhou uma morte de: Capetinha_Bozinho",giveplayer);
  1239. }
  1240. else
  1241. {
  1242. format(string, sizeof(string), "AdmCmd: %s ganhou uma morte de: %s",giveplayer ,sendername);
  1243. }
  1244. MessageAdmins(COLOR_LIGHTRED,string,1);
  1245. }
  1246. }
  1247. }
  1248. else
  1249. {
  1250. SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando!");
  1251. }
  1252. }
  1253. return 1;
  1254. }
  1255. if(strcmp(cmd, "/ls", true) == 0)
  1256. {
  1257. if(IsPlayerConnected(playerid))
  1258. {
  1259. if(PlayerInfo[playerid][pAdmin] >= 1)
  1260. {
  1261. if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
  1262. {
  1263. SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
  1264. return 1;
  1265. }
  1266. if (GetPlayerState(playerid) == 2)
  1267. {
  1268. new tmpcar = GetPlayerVehicleID(playerid);
  1269. SetVehiclePos(tmpcar, 1539.6094,-1694.4749,13.5469); LinkVehicleToInterior(tmpcar, 0);
  1270. TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
  1271. }
  1272. else
  1273. {
  1274. SetPlayerPos(playerid, 1539.6094,-1694.4749,13.5469);
  1275. }
  1276. SendClientMessage(playerid, COLOR_GRAD1, "Você foi teleportado pelo Admin!");
  1277. SetPlayerInterior(playerid,0);
  1278. SetPlayerVirtualWorld(playerid,0);
  1279.  
  1280. }
  1281. else
  1282. {
  1283. SendClientMessage(playerid, COLOR_GRAD1, "Você não está autorizado a usar o comando!");
  1284. }
  1285. }
  1286. return 1;
  1287. }
  1288. if(strcmp(cmd, "/esconderijo", true) == 0 || strcmp(cmd, "/irin", true) == 0)
  1289. {
  1290. if(IsPlayerConnected(playerid))
  1291. {
  1292. if (PlayerInfo[playerid][pAdmin] >= 1)
  1293. {
  1294. if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
  1295. {
  1296. SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
  1297. return 1;
  1298. }
  1299. else
  1300. {
  1301. SetPlayerPos(playerid, 1416.107000,0.268620,1000.926000);
  1302. }
  1303. SendClientMessage(playerid, COLOR_GRAD1, " Você Foi Teleportado!");
  1304. SetPlayerInterior(playerid,1);
  1305. }
  1306. else
  1307. {
  1308. SendClientMessage(playerid, COLOR_GRAD1, " Você não esta autorizado a usar este comando!!");
  1309. }
  1310. }
  1311. return 1;
  1312. }
  1313. if(strcmp(cmd, "/onibus", true) == 0)
  1314. {
  1315. if(IsPlayerConnected(playerid))
  1316. {
  1317. if(PlayerInfo[playerid][pAdmin] >= 3)
  1318. {
  1319. if (GetPlayerState(playerid) == 2)
  1320. {
  1321. new tmpcar = GetPlayerVehicleID(playerid);
  1322. SetVehiclePos(tmpcar, 1759.2711,-1849.1093,13.5781); LinkVehicleToInterior(tmpcar, 0);
  1323. TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
  1324. }
  1325. else
  1326. {
  1327. SetPlayerPos(playerid, 1759.2711,-1849.1093,13.5781);
  1328. }
  1329. SendClientMessage(playerid, COLOR_GRAD1, "Você foi teleportado pelo Admin!");
  1330. SetPlayerInterior(playerid,0);
  1331.  
  1332. }
  1333. else
  1334. {
  1335. SendClientMessage(playerid, COLOR_GRAD1, "Você não está autorizado a usar o comando!");
  1336. }
  1337. }
  1338. return 1;
  1339. }
  1340. if(strcmp(cmd, "/lv", true) == 0)
  1341. {
  1342. if(IsPlayerConnected(playerid))
  1343. {
  1344. if (PlayerInfo[playerid][pAdmin] >= 1)
  1345. {
  1346. if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
  1347. {
  1348. SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
  1349. return 1;
  1350. }
  1351. if (GetPlayerState(playerid) == 2)
  1352. {
  1353. new tmpcar = GetPlayerVehicleID(playerid);
  1354. SetVehiclePos(tmpcar, 1699.2, 1435.1, 10.7); LinkVehicleToInterior(tmpcar, 0);
  1355. TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
  1356. }
  1357. else
  1358. {
  1359. SetPlayerPos(playerid, 1699.2,1435.1, 10.7);
  1360. }
  1361. SendClientMessage(playerid, COLOR_GRAD1, "Você foi teleportado pelo Admin!");
  1362. SetPlayerInterior(playerid,0);
  1363. SetPlayerVirtualWorld(playerid,0);
  1364.  
  1365. }
  1366. else
  1367. {
  1368. SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando!");
  1369. }
  1370. }
  1371. return 1;
  1372. }
  1373. if(strcmp(cmd, "/sf", true) == 0)
  1374. {
  1375. if(IsPlayerConnected(playerid))
  1376. {
  1377. if (PlayerInfo[playerid][pAdmin] >= 1)
  1378. {
  1379. if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
  1380. {
  1381. SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
  1382. return 1;
  1383. }
  1384. if (GetPlayerState(playerid) == 2)
  1385. {
  1386. new tmpcar = GetPlayerVehicleID(playerid);
  1387. SetVehiclePos(tmpcar, -1417.0,-295.8,14.1); LinkVehicleToInterior(tmpcar, 0);
  1388. TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
  1389. }
  1390. else
  1391. {
  1392. SetPlayerPos(playerid, -1417.0,-295.8,14.1);
  1393. }
  1394. SendClientMessage(playerid, COLOR_GRAD1, "Você foi teleportado pelo Admin!");
  1395. SetPlayerInterior(playerid,0);
  1396. SetPlayerVirtualWorld(playerid,0);
  1397.  
  1398. }
  1399. else
  1400. {
  1401. SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando!");
  1402. }
  1403. }
  1404. return 1;
  1405. }
  1406. if(strcmp(cmd, "/entrarcarro", true) == 0)
  1407. {
  1408. if(IsPlayerConnected(playerid))
  1409. {
  1410. tmp = strtok(cmdtext, idx);
  1411. if(!strlen(tmp))
  1412. {
  1413. SendClientMessage(playerid, COLOR_GRAD1, "USE: /entrarcarro [carro id]");
  1414. return 1;
  1415. }
  1416. new testcar = strval(tmp);
  1417. if (PlayerInfo[playerid][pAdmin] >= 3)
  1418. {
  1419. PutPlayerInVehicle(playerid, testcar, 1);
  1420. SendClientMessage(playerid, COLOR_GRAD1, "Você foi teleportado pelo Admin!");
  1421. }
  1422. else
  1423. {
  1424. SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando!");
  1425. }
  1426. }
  1427. return 1;
  1428. }
  1429. if(strcmp(cmd, "/entrarcarro2", true) == 0)
  1430. {
  1431. if(IsPlayerConnected(playerid))
  1432. {
  1433. tmp = strtok(cmdtext, idx);
  1434. if(!strlen(tmp))
  1435. {
  1436. SendClientMessage(playerid, COLOR_GRAD1, "USE: /entrarcarro [carro id]");
  1437. return 1;
  1438. }
  1439. new testcar = strval(tmp);
  1440. if (PlayerInfo[playerid][pAdmin] >= 3)
  1441. {
  1442. PutPlayerInVehicle(playerid, testcar, 0);
  1443. SendClientMessage(playerid, COLOR_GRAD1, "Você foi teleportado pelo Admin!");
  1444. }
  1445. else
  1446. {
  1447. SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando!");
  1448. }
  1449. }
  1450. return 1;
  1451. }
  1452. if(strcmp(cmd, "/ircarro", true) == 0)
  1453. {
  1454. if(IsPlayerConnected(playerid))
  1455. {
  1456. tmp = strtok(cmdtext, idx);
  1457. if(!strlen(tmp))
  1458. {
  1459. SendClientMessage(playerid, COLOR_GRAD1, "USE: /ircarro [carro id]");
  1460. return 1;
  1461. }
  1462. new testcar = strval(tmp);
  1463. if (PlayerInfo[playerid][pAdmin] >= 4)
  1464. {
  1465. if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
  1466. {
  1467. SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
  1468. return 1;
  1469. }
  1470. new Float:cwx2,Float:cwy2,Float:cwz2;
  1471. GetVehiclePos(testcar, cwx2, cwy2, cwz2);
  1472. if (GetPlayerState(playerid) == 2)
  1473. {
  1474. new tmpcar = GetPlayerVehicleID(playerid);
  1475. SetVehiclePos(tmpcar, cwx2, cwy2, cwz2); LinkVehicleToInterior(tmpcar, 0);
  1476. TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
  1477. }
  1478. else
  1479. {
  1480. SetPlayerPos(playerid, cwx2, cwy2, cwz2);
  1481. }
  1482. SendClientMessage(playerid, COLOR_GRAD1, "Você foi teleportado pelo Admin!");
  1483. SetPlayerInterior(playerid,0);
  1484. }
  1485. else
  1486. {
  1487. SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando!");
  1488. }
  1489. }
  1490. return 1;
  1491. }
  1492. if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)
  1493. {
  1494. if(IsPlayerConnected(playerid))
  1495. {
  1496. GetPlayerName(playerid, sendername, sizeof(sendername));
  1497. new length = strlen(cmdtext);
  1498. while ((idx < length) && (cmdtext[idx] <= ' '))
  1499. {
  1500. idx++;
  1501. }
  1502. new offset = idx;
  1503. new result[64];
  1504. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  1505. {
  1506. result[idx - offset] = cmdtext[idx];
  1507. idx++;
  1508. }
  1509. result[idx - offset] = EOS;
  1510. if(!strlen(result))
  1511. {
  1512. SendClientMessage(playerid, COLOR_GRAD2, "USE: (/a)dmin [admin chat]");
  1513. return 1;
  1514. }
  1515. if(TentouDivulgar(result))
  1516. {
  1517. if(cdivulgar[playerid] >= 6)
  1518. {
  1519. SendClientMessage(playerid, COLOR_LIGHTBLUE,"Aqui você não pode anunciar servidores!");
  1520. SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu servidor é uma merda, não divulgue-o aqui!");
  1521. SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu noob peguei esse IP e vou divulgar nesse server também, uaheuhaeuhaeahe!");
  1522. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  1523. Kick(playerid);
  1524. }
  1525. GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
  1526. format(string, 128, "AdmAviso: [%d]%s tentou divulgar: %s.",playerid,playername,result);
  1527. MessageAdmins(COLOR_YELLOW,string,1);
  1528. cdivulgar[playerid] += 1;
  1529. return 1;
  1530. }
  1531. if (PlayerInfo[playerid][pAdmin] >= 1)
  1532. {
  1533. format(string, sizeof(string), "*%d Admin %s: %s", PlayerInfo[playerid][pAdmin], PlayerName(playerid), result);
  1534. MessageAdmins(COLOR_LIGHTBLUE, string, 1);
  1535. }
  1536. }
  1537. return 1;
  1538. }
  1539. if(strcmp(cmd, "/creditos", true) == 0)
  1540. {
  1541. SendClientMessage(playerid, COLOR_WHITE, " ");
  1542. SendClientMessage(playerid, COLOR_WHITE, " ");
  1543. SendClientMessage(playerid, COLOR_WHITE, " ");
  1544. SendClientMessage(playerid, COLOR_WHITE, " ");
  1545. SendClientMessage(playerid, COLOR_WHITE, " ");
  1546. SendClientMessage(playerid, COLOR_WHITE, " ");
  1547. SendClientMessage(playerid, 0xFFFF00FF, "|______________ Créditos ______________|");
  1548. SendClientMessage(playerid, VERDE, "Game Mode Criado do 0(zero) por jonas_OwNer Dono do BGL");
  1549. SendClientMessage(playerid, VERDE, "Game Mode Iniciado no dia 6 de Março de 2011 a Noite");
  1550. return 1;
  1551. }
  1552. if(strcmp(cmd, "/rg", true) == 0)
  1553. {
  1554. new atext[20];
  1555. if(PlayerInfo[playerid][pEmprego] == 0) { atext = "Desempregado"; }
  1556. else if(PlayerInfo[playerid][pEmprego] == 1) { atext = "Empregado"; }
  1557. new atext2[20];
  1558. if(PlayerInfo[playerid][pOrigem] == 0) { atext2 = "San Fierro"; }
  1559. SendClientMessage(playerid, COLOR_WHITE, " ");
  1560. SendClientMessage(playerid, COLOR_WHITE, " ");
  1561. SendClientMessage(playerid, COLOR_WHITE, " ");
  1562. SendClientMessage(playerid, COLOR_WHITE, " ");
  1563. SendClientMessage(playerid, COLOR_WHITE, " ");
  1564. SendClientMessage(playerid, COLOR_WHITE, " ");
  1565. SendClientMessage(playerid, 0xFFFF00FF, "|__________________RG__________________|");
  1566. format(gstring, sizeof(gstring), "Nivel:[%d] Dinheiro:[R$%d] AdmLevel:[%d]", PlayerInfo[playerid][pLevel],GetPlayerMoneyEx(playerid),PlayerInfo[playerid][pAdmin]);
  1567. SendClientMessage(playerid, COLOR_AZULBB,gstring);
  1568. format(gstring, sizeof(gstring), "Cargo:[%d] Horas Jogadas:[%d] Origem:[%s]", PlayerInfo[playerid][pCargo],PlayerInfo[playerid][pHorasjogadas],atext2);
  1569. SendClientMessage(playerid, COLOR_AZULBB,gstring);
  1570. format(gstring, sizeof(gstring), "Matou:[%d] Morreu:[%d] Emprego:[%s]", PlayerInfo[playerid][pMatou],PlayerInfo[playerid][pMorreu],atext);
  1571. SendClientMessage(playerid, COLOR_AZULBB,gstring);
  1572. format(gstring, sizeof(gstring), "Maconha:[%d] Cocaina:[%d] Crack:[%d]", PlayerInfo[playerid][pMaconha],PlayerInfo[playerid][pCocaina],PlayerInfo[playerid][pCrack]);
  1573. SendClientMessage(playerid, COLOR_AZULBB,gstring);
  1574. return 1;
  1575. }
  1576. if(strcmp(cmd, "/gmx", true) == 0 || strcmp(cmd, "/restart", true) == 0)
  1577. {
  1578. if(IsPlayerConnected(playerid))
  1579. {
  1580. if(PlayerInfo[playerid][pAdmin] > 1337)
  1581. {
  1582. if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341) { return SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)"); }
  1583. for(new i = 0; i < MAX_PLAYERS; i++)
  1584. {
  1585. if(IsPlayerConnected(i))
  1586. { SavePlayerConfig(i); }
  1587. }
  1588. GameModeExitFunc();
  1589. }
  1590. else
  1591. {
  1592. SendClientMessage(playerid, COLOR_GRAD1, "Você não tem autorização para dar GMX!");
  1593. }
  1594. }
  1595. return 1;
  1596. }
  1597. if(strcmp(cmdtext, "/trabalhar", true) == 0)
  1598. {
  1599. if(PlayerInfo[playerid][pAdmin] >= 1)
  1600. {
  1601. if(admtrampando[playerid] > 0)
  1602. {
  1603. admtrampando[playerid] = 0;
  1604. GetPlayerName(playerid,sendername,sizeof(sendername));
  1605. SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso da Administração ______________|");
  1606. format(string, 128, "Admin: %s ID(%d) está Jogando, Veja em /admins.",sendername, playerid);
  1607. SendClientMessageToAll(COLOR_DBLUE, string);
  1608. KillTimer(TempoAdministrador);
  1609. ResetPlayerWeapons(playerid);
  1610. SetPlayerHealth(playerid,100);
  1611. getdate(year, month, day);
  1612. gettime(hour,minute,second);
  1613. format(gstring, sizeof(gstring), "%s esta jogando [%d/%d/%d - %d:%d:%d]\n", PlayerName(playerid), day, month, year, hour, minute, second);
  1614. }
  1615. else
  1616. {
  1617. admtrampando[playerid] = 1;
  1618. GetPlayerName(playerid,sendername,sizeof(sendername));
  1619. SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso da Administração ______________|");
  1620. format(string, 128, "Admin: %s ID(%d) está Trabalhando, veja em /admins.",sendername, playerid);
  1621. SendClientMessageToAll(COLOR_DBLUE, string);
  1622. TempoAdministrador = SetTimerEx("Administrador", 100, true, "i", playerid);
  1623. SetPlayerSkin(playerid,217);
  1624. getdate(year, month, day);
  1625. gettime(hour,minute,second);
  1626. format(gstring, sizeof(gstring), "%s esta trabalhando [%d/%d/%d - %d:%d:%d]\n", PlayerName(playerid), day, month, year, hour, minute, second);
  1627. }
  1628. }
  1629. return 1;
  1630. }
  1631. return SendClientMessage(playerid, COLOR_LIGHTRED, "[BG]: Comando não reconhecido, digite /ajuda ou /relatorio e peça ajuda a uma Admin");
  1632. }
  1633. //=================== [ Quando o Player connecta no servidor ] ===========================
  1634. public OnPlayerConnect(playerid)
  1635. {
  1636. for(new i; i<sizeof(NicksProibidos); i++)
  1637. {
  1638. if(strcmp(NicksProibidos[i],pNome(playerid),true)==0)
  1639. {
  1640. SendClientMessage(playerid,COLOR_AZULBB,"Você está usando um nome que é proibido no Servidor");
  1641. Kick(playerid);
  1642. }
  1643. }
  1644. PlayerInfo[playerid][pVip] = 0;
  1645. PlayerInfo[playerid][pAdmin] = 0;
  1646. PlayerInfo[playerid][pSocio] = 0;
  1647. PlayerInfo[playerid][pMaconha] = 0;
  1648. PlayerInfo[playerid][pCrack] = 0;
  1649. PlayerInfo[playerid][pCocaina] = 0;
  1650. PlayerInfo[playerid][pLider] = 0;
  1651. PlayerInfo[playerid][pMembro] = 0;
  1652. PlayerInfo[playerid][pRespeito] = 0;
  1653. PlayerInfo[playerid][pOrigem] = 0;
  1654. PlayerInfo[playerid][pHorasjogadas] = 0;
  1655. PlayerInfo[playerid][pSkin] = 0;
  1656. PlayerInfo[playerid][pEmprego] = 0;
  1657. PlayerInfo[playerid][pTutorial] = 0;
  1658. PlayerInfo[playerid][pLocal] = 255;
  1659. PlayerPaintballing[playerid] = 0;
  1660. admtrampando[playerid] = 0;
  1661. gPlayerLogged[playerid] = 0;
  1662. gPlayerLogTries[playerid] = 0;
  1663. ConsumingMoney[playerid] = 0;
  1664. CurrentMoney[playerid] = 0;
  1665. PlayerInfo[playerid][pReg] = 0;
  1666. }
  1667. //=================== [ Quando o Player disconnecta do servidor ] ===========================
  1668. public OnPlayerDisconnect(playerid,reason)
  1669. {
  1670. new string[256];
  1671. switch(reason)
  1672. {
  1673. case 0: format(string, sizeof(string), "%s Saiu do server motivo: crash / Erro de Conexão", pNome(playerid));
  1674. case 1: format(string, sizeof(string), "%s Saiu do server motivo: por conta própria", pNome(playerid));
  1675. case 2: format(string, sizeof(string), "%s Saiu do server motivo: Kickado ou Banido", pNome(playerid));
  1676. }
  1677. ProxDetector(70.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  1678. return 1;
  1679. }
  1680. public OnPlayerRequestClass(playerid, classid)
  1681. {
  1682. new string[256];
  1683. SetPlayerInterior(playerid,1);
  1684. SetPlayerCameraPos(playerid, -751.7545,456.2780,1368.6179);
  1685. SetPlayerCameraLookAt(playerid, -788.8458,473.8009,1379.9878);
  1686. SendClientMessage(playerid,BroadCastColor," ");
  1687. SendClientMessage(playerid,BroadCastColor," ");
  1688. SendClientMessage(playerid,BroadCastColor," ");
  1689. SendClientMessage(playerid,BroadCastColor," ");
  1690. SendClientMessage(playerid,BroadCastColor," ");
  1691. SendClientMessage(playerid,BroadCastColor," ");
  1692. SendClientMessage(playerid,BroadCastColor," ");
  1693. SendClientMessage(playerid,BroadCastColor," ");
  1694. SendClientMessage(playerid,BroadCastColor," ");
  1695. SendClientMessage(playerid,BroadCastColor," ");
  1696. SendClientMessage(playerid,BroadCastColor," ");
  1697. SendClientMessage(playerid,BroadCastColor," ");
  1698. SendClientMessage(playerid,BroadCastColor," ");
  1699. SendClientMessage(playerid,BroadCastColor," ");
  1700. SendClientMessage(playerid,BroadCastColor," ");
  1701. SendClientMessage(playerid,BroadCastColor," ");
  1702. SendClientMessage(playerid,BroadCastColor," ");
  1703. SendClientMessage(playerid,BroadCastColor," ");
  1704. SendClientMessage(playerid,BroadCastColor," ");
  1705. SendClientMessage(playerid,BroadCastColor," ");
  1706. SendClientMessage(playerid,BroadCastColor," ");
  1707. SendClientMessage(playerid,BroadCastColor," ");
  1708. SendClientMessage(playerid,BroadCastColor," ");
  1709. SendClientMessage(playerid,BroadCastColor," ");
  1710. SendClientMessage(playerid,BroadCastColor," ");
  1711. SendClientMessage(playerid,BroadCastColor," ");
  1712. SendClientMessage(playerid,BroadCastColor," ");
  1713. SendClientMessage(playerid,BroadCastColor," ");
  1714. SendClientMessage(playerid,BroadCastColor," ");
  1715. SendClientMessage(playerid,BroadCastColor," ");
  1716. SendClientMessage(playerid,BroadCastColor," ");
  1717. SendClientMessage(playerid,BroadCastColor," ");
  1718. SendClientMessage(playerid,BroadCastColor," ");
  1719. SendClientMessage(playerid,BroadCastColor," ");
  1720. SendClientMessage(playerid,BroadCastColor," ");
  1721. SendClientMessage(playerid,BroadCastColor," ");
  1722. SendClientMessage(playerid,BroadCastColor," ");
  1723. SendClientMessage(playerid,BroadCastColor," ");
  1724. SendClientMessage(playerid,BroadCastColor," ");
  1725. SendClientMessage(playerid,BroadCastColor," ");
  1726. SendClientMessage(playerid,BroadCastColor," ");
  1727. SendClientMessage(playerid,BroadCastColor," ");
  1728. SendClientMessage(playerid,BroadCastColor," ");
  1729. SendClientMessage(playerid,BroadCastColor," ");
  1730. SendClientMessage(playerid,BroadCastColor," ");
  1731. SendClientMessage(playerid,BroadCastColor," ");
  1732. SendClientMessage(playerid,BroadCastColor," ");
  1733. SendClientMessage(playerid,BroadCastColor," ");
  1734. SendClientMessage(playerid,BroadCastColor," ");
  1735. SendClientMessage(playerid,BroadCastColor," ");
  1736. SendClientMessage(playerid,BroadCastColor," ");
  1737. SendClientMessage(playerid,BroadCastColor," ");
  1738. SendClientMessage(playerid,BroadCastColor," ");
  1739. SendClientMessage(playerid,BroadCastColor," ");
  1740. SendClientMessage(playerid,BroadCastColor," ");
  1741. SendClientMessage(playerid,BroadCastColor," ");
  1742. SendClientMessage(playerid,BroadCastColor," ");
  1743. SendClientMessage(playerid,BroadCastColor," ");
  1744. SendClientMessage(playerid,BroadCastColor," ");
  1745. SendClientMessage(playerid,BroadCastColor," ");
  1746. SendClientMessage(playerid,BroadCastColor," ");
  1747. SendClientMessage(playerid,BroadCastColor," ");
  1748. SendClientMessage(playerid,BroadCastColor," ");
  1749. SendClientMessage(playerid,BroadCastColor," ");
  1750. SendClientMessage(playerid,BroadCastColor," ");
  1751. SendClientMessage(playerid,BroadCastColor," ");
  1752. SendClientMessage(playerid,BroadCastColor," ");
  1753. SendClientMessage(playerid,BroadCastColor," ");
  1754. SendClientMessage(playerid,BroadCastColor," ");
  1755. SendClientMessage(playerid,BroadCastColor," ");
  1756. SendClientMessage(playerid,BroadCastColor," ");
  1757. SendClientMessage(playerid,BroadCastColor," ");
  1758. GameTextForPlayer(playerid,"~g~Seja bem vindo~n~~w~ao~n~~y~[RPG] Brasil [4]ever",5000,6);
  1759. GetPlayerName(playerid,PlayerInfo[playerid][pName],40);
  1760. if(PlayerInfo[playerid][pLoged] == 0)
  1761. {
  1762. new FilePath[256];
  1763. format(FilePath, sizeof(FilePath), "%s.ini",PlayerInfo[playerid][pName]);
  1764. if(dini_Exists(FilePath)) format(string,sizeof(string),"Seja bem vindo %s.\nInsira sua senha:",PlayerInfo[playerid][pName]),ShowPlayerDialog(playerid,DialogoLogar,1,"Login",string,"Logar","Sair");
  1765. else if(!dini_Exists(FilePath))
  1766. {
  1767. SendClientMessage(playerid,BroadCastColor2,"Caso você já seja registrado, o servidor tornou-se Case Sensitive (Diferencia letra Minuscula de Maiuscula)");
  1768. SendClientMessage(playerid,BroadCastColor2,"Ou seja se você se registrou: MeU_NiCk, Você deve logar-se com: MeU_NiCk.");
  1769. format(string,sizeof(string),"Seja bem vindo %s.\nRegistre-se abaixo com uma senha:",PlayerInfo[playerid][pName]);
  1770. //PlayerSave(playerid);
  1771. ShowPlayerDialog(playerid,DialogoRegistrar,1,"Registrar",string,"Registrar","Sair");
  1772. }
  1773. }
  1774. else SpawnPlayer(playerid);
  1775.  
  1776. return 1;
  1777. }
  1778. stock encodepass(buf[])
  1779. {
  1780. new length=strlen(buf);
  1781. new s1 = 1;
  1782. new s2 = 0;
  1783. new n;
  1784. for (n=0; n<length; n++)
  1785. {
  1786. s1 = (s1 + buf[n]) % 65521;
  1787. s2 = (s2 + s1) % 65521;
  1788. }
  1789. return (s2 << 16) + s1;
  1790. }
  1791. public GameModeExitFunc()
  1792. {
  1793. GameTextForAll("~g~Restart",5000,6);
  1794. TextDrawHideForAll(txtTimeDisp);
  1795. TextDrawDestroy(txtTimeDisp);
  1796. TextDrawHideForAll(txtDateDisp);
  1797. TextDrawDestroy(txtDateDisp);
  1798. GameModeExit();
  1799. }
  1800. public MessageAdmins(COLOR,const string[],level)
  1801. {
  1802. for(new i = 0; i < MAX_PLAYERS; i++)
  1803. {
  1804. if(IsPlayerConnected(i))
  1805. {
  1806. if (PlayerInfo[i][pAdmin] >= level)
  1807. {
  1808. SendClientMessage(i, COLOR, string);
  1809. printf("%s", string);
  1810. }
  1811. }
  1812. }
  1813. return 1;
  1814. }
  1815. stock TentouDivulgar(string[])
  1816. {
  1817. new x=0;
  1818. for (new i = 0, j = strlen(string); i <= j; i++)
  1819. {
  1820. if (string[i] >= 46 && string[i] <= 58)
  1821. {
  1822. x+=1;
  1823. }
  1824. }
  1825. if(x >= 8) return 1;
  1826. return 0;
  1827. }
  1828. public OnPlayerDeath(playerid, killerid, reason)
  1829. {
  1830. if(PlayerPaintballing[killerid] == 0)
  1831. {
  1832. SetPlayerCriminal(killerid, 255, "Assasinato");
  1833. PlayerInfo[killerid][pMatou] += 1;
  1834. }
  1835. }
  1836. public SetPlayerCriminal(playerid,declare,reason[])
  1837. {
  1838. if(IsPlayerConnected(playerid))
  1839. {
  1840. new turned[MAX_PLAYER_NAME];
  1841. new turner[MAX_PLAYER_NAME];
  1842. strmid(PlayerCrime[playerid][pAccusedof], reason, 0, strlen(reason), 255);
  1843. GetPlayerName(playerid, turned, sizeof(turned));
  1844. if (declare == 255)
  1845. {
  1846. format(turner, sizeof(turner), "Câmeras de Segurança");
  1847. strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
  1848. }
  1849. }
  1850. }
  1851. forward ProcessGameTime();
  1852. public ProcessGameTime()
  1853. {
  1854. new string[128];
  1855. gettime(i_ServerHours, i_ServerMinutes, i_ServerSeconds);
  1856. getdate(i_ServerYears, i_ServerMonths, i_ServerDays);
  1857. format(string, sizeof string, "%02d:%02d:%02d", i_ServerHours, i_ServerMinutes, i_ServerSeconds);
  1858. TextDrawSetString(txtTimeDisp, string);
  1859. format(string, sizeof string, "%02d/%02d/%04d", i_ServerDays, i_ServerMonths, i_ServerYears);
  1860. TextDrawSetString(txtDateDisp, string);
  1861. SetWorldTime(i_ServerHours);
  1862. for(new i = 0; i < MAX_PLAYERS; i++)SetPlayerTime(i, i_ServerHours, i_ServerMinutes);
  1863. }
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885. stock GetPlayerMoneyEx(playerid)return playermoney[playerid];
  1886. stock ResetPlayerMoneyEx(playerid)return playermoney[playerid] = 0;
  1887. stock GivePlayerMoneyEx(playerid, ammount)return playermoney[playerid] += ammount;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement