Advertisement
Guest User

Untitled

a guest
Feb 14th, 2015
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.50 KB | None | 0 0
  1. #define DIALOG_RULES2 12
  2. public OnPlayerConnect(playerid)
  3. {
  4. KillTimer(UserTimer[playerid]);
  5. Info[playerid][Favouriteskin] = -1;
  6. Daysalive[playerid] = 0;
  7. PlayerInfo[playerid][pAdmin] = 0;
  8. PlayerInfo[playerid][pKills] = 0;
  9. PlayerInfo[playerid][pDeaths] = 0;
  10. PlayerInfo[playerid][pCash] = 0;
  11. LPinfo[playerid][Score] = 0;
  12. LPinfo[playerid][Drugs] = 0;
  13. LPinfo[playerid][Adre] = 0;
  14. Info[playerid][VIPLevel] = 0;
  15. BankMoney[playerid] = 0;
  16. Daysalive[playerid] = 0;
  17. Info[playerid][MissionsCompleted] = 0;
  18. Info[playerid][MissionsFailed] = 0;
  19. Info[playerid][Robbed] = 0;
  20. Info[playerid][MaximumRobbed] = 0;
  21. Info[playerid][Muted] = 0;
  22. Info[playerid][Jailed] = 0;
  23. Info[playerid][MuteWarnings] = 0;
  24. Info[playerid][MaxMuteWarnings] = 0;
  25. Info[playerid][Warnings] = 0;
  26. Info[playerid][TimesKicked] = 0;
  27. Info[playerid][EventsWon] = 0;
  28. Info[playerid][EventsLost] = 0;
  29. Info[playerid][StartingMusic] = 0;
  30. PlayerAlreadyLoggedIn[playerid] = 0;
  31. PlayerAlreadyRegisteredIn[playerid] = 0;
  32. Info[playerid][Logged] = 0;
  33. Info[playerid][Registered] = 0;
  34. Info[playerid][Respect] = 0;
  35. Autouseskin[playerid] = 0;
  36. playervehicle[playerid] = -1;
  37. fskillid[playerid] = 4;
  38. new string[64], pName2[MAX_PLAYER_NAME];
  39. GetPlayerName(playerid,pName2,MAX_PLAYER_NAME);
  40. format(string,sizeof string,"%s (%d) Has Joined The Server.",pName2,playerid);
  41. new plrIP[16];
  42. GetPlayerIp(playerid, plrIP, sizeof(plrIP));
  43. foreach(Player, i)
  44. {
  45. if(PlayerInfo[playerid][pAdmin] > 0)
  46. {
  47. format(string,sizeof string,"%s (%d) Has Joined The Server. [%s]",pName2,playerid,plrIP);
  48. SendClientMessage(i,0xBFFF00AA,string);
  49. }
  50. }
  51. GameTextForPlayer(playerid, "Welcome To The Los Santos Gang War Server", 5000, 4);
  52. ShowPlayerDialog(playerid, DIALOG_RULES2, DIALOG_STYLE_MSGBOX, "Server Rules", "1- No Cheating\n2- No Spamming\n3- Slide Bug Is Not Allowed And C Bug Too\n4- No Rule Breaking\n5- No G Abuse\n6- No Advertising\n7- Teleport Abuse Is Not Allowed\n8- Weapon Mods Are Allowed Only\n9- Respect Player Especially Admins\n10- Scamming Is Not Allowed\n11- Aimbot Is Not Allowed\n12- Don't Try To Climb Up Over The Freeroam Walls If You Are(not) In Freeroam Mod\n\nDo You Agree The Server Rules?", "Yes", "No");
  53. SetPlayerColor(playerid, 0xB0B0B0FF);
  54. SendClientMessageToAll(0xAFAFAFAA,string);
  55. SendClientMessage(playerid,-1,"Welcome To The {FFEA00}LOS SANTOS GANG WARS{FFFFFF} Version 10.8! Please Enjoy Your Stay.");
  56. SendClientMessage(playerid,-1,"We Made An Effective Anti Cheat, And Some Bugs have been Fixed. Full List: /updates");
  57. SendClientMessage(playerid, 0xFF0000AA, "NOTE: Use /music If When Connecting Music Making Lag To Turn It Off/On.");
  58. if(fexist(UserPath(playerid)))
  59. {
  60. INI_ParseFile(UserPath(playerid), "UserLoad_%s", .bExtra = true, .extra = playerid); // the same thing
  61. if(Info[playerid][Banned] == 1)
  62. {
  63. KickCommandWithMessage(playerid, 0xFF0000AA, "You Are Banned From This Server!");
  64. SendClientMessage(playerid, 0xFFC400AA, "If You Feel That You Are Wrongly Banned Feel Free To Post An Appeal In Forum: lsgangwars.createaforum.com");
  65. format(string,sizeof string,"%s (%d) Has Been Kicked | Reason: Account Banned.", pName2, playerid);
  66. SendClientMessageToAll(0xFFC400AA, string);
  67. }
  68. } // This get's the length of the player name
  69. new HouseID, HouseSlot, Name2[24];
  70.  
  71. // Get the player's name
  72. GetPlayerName(playerid, Name2, sizeof(Name2));
  73.  
  74. // Loop through all houses to find the ones which belong to this player
  75. for___loop (HouseID = 1; HouseID < MAX_HOUSES; HouseID++)
  76. {
  77. // Check if the house exists
  78. if (IsValidDynamicPickup(AHouseData[HouseID][PickupID]))
  79. {
  80. // Check if the house is owned
  81. if (AHouseData[HouseID][Owned] == true)
  82. {
  83. // Check if the player is the owner of the house
  84. if (strcmp(AHouseData[HouseID][Owner], Name2, false) == 0)
  85. {
  86. // Add the HouseID to the player's account for faster reference later on
  87. APlayerData[playerid][Houses][HouseSlot] = HouseID;
  88.  
  89. // Load housecars if they weren't loaded at FilterscriptInit
  90. if (LoadCarsDuringFSInit == false)
  91. HouseFile_LoadCars(HouseID);
  92.  
  93. // Select the next HouseSlot
  94. HouseSlot++;
  95. }
  96. }
  97. }
  98. }
  99. pmInfo[playerid][Last] = -1;
  100. pmInfo[playerid][NoPM] = 0;
  101. PlayerAlreadyLoggedIn[playerid] = 0;
  102. PlayerAlreadyRegisteredIn[playerid] = 0;
  103. if(Info[playerid][StartingMusic] == 0)
  104. {
  105. PlayAudioStreamForPlayer(playerid, "http://a.tumblr.com/tumblr_mno5ngNHLW1qmj9voo1.mp3");
  106. }
  107. PlayerDualWatching[playerid] = 0;
  108. InventationSent[playerid] = -1;
  109. Inventation[playerid] = -1;
  110. InDual[playerid] = 0;
  111. Inventationprice[playerid] = 0;
  112. format(string,sizeof(string),"FPS: %d Ping: %d",GetPlayerFPS(playerid),GetPlayerPing(playerid));
  113. FPSCount = CreatePlayerTextDraw(playerid,500.000000, 6.000000,string);
  114. PlayerTextDrawAlignment(playerid,FPSCount,0);
  115. PlayerTextDrawBackgroundColor(playerid,FPSCount, 255);
  116. PlayerTextDrawFont(playerid,FPSCount, 1);
  117. PlayerTextDrawLetterSize(playerid,FPSCount, 0.34567, 1.1452);
  118. PlayerTextDrawColor(playerid,FPSCount, -1);
  119. PlayerTextDrawSetOutline(playerid,FPSCount, 1);
  120. PlayerTextDrawUseBox(playerid,FPSCount,1);
  121. PlayerTextDrawBoxColor(playerid,FPSCount,0x00000054);
  122. PlayerTextDrawShow(playerid,FPSCount);
  123. PlayerDat[playerid][InGang] = 0;
  124. GangManager[playerid] = 0;
  125. Textdraw000[playerid] = CreatePlayerTextDraw(playerid,22.000000, 172.000000, "Respect:");
  126. PlayerTextDrawBackgroundColor(playerid,Textdraw000[playerid], 255);
  127. PlayerTextDrawFont(playerid,Textdraw000[playerid], 0);
  128. PlayerTextDrawLetterSize(playerid,Textdraw000[playerid], 0.480000, 1.200000);
  129. PlayerTextDrawColor(playerid,Textdraw000[playerid], 16777215);
  130. PlayerTextDrawSetOutline(playerid,Textdraw000[playerid], 1);
  131. PlayerTextDrawSetProportional(playerid,Textdraw000[playerid], 1);
  132.  
  133. Textdraw111[playerid] = CreatePlayerTextDraw(playerid,22.000000, 197.000000, "Adrenaline Pills:");
  134. PlayerTextDrawBackgroundColor(playerid,Textdraw111[playerid], 255);
  135. PlayerTextDrawFont(playerid,Textdraw111[playerid], 0);
  136. PlayerTextDrawLetterSize(playerid,Textdraw111[playerid], 0.490000, 1.200000);
  137. PlayerTextDrawColor(playerid,Textdraw111[playerid], 16777215);
  138. PlayerTextDrawSetOutline(playerid,Textdraw111[playerid], 1);
  139. PlayerTextDrawSetProportional(playerid,Textdraw111[playerid], 1);
  140.  
  141. Textdraw222[playerid] = CreatePlayerTextDraw(playerid,22.000000, 222.000000, "Grams Of Drugs:");
  142. PlayerTextDrawBackgroundColor(playerid,Textdraw222[playerid], 255);
  143. PlayerTextDrawFont(playerid,Textdraw222[playerid], 0);
  144. PlayerTextDrawLetterSize(playerid,Textdraw222[playerid], 0.490000, 1.200000);
  145. PlayerTextDrawColor(playerid,Textdraw222[playerid], 16777215);
  146. PlayerTextDrawSetOutline(playerid,Textdraw222[playerid], 1);
  147. PlayerTextDrawSetProportional(playerid,Textdraw222[playerid], 1);
  148.  
  149. Textdraw333[playerid] = CreatePlayerTextDraw(playerid,509.000000, 242.000000, "Ratio:");
  150. PlayerTextDrawBackgroundColor(playerid,Textdraw333[playerid], 255);
  151. PlayerTextDrawFont(playerid,Textdraw333[playerid], 0);
  152. PlayerTextDrawLetterSize(playerid,Textdraw333[playerid], 0.539999, 1.600000);
  153. PlayerTextDrawColor(playerid,Textdraw333[playerid], -16776961);
  154. PlayerTextDrawSetOutline(playerid,Textdraw333[playerid], 1);
  155. PlayerTextDrawSetProportional(playerid,Textdraw333[playerid], 1);
  156.  
  157. Textdraw444[playerid] = CreatePlayerTextDraw(playerid,64.000000, 427.000000, "Location");
  158. PlayerTextDrawBackgroundColor(playerid,Textdraw444[playerid], 255);
  159. PlayerTextDrawFont(playerid,Textdraw444[playerid], 1);
  160. PlayerTextDrawLetterSize(playerid,Textdraw444[playerid], 0.179998, 1.200000);
  161. PlayerTextDrawColor(playerid,Textdraw444[playerid], -16711681);
  162. PlayerTextDrawSetOutline(playerid,Textdraw444[playerid], 1);
  163. PlayerTextDrawSetProportional(playerid,Textdraw444[playerid], 1);
  164. if(dini_Exists(pFile(playerid)))
  165. {
  166. LoginPlayer(playerid);
  167. }
  168. else
  169. {
  170. CreateFile(playerid);
  171. }
  172. FPSTimer[playerid] = SetTimerEx("GetPlayerFPS",100,1,"d",playerid);
  173. UpdateText[playerid] = SetTimerEx("FPSPingUpdate",99,1,"d",playerid);
  174. GangApproved[playerid] = 0;
  175. new gangplayername[MAX_PLAYER_NAME];
  176. GetPlayerName(playerid, gangplayername, MAX_PLAYER_NAME);
  177. if(PlayerDat[playerid][InGang] == 1)
  178. {
  179. new string2[128];
  180. new PlayerGangID = strval(dini_Get(pFile(playerid),"GangID"));
  181. format(string2, sizeof(string2), "The Gang Member Of %s [GangID: %d] %s (%d) Has Connected To The Server.", dini_Get(pFile(playerid),"GangName"), PlayerGangID, pName2, playerid);
  182. SendClientMessageToAll(0x09FF00FF, string2);
  183. }
  184. new NAME[MAX_PLAYER_NAME];
  185. GetPlayerName(playerid,NAME,sizeof(NAME));
  186. R_1[playerid] = TextDrawCreate(498.000000, 100.000000, " ");
  187. TextDrawBackgroundColor(R_1[playerid], 255);
  188. TextDrawFont(R_1[playerid], 2);
  189. TextDrawLetterSize(R_1[playerid], 0.250000, 0.899999);
  190. TextDrawColor(R_1[playerid], -1);
  191. TextDrawSetOutline(R_1[playerid], 0);
  192. TextDrawSetProportional(R_1[playerid], 1);
  193. TextDrawSetShadow(R_1[playerid], 1);
  194.  
  195. Stats[playerid] = TextDrawCreate(499.000000, 110.000000, "~r~Kills: ~w~0 ~g~Deaths: ~w~0");
  196. TextDrawBackgroundColor(Stats[playerid], 255);
  197. TextDrawFont(Stats[playerid], 2);
  198. TextDrawLetterSize(Stats[playerid], 0.159999, 1.000000);
  199. TextDrawColor(Stats[playerid], -1);
  200. TextDrawSetOutline(Stats[playerid], 0);
  201. TextDrawSetProportional(Stats[playerid], 1);
  202. TextDrawSetShadow(Stats[playerid], 1);
  203. SPEEDOS[playerid] = TextDrawCreate(10.0,200.0," ");
  204. TextDrawShowForPlayer(playerid,SPEEDOS[playerid]);
  205. HEALTH[playerid] = TextDrawCreate(10.0,180.0," ");
  206. TextDrawShowForPlayer(playerid,HEALTH[playerid]);
  207. SetPlayerZoneColor(playerid);
  208. ranktimers[playerid] = SetTimerEx("ranktimer", 3000, true, "d", playerid);
  209. antiarmourhack[playerid] = SetTimerEx("aantiarmourhack", 3000, true, "d", playerid);
  210. texttimers[playerid] = SetTimerEx("texttimer", 2000, true, "d", playerid);
  211. RemoveBuildingForPlayer(playerid, 1302, 0.0, 0.0, 0.0, 6000.0);
  212. RemoveBuildingForPlayer(playerid, 1209, 0.0, 0.0, 0.0, 6000.0);
  213. RemoveBuildingForPlayer(playerid, 955, 0.0, 0.0, 0.0, 6000.0);
  214. RemoveBuildingForPlayer(playerid, 956, 0.0, 0.0, 0.0, 6000.0);
  215. RemoveBuildingForPlayer(playerid, 1775, 0.0, 0.0, 0.0, 6000.0);
  216. RemoveBuildingForPlayer(playerid, 1776, 0.0, 0.0, 0.0, 6000.0);
  217. RemoveBuildingForPlayer(playerid, 1977, 0.0, 0.0, 0.0, 6000.0);
  218. return 1;
  219. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement