Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.32 KB | None | 0 0
  1. public SetPlayerPNS()
  2. {
  3. foreach(Player, x)
  4. {
  5. new carid = GetPlayerVehicleID(x),
  6. Float:health,
  7. string[256];
  8. if(IsPlayerInRangeOfPoint(x,15.0,1025.0671,-1023.7895,32.1016))
  9. {
  10. if(PlayerInfo[x][pWantedLevel] == 0)
  11. {
  12. DisableRemoteVehicleCollisions(x, 1);
  13. }
  14. else
  15. {
  16. DisableRemoteVehicleCollisions(x, 0);
  17. }
  18. GetVehicleHealth(carid, health);
  19. if(health < 950.0)
  20. {
  21. if(GetPlayerState(x) == 2)
  22. {
  23. pnsmoney[x] = GetPlayerMoney(x);
  24. SetTimerEx("AfterSpray", 3000, false, "i", x);
  25. return 1;
  26. }
  27. }
  28. }
  29. if(IsPlayerInRangeOfPoint(x,15.0,719.9537,-457.2771,16.3359))
  30. {
  31. if(PlayerInfo[x][pWantedLevel] == 0)
  32. {
  33. DisableRemoteVehicleCollisions(x, 1);
  34. }
  35. else
  36. {
  37. DisableRemoteVehicleCollisions(x, 0);
  38. }
  39. GetVehicleHealth(carid, health);
  40. if(health < 950.0)
  41. {
  42. if(GetPlayerState(x) == 2)
  43. {
  44. pnsmoney[x] = GetPlayerMoney(x);
  45. SetTimerEx("AfterSpray", 3000, false, "i", x);
  46. return 1;
  47. }
  48. }
  49. }
  50. if(IsPlayerInRangeOfPoint(x,15.0,487.4134,-1740.1738,11.1370))
  51. {
  52. if(PlayerInfo[x][pWantedLevel] == 0)
  53. {
  54. DisableRemoteVehicleCollisions(x, 1);
  55. }
  56. else
  57. {
  58. DisableRemoteVehicleCollisions(x, 0);
  59. }
  60. GetVehicleHealth(carid, health);
  61. if(health < 950.0)
  62. {
  63. if(GetPlayerState(x) == 2)
  64. {
  65. pnsmoney[x] = GetPlayerMoney(x);
  66. SetTimerEx("AfterSpray", 3000, false, "i", x);
  67. return 1;
  68. }
  69. }
  70. }
  71. if(IsPlayerInRangeOfPoint(x,15.0,2065.5911,-1831.4495,13.5469))
  72. {
  73. if(PlayerInfo[x][pWantedLevel] == 0)
  74. {
  75. DisableRemoteVehicleCollisions(x, 1);
  76. }
  77. else
  78. {
  79. DisableRemoteVehicleCollisions(x, 0);
  80. }
  81. GetVehicleHealth(carid, health);
  82. if(health < 950.0)
  83. {
  84. if(GetPlayerState(x) == 2)
  85. {
  86. pnsmoney[x] = GetPlayerMoney(x);
  87. SetTimerEx("AfterSpray", 3000, false, "i", x);
  88. return 1;
  89. }
  90. }
  91. }
  92. if(IsPlayerInRangeOfPoint(x,15.0,1974.3198,2162.7249,11.0703))
  93. {
  94. if(PlayerInfo[x][pWantedLevel] == 0)
  95. {
  96. DisableRemoteVehicleCollisions(x, 1);
  97. }
  98. else
  99. {
  100. DisableRemoteVehicleCollisions(x, 0);
  101. }
  102. GetVehicleHealth(carid, health);
  103. if(health < 950.0)
  104. {
  105. if(GetPlayerState(x) == 2)
  106. {
  107. pnsmoney[x] = GetPlayerMoney(x);
  108. SetTimerEx("AfterSpray", 3000, false, "i", x);
  109. return 1;
  110. }
  111. }
  112. }
  113. if(IsPlayerInRangeOfPoint(x,15.0,-100.1086,1117.3312,19.7417))
  114. {
  115. if(PlayerInfo[x][pWantedLevel] == 0)
  116. {
  117. DisableRemoteVehicleCollisions(x, 1);
  118. }
  119. else
  120. {
  121. DisableRemoteVehicleCollisions(x, 0);
  122. }
  123. GetVehicleHealth(carid, health);
  124. if(health < 950.0)
  125. {
  126. if(GetPlayerState(x) == 2)
  127. {
  128. pnsmoney[x] = GetPlayerMoney(x);
  129. SetTimerEx("AfterSpray", 3000, false, "i", x);
  130. return 1;
  131. }
  132. }
  133. }
  134. if(IsPlayerInRangeOfPoint(x,15.0,BizzInfo[51][bEntranceX],BizzInfo[51][bEntranceY],BizzInfo[51][bEntranceZ]))
  135. {
  136. if(PlayerInfo[x][pWantedLevel] == 0)
  137. {
  138. DisableRemoteVehicleCollisions(x, 1);
  139. }
  140. else
  141. {
  142. DisableRemoteVehicleCollisions(x, 0);
  143. }
  144. if(EnterInModShop[x] > 0)
  145. {
  146. GivePlayerCash(x, -BizzInfo[51][bEntranceCost]);
  147. BizzInfo[51][bTill] += BizzInfo[51][bEntranceCost];
  148. new str[128];
  149. mysql_format(SQL,str,sizeof(str),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='51'",BizzInfo[51][bTill]);
  150. mysql_tquery(SQL,str,"","");
  151. format(string,sizeof(string),"~r~-%d$", BizzInfo[51][bEntranceCost]);
  152. GameTextForPlayer(x, string, 5000, 1);
  153. EnterInModShop[x] = 0;
  154. return 1;
  155. }
  156. }
  157. if(IsPlayerInRangeOfPoint(x,15.0,BizzInfo[38][bEntranceX],BizzInfo[38][bEntranceY],BizzInfo[38][bEntranceZ]))
  158. {
  159. if(PlayerInfo[x][pWantedLevel] == 0)
  160. {
  161. DisableRemoteVehicleCollisions(x, 1);
  162. }
  163. else
  164. {
  165. DisableRemoteVehicleCollisions(x, 0);
  166. }
  167. if(EnterInModShop[x] > 0)
  168. {
  169. GivePlayerCash(x, -BizzInfo[38][bEntranceCost]);
  170. BizzInfo[38][bTill] += BizzInfo[38][bEntranceCost];
  171. new str[128];
  172. mysql_format(SQL,str,sizeof(str),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='38'",BizzInfo[38][bTill]);
  173. mysql_tquery(SQL,str,"","");
  174. format(string,sizeof(string),"~r~-%d$", BizzInfo[38][bEntranceCost]);
  175. GameTextForPlayer(x, string, 5000, 1);
  176. EnterInModShop[x] = 0;
  177. return 1;
  178. }
  179. }
  180. if(IsPlayerInRangeOfPoint(x,15.0,BizzInfo[39][bEntranceX],BizzInfo[39][bEntranceY],BizzInfo[39][bEntranceZ]))
  181. {
  182. if(PlayerInfo[x][pWantedLevel] == 0)
  183. {
  184. DisableRemoteVehicleCollisions(x, 1);
  185. }
  186. else
  187. {
  188. DisableRemoteVehicleCollisions(x, 0);
  189. }
  190. if(EnterInModShop[x] > 0)
  191. {
  192. GivePlayerCash(x, -BizzInfo[39][bEntranceCost]);
  193. BizzInfo[39][bTill] += BizzInfo[39][bEntranceCost];
  194. new str[128];
  195. mysql_format(SQL,str,sizeof(str),"UPDATE `bizz` SET `Till`='%d' WHERE `ID`='39'",BizzInfo[39][bTill]);
  196. mysql_tquery(SQL,str,"","");
  197. format(string,sizeof(string),"~r~-%d$", BizzInfo[39][bEntranceCost]);
  198. GameTextForPlayer(x, string, 5000, 1);
  199. EnterInModShop[x] = 0;
  200. return 1;
  201. }
  202. }
  203. }
  204. return 1;
  205. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement