Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.04 KB | None | 0 0
  1. /**
  2. * Copyright (c) 2015-2016 San Andreas Playground
  3. *
  4. * This program is free software: you can redistribute it and/or modify it under the terms of the
  5. * GNU General Public License as published by the Free Software Foundation, either version 3 of the
  6. * License, or (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
  9. * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. * General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License along with this program.
  13. * If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. static mysql;
  16.  
  17. public OnPlayerConnect(playerid)
  18. {
  19. for(new i = 0; i < 50; i++) SendClientMessage(playerid, COLOR_WHITE,"");
  20.  
  21. //PlayAudioStreamForPlayer(playerid, "http://xsfserver.com/music/xSFLogin.mp3");
  22. PlayAudioStreamForPlayer(playerid, "http://radio-sap.byethost4.com/Streaming/login.mp3");
  23. SendClientMessage(playerid, COLOR_GOLD, "[SAP] : Welcome To San Andreas Playground");
  24. SendClientMessage(playerid, COLOR_ORANGE, "[SAP] : You Can use /cmds for see Commands");
  25. SendClientMessage(playerid, COLOR_ORANGE, "[SAP] : I Hope you like we Server" );
  26. SendClientMessage(playerid, COLOR_ORANGE, "[SAP] : Enjoy !");
  27. SetPlayerColor(playerid, PlayerColors[playerid]);
  28.  
  29. new pname[250];
  30. GetPlayerName(playerid, pname, sizeof(pname));
  31. new string[280];
  32. format(string,sizeof(string), "**%s(%d) Has joined San Andreas Playground", pname, playerid);
  33. SendClientMessageToAll(COLOR_RED, string);
  34. SetPlayerColor(playerid, 0xFFFF00AA);
  35. SetPlayerMapIcon(playerid, 12, 1481.283813, -1770.431152, 18.795755, 52, 1);
  36.  
  37. new joinMsg[128], name[MAX_PLAYER_NAME];
  38. GetPlayerName(playerid, name, sizeof(name));
  39. format(joinMsg, sizeof(joinMsg), "02[%d] 03*** %s has joined San Andreas Playground.", playerid, name);
  40. IRC_GroupSay(groupID, IRC_ECHO, joinMsg);
  41.  
  42. Enabled[playerid] = 1;
  43. Pers[playerid] = 1655;
  44.  
  45. LoadDuelSpecTextdraw(playerid);
  46. ResetDuelInvites(playerid);
  47. SetPVarInt(playerid, "DuelDID", -1);
  48. InDuel[playerid] = 0;
  49. speeding[playerid] = false;
  50.  
  51. // ../Maps Required
  52. RemoveBuildingForPlayer(playerid, 3369, 349.8750, 2438.2500, 15.4766, 0.25);
  53. RemoveBuildingForPlayer(playerid, 3369, 242.3984, 2438.2500, 15.4766, 0.25);
  54. RemoveBuildingForPlayer(playerid, 3367, 296.1406, 2438.2500, 15.4766, 0.25);
  55. RemoveBuildingForPlayer(playerid, 16598, 231.2813, 2545.7969, 20.0234, 0.25);
  56. RemoveBuildingForPlayer(playerid, 16602, 307.9531, 2543.4531, 20.3984, 0.25);
  57. RemoveBuildingForPlayer(playerid, 3269, 242.3984, 2438.2500, 15.4766, 0.25);
  58. RemoveBuildingForPlayer(playerid, 16599, 231.2813, 2545.7969, 20.0234, 0.25);
  59. RemoveBuildingForPlayer(playerid, 16098, 307.9531, 2543.4531, 20.3984, 0.25);
  60. RemoveBuildingForPlayer(playerid, 3271, 296.1406, 2438.2500, 15.4766, 0.25);
  61. RemoveBuildingForPlayer(playerid, 3269, 349.8750, 2438.2500, 15.4766, 0.25);
  62. RemoveBuildingForPlayer(playerid, 10109, -1660.6875, 1358.9766, 12.2031, 0.25);
  63. RemoveBuildingForPlayer(playerid, 10141, -1421.6250, 1490.8594, 6.9688, 0.25);
  64. RemoveBuildingForPlayer(playerid, 728, -1498.1172, 1380.9688, 1.4922, 0.25);
  65. RemoveBuildingForPlayer(playerid, 728, -1499.1719, 1376.1328, 1.4922, 0.25);
  66. RemoveBuildingForPlayer(playerid, 728, -1501.1484, 1370.2734, 1.4922, 0.25);
  67. RemoveBuildingForPlayer(playerid, 728, -1508.8672, 1370.6641, 1.4922, 0.25);
  68. RemoveBuildingForPlayer(playerid, 728, -1513.2422, 1371.4453, 1.4922, 0.25);
  69. RemoveBuildingForPlayer(playerid, 728, -1514.3281, 1376.4453, 1.4922, 0.25);
  70. RemoveBuildingForPlayer(playerid, 728, -1511.1719, 1375.4844, 1.4922, 0.25);
  71. RemoveBuildingForPlayer(playerid, 10229, -1421.8750, 1489.4453, 5.8203, 0.25);
  72. RemoveBuildingForPlayer(playerid, 10230, -1421.6250, 1490.8594, 6.9688, 0.25);
  73. RemoveBuildingForPlayer(playerid, 10231, -1422.5391, 1489.3516, 8.4531, 0.25);
  74. RemoveBuildingForPlayer(playerid, 10286, -1602.0000, 1323.5859, -6.2500, 0.25);
  75. RemoveBuildingForPlayer(playerid, 1216, -1696.6875, 1334.4766, 6.8828, 0.25);
  76. RemoveBuildingForPlayer(playerid, 1496, -1673.1016, 1336.3125, 6.1797, 0.25);
  77. RemoveBuildingForPlayer(playerid, 9904, -1660.6875, 1358.9766, 12.2031, 0.25);
  78. RemoveBuildingForPlayer(playerid, 1232, -1649.9609, 1318.2422, 8.8047, 0.25);
  79. RemoveBuildingForPlayer(playerid, 1232, -1629.5781, 1297.1406, 8.8047, 0.25);
  80. RemoveBuildingForPlayer(playerid, 10183, -1643.0469, 1302.6094, 6.1016, 0.25);
  81. RemoveBuildingForPlayer(playerid, 10166, -1602.0000, 1323.5859, -6.2500, 0.25);
  82. RemoveBuildingForPlayer(playerid, 10140, -1406.9063, 1489.8047, 7.1250, 0.25);
  83. RemoveBuildingForPlayer(playerid, 10227, -1376.7500, 1490.6328, 12.0234, 0.25);
  84. RemoveBuildingForPlayer(playerid, 10226, -1377.2344, 1491.6250, 6.2109, 0.25);
  85. RemoveBuildingForPlayer(playerid, 4257, -1499.9609, 1452.5156, -49.7188, 0.25);
  86. RemoveBuildingForPlayer(playerid, 4391, -1499.9609, 1452.5156, -49.7188, 0.25);
  87.  
  88. hsound[playerid] = 0;
  89. Info[playerid][indm] = 0;
  90. killstreak[playerid] = 0;
  91.  
  92. new File:file = fopen("bans.cfg", io_readwrite), buf[128];
  93. new date[3], banreason[128], banmsg[3][24];
  94. while(fread(file, buf))
  95. {
  96. if(strfind(buf, RPN(playerid), false) != -1 && strfind(buf, RPIP(playerid), false) != -1)
  97. {
  98. sscanf(buf, "p<|>s[24]s[16]s[24]s[128]iii", banmsg[0], banmsg[1], banmsg[2], banreason, date[0], date[1], date[2]);
  99. if(!strcmp(banmsg[0], RPN(playerid), false, strlen(RPN(playerid))) && !strcmp(banmsg[0], RPN(playerid), false, strlen(RPN(playerid))))
  100. {
  101. SendClientMessage(playerid, COLOR_RED, "----------- Ban Information -----------");
  102. format(string, sizeof(string), "{42EB00}The username {FF0000}%s {42EB00}(IP Address: {FF0000}%s{42EB00}) is banned from this server.", banmsg[0], banmsg[1]);
  103. SendClientMessage(playerid, COLOR_WHITE, string);
  104. format(string, sizeof(string), "{42EB00}You have been banned by {FF0000}%s {42EB00}for {FF0000}%s.", banmsg[2], banreason);
  105. SendClientMessage(playerid, COLOR_WHITE, string);
  106. format(string ,sizeof(string), "{42EB00}The date of banning is {FF0000}%i{42EB00}/{FF0000}%i{42EB00}/{FF0000}%i", date[0], date[1], date[2]);
  107. SendClientMessage(playerid, COLOR_WHITE, string);
  108. SendClientMessage(playerid, COLOR_WHITE, "{42EB00}If you feel that you have been banned wrongly, contact an Administrator. or post a ban appeal in forum ");
  109. SendClientMessage(playerid, COLOR_WHITE, "{42EB00} Website : saplayground.ml");
  110. SendClientMessage(playerid, COLOR_RED, "--------------------------------------------");
  111. SetTimerEx("DelayedKick", 100, 0, "i", playerid);
  112. fclose(file);
  113. return 1;
  114. }
  115. }
  116. else if(strfind(buf, RPN(playerid), false) != -1)
  117. {
  118. sscanf(buf, "p<|>s[24]s[24]s[128]iii", banmsg[0], banmsg[1], banreason, date[0], date[1], date[2]);
  119. if(!strcmp(banmsg[0], RPN(playerid), false, strlen(banmsg[0])) && !strcmp(banmsg[0], RPN(playerid), false, strlen(RPN(playerid))))
  120. {
  121. SendClientMessage(playerid, COLOR_RED, "----------- Ban Information -----------");
  122. format(string, sizeof(string), "{42EB00}The username {FF0000}%s {42EB00}is banned from this server.", banmsg[0]);
  123. SendClientMessage(playerid, COLOR_WHITE, string);
  124. format(string, sizeof(string), "{42EB00}You have been banned by {FF0000}%s {42EB00}for {FF0000}%s.", banmsg[1], banreason);
  125. SendClientMessage(playerid, COLOR_WHITE, string);
  126. format(string ,sizeof(string), "{42EB00}The date of banning is {FF0000}%i{42EB00}/{FF0000}%i{42EB00}/{FF0000}%i", date[0], date[1], date[2]);
  127. SendClientMessage(playerid, COLOR_WHITE, string);
  128. SendClientMessage(playerid, COLOR_WHITE, "{42EB00}If you feel that you have been banned wrongly, post a ban appeal in forum .");
  129. SendClientMessage(playerid, COLOR_WHITE, "{42EB00} Website : saplayground.ml");
  130. SendClientMessage(playerid, COLOR_RED, "--------------------------------------------");
  131. getdate(date[2], date[1], date[0]);
  132. format(string, sizeof(string), "%s|The Server|Ban Evasion(%s)|%i|%i|%i\r\n", RPIP(playerid), RPN(playerid), date[0], date[1], date[2]);
  133. fclose(file);
  134. file = fopen("bans.cfg", io_append);
  135. fwrite(file, string);
  136. fclose(file);
  137. SetTimerEx("DelayedKick", 100, 0, "i", playerid);
  138. return 1;
  139. }
  140. }
  141. else if(strfind(buf, RPIP(playerid), false) != -1)
  142. {
  143. sscanf(buf, "p<|>s[16]s[24]s[128]iii", banmsg[0], banmsg[1], banreason, date[0], date[1], date[2]);
  144. SendClientMessage(playerid, COLOR_RED, "----------- Ban Information -----------");
  145. format(string, sizeof(string), "{42EB00}The IP Address {FF0000}%s {42EB00}is banned from this server.", banmsg[0]);
  146. SendClientMessage(playerid, COLOR_WHITE, string);
  147. format(string, sizeof(string), "{42EB00}You have been banned by {FF0000}%s {42EB00}for {FF0000}%s.", banmsg[1], banreason);
  148. SendClientMessage(playerid, COLOR_WHITE, string);
  149. format(string ,sizeof(string), "{42EB00}The date of banning is {FF0000}%i{42EB00}/{FF0000}%i{42EB00}/{FF0000}%i", date[0], date[1], date[2]);
  150. SendClientMessage(playerid, COLOR_WHITE, string);
  151. SendClientMessage(playerid, COLOR_WHITE, "{42EB00}If you feel that you have been banned wrongly, contact an Administrator.");
  152. SendClientMessage(playerid, COLOR_RED, "--------------------------------------------");
  153. getdate(date[2], date[1], date[0]);
  154. format(string, sizeof(string), "%s|The Server|Ban Evasion(%s)|%i|%i|%i\r\n", RPN(playerid), RPIP(playerid), date[0], date[1], date[2]);
  155. fclose(file);
  156. file = fopen("bans.cfg", io_append);
  157. fwrite(file, string);
  158. fclose(file);
  159. SetTimerEx("DelayedKick", 100, 0, "i", playerid);
  160. return 1;
  161. }
  162. }
  163. Spec[playerid] = -1;
  164. aInfo[playerid][aLogged] = 0;
  165. new query[128];
  166. mysql_format(mysql, query, sizeof(query), "SELECT * FROM `Admins` WHERE `Username`='%e' LIMIT 1", RPN(playerid));
  167. mysql_tquery(mysql, query, "AdminCheck", "i", playerid);
  168.  
  169. return 1;
  170. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement