whore.pwn 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$$
  3. | $$$ | $$ /$$__ $$ | $$__ $$| $$__ $$
  4. | $$$$| $$| $$ \__/ | $$ \ $$| $$ \ $$
  5. | $$ $$ $$| $$ /$$$$ /$$$$$$| $$$$$$$/| $$$$$$$/
  6. | $$ $$$$| $$|_ $$|______/| $$__ $$| $$____/
  7. | $$\ $$$| $$ \ $$ | $$ \ $$| $$
  8. | $$ \ $$| $$$$$$/ | $$ | $$| $$
  9. |__/ \__/ \______/ |__/ |__/|__/
  10. Whore System
  11. Next Generation Gaming, LLC
  12. (created by Next Generation Gaming Development Team)
  13. * Copyright (c) 2016, Next Generation Gaming, LLC
  14. *
  15. * All rights reserved.
  16. *
  17. * Redistribution and use in source and binary forms, with or without modification,
  18. * are not permitted in any case.
  19. *
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  25. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  26. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  27. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  28. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  29. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  30. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  31. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. */
  33. CMD:sex(playerid, params[])
  34. {
  35. if(PlayerInfo[playerid][pJob] == 3 || PlayerInfo[playerid][pJob2] == 3 || PlayerInfo[playerid][pJob3] == 3)
  36. {
  37. if(!IsPlayerInAnyVehicle(playerid))
  38. {
  39. SendClientMessageEx(playerid, COLOR_GREY, " You can only have Sex in a Car!");
  40. return 1;
  41. }
  42. new Car = GetPlayerVehicleID(playerid);
  43. new string[128], giveplayerid, money;
  44. if(sscanf(params, "ud", giveplayerid, money)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /sex [player] [price]");
  45. if(money < 1 || money > 10000) { SendClientMessageEx(playerid, COLOR_GREY, " Price not lower then $1 or above $10,000!"); return 1; }
  46. if(IsPlayerConnected(giveplayerid))
  47. {
  48. if(giveplayerid != INVALID_PLAYER_ID)
  49. {
  50. if (ProxDetectorS(8.0, playerid, giveplayerid))
  51. {
  52. if(giveplayerid == playerid) { SendClientMessageEx(playerid, COLOR_GREY, "You cannot have Sex with yourself!"); return 1; }
  53. if(IsPlayerInAnyVehicle(playerid) && IsPlayerInVehicle(giveplayerid, Car))
  54. {
  55. if(gettime() >= PlayerInfo[playerid][pSexTime])
  56. {
  57. format(string, sizeof(string), "* You offered %s to have sex with you, for $%s.", GetPlayerNameEx(giveplayerid), number_format(money));
  58. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  59. format(string, sizeof(string), "* Whore %s has offered you to have sex with them, for $%s (type /accept sex) to accept.", GetPlayerNameEx(playerid), number_format(money));
  60. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
  61. SetPVarInt(playerid, "SexOfferTo", giveplayerid);
  62. SexOffer[giveplayerid] = playerid;
  63. SexPrice[giveplayerid] = money;
  64. PlayerInfo[playerid][pSexTime] = gettime()+60;
  65. }
  66. else
  67. {
  68. SendClientMessageEx(playerid, COLOR_GRAD2, " You have already had sex, wait for your reload time to finish!");
  69. return 1;
  70. }
  71. }
  72. else
  73. {
  74. SendClientMessageEx(playerid, COLOR_GREY, " You or the other person must be in a Car together!");
  75. return 1;
  76. }
  77. }
  78. else
  79. {
  80. SendClientMessageEx(playerid, COLOR_GREY, "That person isn't near you.");
  81. return 1;
  82. }
  83. }
  84. }
  85. else
  86. {
  87. SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
  88. return 1;
  89. }
  90. }
  91. else
  92. {
  93. SendClientMessageEx(playerid, COLOR_GREY, " You are not a Whore!");
  94. }
  95. return 1;
  96. }