Advertisement
Guest User

SoDeagle

a guest
Sep 24th, 2012
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.25 KB | None | 0 0
  1. ////////////////////////////////////////////////////////////////////////////////
  2. // DEAGLE DEATHMATCH MINGAME BY SOCAN, KEEP CREDITS //
  3. ////////////////////////////////////////////////////////////////////////////////
  4. #include a_samp //Thanks to the SA-MP team
  5. #include zcmd //Thanks to Zeex
  6.  
  7.  
  8. new DmMinigames[MAX_PLAYERS];
  9. public OnGameModeInit()
  10. {
  11. Create3DTextLabel("{451EE1}Deagle\n Mini game! \n/play to enter\n{008040}Cost: $5000", 0x008080FF, -1724.9291,-26.2646,3.5547, 0, 0);
  12. print("\n-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_");
  13. print("Deagle Deathmatch by Socan loading..");
  14. print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-\n");
  15. return 1;
  16. }
  17.  
  18. public OnPlayerConnect(playerid)
  19. {
  20. DmMinigames[playerid] = 0;
  21. SetPlayerVirtualWorld(playerid, 0);
  22. return 1;
  23. }
  24.  
  25. public OnPlayerDisconnect(playerid, reason)
  26. {
  27. DmMinigames[playerid] = 0;
  28. return 1;
  29. }
  30.  
  31. public OnPlayerDeath(playerid, killerid, reason)
  32. {
  33. DmMinigames[playerid] = 0;
  34. SetPlayerInterior(playerid, 0);
  35. SetPlayerVirtualWorld(playerid, 0);
  36. return 1;
  37. }
  38.  
  39.  
  40. CMD:play(playerid, params[])
  41. {
  42. if(IsPlayerInRangeOfPoint(playerid, 5.0, -1724.9291,-26.2646,3.5547))
  43. //if(IsPlayerInRangeOfPoint(playerid, Float:range, Float:x,Float:y,Float:z)) USE THIS TO ADD MORE PLACES IN
  44. {
  45. new string[128];
  46. new pName[MAX_PLAYER_NAME];
  47. if(GetPlayerMoney(playerid) <5000)
  48. return SendClientMessage(playerid, -1, "{FF0000}You dont have enough money to Deagle Mini Game");
  49. GivePlayerMoney(playerid, -5000);
  50. SetPlayerPos(playerid, 1302.519897,-1.787510,1001.028259);
  51. SetPlayerInterior(playerid, 18);
  52. SetPlayerVirtualWorld(playerid, 87);
  53. SetPlayerArmour(playerid, 100);
  54. SetPlayerHealth(playerid, 100);
  55. GivePlayerWeapon(playerid, 24, 99999);
  56. DmMinigames[playerid] = 1;
  57. GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  58. format(string,sizeof string,"{008040}%s has joined Deagle Minigame!",pName);
  59. SendClientMessageToAll(0xFFFFFFAA,string);
  60. }
  61. else
  62. {
  63. SendClientMessage(playerid, -1, "{FF0000}You are not at SF docks Deagle Minigame!");
  64. return 1;
  65. }
  66. return 1;
  67. }
  68.  
  69. CMD:leave(playerid, params[])
  70. {
  71. if(DmMinigames[playerid] == 0)
  72. {
  73. SendClientMessage(playerid, -1,"{FF0000}You're not in Deagle Deathmatch Mini Game and can not do this command!");
  74. }
  75. else
  76. {
  77. new string[128];
  78. new pName[MAX_PLAYER_NAME];
  79. DmMinigames[playerid] = 0;
  80. SetPlayerPos(playerid, -1724.9291,-26.2646,3.5547);
  81. SetPlayerInterior(playerid, 0);
  82. SetPlayerVirtualWorld(playerid, 0);
  83. ResetPlayerWeapons(playerid);
  84. GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  85. format(string,sizeof string,"{008040}%s has left Deagle Minigame!",pName);
  86. SendClientMessageToAll(0xFFFFFFAA,string);
  87. }
  88. return 1;
  89. }
  90.  
  91.  
  92.  
  93. CMD:test(playerid, params[])
  94. {
  95. if(DmMinigames[playerid]) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {AAAAAA}You can not use other commands while in a Mini Game!");
  96. //Add your code here for command.
  97. return 1;
  98. }
  99.  
  100. CMD:dm(playerid, params[])
  101. {
  102. SetPlayerPos(playerid, -1724.9291,-26.2646,3.5547);
  103. return 1;
  104. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement