Advertisement
Guest User

Untitled

a guest
Jun 6th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. public OnPlayerDisconnect(playerid, reason)
  2. {
  3. new strings[200];
  4. InBG[playerid] = 0;
  5. TextDrawDestroy(TdSafe[playerid]);
  6. if(StepGaz>1)
  7. {
  8. if(GetPlayersBG()==1)
  9. {
  10. new winner = GetLastPlayerBG();
  11. format(strings,sizeof strings,"%s won the game cu %d kills in %s%d:%s%d.",PlayerName(winner),PlayerKills[winner],(MatchTimer-MatchTimer/60<10)?("0"):(""),MatchTimer/60,(MatchTimer-MatchTimer/60*60<10)?("0"):(""),MatchTimer-MatchTimer/60*60);
  12. SendClientMessageToAll(0x00FFFFC8,strings);
  13. SendClientMessage(winner,0x00FFFFC8,"You won the game. Congratulations!");
  14. foreach(Player,i)
  15. ShowPlayerNameTagForPlayer(winner,i, true);
  16. GivePlayerMoney(winner,50000);
  17. GameTextForPlayer(winner, "~g~+$50.000", 3000, 1);
  18.  
  19. SpawnPlayer(winner);
  20. if(IsValidDynamicObject(LootDrop)) DestroyDynamicObject(LootDrop),LootDrop =INVALID_OBJECT_ID;
  21. if(IsValidDynamicObject(NeonAttach)) DestroyDynamicObject(NeonAttach);
  22. if(IsValidDynamicObject(ParaAttach)) DestroyDynamicObject(ParaAttach);
  23. ContainerOpened=0;
  24. InBG[winner]=0;
  25. FirsAid[winner] = 0;
  26. Armour[winner] = 0;
  27. PlayerKills[winner]=0;
  28. Helmet[winner] = 0;
  29. ResetPlayerWeapons(winner);
  30. SetPlayerVirtualWorld(winner,0);
  31. SetPlayerInterior(winner,0);
  32. TextDrawHideForPlayer(winner,AliveTD);
  33. TextDrawHideForPlayer(winner,TdSafe[winner]);
  34. GangZoneHideForPlayer(winner,LastSafeZ);
  35. GangZoneHideForPlayer(winner,SafeZone);
  36. SendDeathMessageToPlayer(winner, 1001, 1001, 200);
  37. SendDeathMessageToPlayer(winner, 1001, 1001, 200);
  38. SendDeathMessageToPlayer(winner, 1001, 1001, 200);
  39. SendDeathMessageToPlayer(winner, 1001, 1001, 200);
  40. SendDeathMessageToPlayer(winner, 1001, 1001, 200);
  41.  
  42. AllowClose=0;
  43. MatchTimer=0;
  44. MatchLobbyTimer =-1;
  45. StepGaz=0;
  46. GangZoneDestroy(LastSafeZ);
  47. GangZoneDestroy(SafeZone);
  48. minimumx = 0, maximumx = 0,
  49. minimumy = 0, maximumy = 0,
  50. Lminimumx = 0, Lmaximumx = 0,
  51. Lminimumy = 0, Lmaximumy = 0;
  52. format(strings,sizeof(strings),"PUBG Arena\nType /enter to play");
  53. Update3DTextLabelText(arenatxt, 0xFFFFFFFF, strings);
  54. for(new car;car< MAX_VEHICLES;car++)
  55. {
  56. if(MatchVeh[car]==1)
  57. {
  58. DestroyVehicle(car);
  59. MatchVeh[car] = 0;
  60. }
  61. }
  62. for(new spawn=0;spawn<sizeof(LootSpawnPos);spawn++)
  63. {
  64. if(IsValidDynamicObject(Loot[spawn])) DestroyDynamicObject(Loot[spawn]);
  65. }
  66. }
  67. }
  68.  
  69.  
  70. return 1;
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement