Advertisement
Guest User

fgfgfgfg

a guest
Dec 11th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.49 KB | None | 0 0
  1. public OnPlayerSpawn(playerid)
  2. {
  3. IsConnected[playerid] = 1;
  4. for(new i=0; i<10; i++)
  5. {
  6. ELC_AC_EnablePlayerCheatID(playerid,i,1);
  7. }
  8. previousHealthValue[playerid] = 0.0;
  9. hits[playerid] = 0;
  10. delayer[playerid] = false;
  11. afterSpawnCover[playerid] = true;
  12. SetTimerEx("RemoveSpawnCover", AFTER_SPAWN_COVER_TIME, false, "i", playerid);
  13. isDead[playerid] = false;
  14.  
  15. // On met les couleurs
  16. if(GetPlayerTeam(playerid) == JUSTICE)
  17. {
  18. SetPlayerColor(playerid,TEAM_1_COLOR);
  19. new Random = random(sizeof(JusticeSpawn));
  20. SetPlayerPos(playerid, JusticeSpawn[Random][0], JusticeSpawn[Random][1], JusticeSpawn[Random][2]);
  21. }
  22. if(GetPlayerTeam(playerid) == GROVE)
  23. {
  24. SetPlayerColor(playerid,TEAM_2_COLOR);
  25. new Random = random(sizeof(GroveSpawn));
  26. SetPlayerPos(playerid, GroveSpawn[Random][0], GroveSpawn[Random][1], GroveSpawn[Random][2]);
  27. }
  28. if(GetPlayerTeam(playerid) == BALLAS)
  29. {
  30. SetPlayerColor(playerid,TEAM_3_COLOR);
  31. new Random = random(sizeof(BallasSpawn));
  32. SetPlayerPos(playerid, BallasSpawn[Random][0], BallasSpawn[Random][1], BallasSpawn[Random][2]);
  33. }
  34. if(GetPlayerTeam(playerid) == VAGOS)
  35. {
  36. SetPlayerColor(playerid,TEAM_4_COLOR);
  37. new Random = random(sizeof(VagosSpawn));
  38. SetPlayerPos(playerid, VagosSpawn[Random][0], VagosSpawn[Random][1], VagosSpawn[Random][2]);
  39. }
  40. if(GetPlayerTeam(playerid) == AZTECAS)
  41. {
  42. SetPlayerColor(playerid,TEAM_5_COLOR);
  43. new Random = random(sizeof(AztecasSpawn));
  44. SetPlayerPos(playerid, AztecasSpawn[Random][0], AztecasSpawn[Random][1], AztecasSpawn[Random][2]);
  45. }
  46. if(GetPlayerTeam(playerid) == RIFA)
  47. {
  48. SetPlayerColor(playerid,TEAM_6_COLOR);
  49. new Random = random(sizeof(RifaSpawn));
  50. SetPlayerPos(playerid, RifaSpawn[Random][0], RifaSpawn[Random][1], RifaSpawn[Random][2]);
  51. }
  52. if(GetPlayerTeam(playerid) == DNB)
  53. {
  54. SetPlayerColor(playerid,TEAM_7_COLOR);
  55. new Random = random(sizeof(DNBSpawn));
  56. SetPlayerPos(playerid, DNBSpawn[Random][0], DNBSpawn[Random][1], DNBSpawn[Random][2]);
  57. }
  58. if(GetPlayerTeam(playerid) == MafiaR)
  59. {
  60. SetPlayerColor(playerid,TEAM_8_COLOR);
  61. new Random = random(sizeof(MafiaRSpawn));
  62. SetPlayerPos(playerid, MafiaRSpawn[Random][0], MafiaRSpawn[Random][1], MafiaRSpawn[Random][2]);
  63. }
  64. if(GetPlayerTeam(playerid) == CLAN)
  65. {
  66. new Random = random(sizeof(CLANSpawn));
  67. SetPlayerPos(playerid, CLANSpawn[Random][0], CLANSpawn[Random][1], CLANSpawn[Random][2]);
  68. }
  69.  
  70. if(GetPlayerTeam(playerid) == SAFE || InSafe[playerid] == 1) {SetPlayerColor(playerid,TEAM_2_COLOR);}
  71.  
  72. // On affiche les statistiques sur sa tête
  73. Delete3DTextLabel(label);
  74. //new string[MAX_STRING_MSG];
  75. //format(string, sizeof(string), "Ping : {FFFFFF}%d{0C53ED} | FPS : {FFFFFF}%d{0C53ED}\nPacket lost : {FFFFFF}%0.1f", GetPlayerPing(playerid), pFPS[playerid], NetStats_PacketLossPercent(playerid));
  76. // label = Create3DTextLabel(string, 0x0C53EDFF, 30.0, 40.0, 50.0, 40.0, 0);
  77. //Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
  78. //StopAudioStreamForPlayer(playerid);
  79.  
  80. // On cache les textdraws
  81. PlayerTextDrawHide(playerid, Class0[playerid]);
  82. PlayerTextDrawHide(playerid, Class1[playerid]);
  83. PlayerTextDrawHide(playerid, Class2[playerid]);
  84. PlayerTextDrawHide(playerid, Class3[playerid]);
  85. PlayerTextDrawHide(playerid, Class4[playerid]);
  86. PlayerTextDrawHide(playerid, Class5[playerid]);
  87. PlayerTextDrawHide(playerid, Class6[playerid]);
  88. PlayerTextDrawHide(playerid, Class7[playerid]);
  89. PlayerTextDrawHide(playerid, Class8[playerid]);
  90. PlayerTextDrawHide(playerid, Class10[playerid]);
  91. PlayerTextDrawHide(playerid, Class9[playerid]);
  92. PlayerTextDrawHide(playerid, Class11[playerid]);
  93. PlayerTextDrawHide(playerid, Class12[playerid]);
  94. PlayerTextDrawHide(playerid, Class13[playerid]);
  95. PlayerTextDrawHide(playerid, Class14[playerid]);
  96.  
  97. textdraw(playerid);
  98.  
  99. // Si il est en jail on le remet en jail.
  100. //if(PlayerInfo[playerid][pJailTime] >= 0) return JailPlayer(playerid);
  101. // Si il est en safe (ou qu'il a choisis safe) on le met en safe.
  102. if(InSafe[playerid] == 1 || GetPlayerTeam(playerid) ==SAFE) return Safe(playerid);
  103.  
  104. // On donne la vie au joueur qui spawn.
  105. //SetPlayerHealth(playerid,100.0);
  106.  
  107. if(InWar[playerid] == 1)
  108. {
  109. //RandomTPWAR(playerid);// Si il est en war, on le TP à une position aléatoire
  110.  
  111. GiveWeapons(playerid);// Si il est en war, on lui donne les armes appropriés
  112.  
  113. new Float:x, Float:y, Float:z;
  114. GetPlayerPos(playerid, x, y, z);
  115. SetPlayerVirtualWorld(playerid, 10);
  116. SetPlayerArmour(playerid, 100.0);
  117. SetTimerEx("antispawnkill", 1000, 0, "i", playerid);
  118.  
  119. if(TeamClan[playerid] == 1)
  120. {
  121. SetPlayerSkin(playerid, ClanInfo[ PlayerInfo[playerid][pTeam] ][cSkin]);
  122.  
  123. new string3[MAX_STRING_MSG];
  124. format(string3, sizeof(string3), "0x%sFF", ClanInfo[ PlayerInfo[playerid][pTeam] ][cColor]);
  125. new colorInt = HexToInt(string3);
  126. SetPlayerColor(playerid, colorInt);
  127. }
  128.  
  129. // Modification textdraw
  130. new string2[MAX_STRING_MSG];
  131. format(string2, sizeof(string2), "~g~WARZONE");
  132. PlayerTextDrawSetString(playerid, Stats2[playerid], string2);
  133. }
  134. if(OnDM[playerid] == 1)
  135. {
  136. if(DM[playerid] == 1)
  137. {
  138. SetTimerEx("Tcgc", 500, false, "i", playerid);
  139. SetTimerEx("RendreArme2", 1000, false, "i", playerid);
  140. ResetPlayerWeapons(playerid);
  141. }
  142. else if(DM[playerid] == 2)
  143. {
  144. SetTimerEx("Trbf", 500, false, "i", playerid);
  145. SetTimerEx("WeaponArena", 1000, false, "i", playerid);
  146. ResetPlayerWeapons(playerid);
  147. }
  148. else if(DM[playerid] == 3)
  149. {
  150. SetTimerEx("Tcage", 500, false, "i", playerid);
  151. SetTimerEx("RendreArme", 1000, false, "i", playerid);
  152. ResetPlayerWeapons(playerid);
  153. }
  154. else if(DM[playerid] == 4)
  155. {
  156. SetTimerEx("Tosok", 500, false, "i", playerid);
  157. SetTimerEx("Osok", 1000, false, "i", playerid);
  158. ResetPlayerWeapons(playerid);
  159. }
  160. else if(DM[playerid] == 5)
  161. {
  162. SetTimerEx("TWarehouse", 500, false, "i", playerid);
  163. SetTimerEx("RendreArme2", 1000, false, "i", playerid);
  164. ResetPlayerWeapons(playerid);
  165. }
  166. else if(DM[playerid] == 6)
  167. {
  168. SetTimerEx("TBar", 500, false, "i", playerid);
  169. SetTimerEx("RendreArme3", 1000, false, "i", playerid);
  170. ResetPlayerWeapons(playerid);
  171. }
  172. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement