Advertisement
Guest User

Untitled

a guest
Apr 26th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.16 KB | None | 0 0
  1. stock SetPlayerSpawn(playerid)
  2. {
  3. PlayerHealth[playerid] = 0;
  4. if(gPlayerLogged[playerid] == 0)
  5. {
  6. SendClientMessage(playerid, COLOR_GRAD1, "[VS-RP] Необходимо авторизоваться!");
  7. Kick(playerid);
  8. }
  9. if(IsPlayerConnected(playerid))
  10. {
  11. if(PlayerInfo[playerid][pHP] > 100)
  12. {
  13. PlayerInfo[playerid][pHP] = 100;
  14. }
  15. if(PlayerInfo[playerid][pZvezdi] >= 1)
  16. {
  17. SetPlayerWantedLevel(playerid,PlayerInfo[playerid][pZvezdi]);
  18. WantedPoints[playerid]++;
  19. }
  20. ResetPlayerWeapons(playerid);
  21. SetPlayerHealthAC(playerid, PlayerInfo[playerid][pHP]);
  22. SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
  23. SetPlayerWeapons(playerid);
  24. new house = PlayerInfo[playerid][pPhousekey];
  25. connecttime[playerid] = 0;
  26. SetPlayerToTeamColor(playerid);
  27. SetCameraBehindPlayer(playerid);
  28. if(PlayerInfo[playerid][pTut] == 0)
  29. {
  30. SetPlayerHealthAC(playerid,100);
  31. PlayerInfo[playerid][pHP] = 100;
  32. SetPlayerCameraPos(playerid, 291.2647,-1253.8707,152.0083);
  33. SetPlayerCameraLookAt(playerid, 291.2647,-1253.8707,152.0083);
  34. ShowPlayerDialog(playerid,4,DIALOG_STYLE_MSGBOX,"{FFFFFC}Регистрация","{FFFFFC}Укажите ваш пол:\n","Муж.","Жен.");
  35. TogglePlayerControllable(playerid, 0);
  36. }
  37. if(PlayerInfo[playerid][pMember] > 0)
  38. {
  39. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  40. }
  41. if(PlayerInfo[playerid][pMember] <= 0)
  42. {
  43. SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
  44. }
  45. if(ktotolox[playerid] == 1)
  46. {
  47. SetPPos(playerid, 372.3439,-29.4278,1076.4651);
  48. ktotolox[playerid] = 0;
  49. SendClientMessage(playerid, COLOR_WHITE, "Следите за вашим здоровьем...");
  50. return true;
  51. }
  52. if(PlayerInfo[playerid][pJailed] == 1)
  53. {
  54. if(PlayerInfo[playerid][pMestoJail] == 1)
  55. {
  56. SetPlayerInterior(playerid, 6);
  57. SetPlayerPos(playerid,264.1425,77.4712,1001.0391);
  58. SetPlayerFacingAngle(playerid, 263.0160);
  59. return true;
  60. }
  61. if(PlayerInfo[playerid][pMestoJail] == 2)
  62. {
  63. SetPlayerInterior(playerid, 10);
  64. SetPlayerPos(playerid,219.5400,109.9767,999.0156);
  65. SetPlayerFacingAngle(playerid, 1.0000);
  66. return true;
  67. }
  68. if(PlayerInfo[playerid][pMestoJail] == 3)
  69. {
  70. SetPlayerInterior(playerid, 3);
  71. SetPlayerPos(playerid,198.3642,161.8103,1003.0300);
  72. SetPlayerFacingAngle(playerid, 1.0000);
  73. return true;
  74. }
  75. }
  76. else if(PlayerInfo[playerid][pJailed] == 4)
  77. {
  78. SetPlayerInterior(playerid, 0);
  79. SetPlayerPos(playerid,5513.1113,1243.8813,23.1886);
  80. SetPlayerFacingAngle(playerid, 0.7536);
  81. return true;
  82. }
  83. SetPlayerVirtualWorld(playerid,0);
  84. if(house != 255)
  85. {
  86. if(PlayerInfo[playerid][pMember] == 0)
  87. {
  88. if(PlayerInfo[playerid][pSex] == 1)
  89. {
  90. if(PlayerInfo[playerid][pSpawnChange] == 1)
  91. {
  92. SetPlayerInterior(playerid,HouseInfo[house][hInt]);
  93. SetPPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]);
  94. PlayerInfo[playerid][pLocal] = house;
  95. PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
  96. SetPlayerVirtualWorld(playerid, house+50);
  97. return true;
  98. }
  99. }
  100. }
  101. }
  102. if(house != 255)
  103. {
  104. if(PlayerInfo[playerid][pMember] == 0)
  105. {
  106. if(PlayerInfo[playerid][pSex] == 2)
  107. {
  108. if(PlayerInfo[playerid][pSpawnChange] == 1)
  109. {
  110. SetPlayerInterior(playerid,HouseInfo[house][hInt]);
  111. SetPPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]);
  112. PlayerInfo[playerid][pLocal] = house;
  113. PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
  114. SetPlayerVirtualWorld(playerid, house+50);
  115. return true;
  116. }
  117. }
  118. }
  119. }
  120. if(house != 255)
  121. {
  122. if(PlayerInfo[playerid][pSpawnChange] == 1)
  123. {
  124. SetPlayerInterior(playerid,HouseInfo[house][hInt]);
  125. SetPPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]);
  126. PlayerInfo[playerid][pLocal] = house;
  127. PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
  128. SetPlayerVirtualWorld(playerid, house+50);
  129. return true;
  130. }
  131. }
  132. switch(PlayerInfo[playerid][pMember])
  133. {
  134. case 2:
  135. {
  136. SetPlayerInterior(playerid, 5);
  137. SetPPos(playerid, 322.4131,316.9056,999.1484);
  138. PlayerInfo[playerid][pInt] = 10;
  139. SetPlayerFacingAngle(playerid, 180.5557);
  140. return true;
  141. }
  142. case 3:
  143. {
  144. if(forma[playerid] == 1)
  145. {
  146. SetPlayerSkin(playerid, 252);
  147. SetPlayerInterior(playerid, 0);
  148. SetPPos(playerid, -1346.2050,492.3983,11.2027);
  149. PlayerInfo[playerid][pInt] = 0;
  150. SetPlayerVirtualWorld(playerid, 0);
  151. return true;
  152. }
  153. SetPlayerInterior(playerid, 0);
  154. SetPPos(playerid, -1346.2050,492.3983,11.2027);
  155. PlayerInfo[playerid][pInt] = 0;
  156. SetPlayerVirtualWorld(playerid, 0);
  157. return true;
  158. }
  159. case 10:
  160. {
  161. SetPlayerInterior(playerid, 10);
  162. SetPPos(playerid, 225.1647,121.0442,999.0786);
  163. SetPlayerFacingAngle(playerid, 89.0733);
  164. PlayerInfo[playerid][pInt] = 10;
  165. return true;
  166. }
  167. case 19:
  168. {
  169. if(forma[playerid] == 1)
  170. {
  171. SetPlayerSkin(playerid, 252);
  172. SetPlayerInterior(playerid, 0);
  173. SetPPos(playerid, 241.7503,1852.6790,8.7578);
  174. PlayerInfo[playerid][pInt] = 0;
  175. SetPlayerVirtualWorld(playerid, 0);
  176. return true;
  177. }
  178. SetPlayerInterior(playerid, 0);
  179. SetPPos(playerid, 241.7503,1852.6790,8.7578);
  180. PlayerInfo[playerid][pInt] = 0;
  181. SetPlayerVirtualWorld(playerid, 0);
  182. return true;
  183. }
  184. case 21:
  185. {
  186. SetPlayerInterior(playerid, 3);
  187. SetPPos(playerid, 211.3636,184.3113,1003.0313);
  188. SetPlayerFacingAngle(playerid, 174.3579);
  189. PlayerInfo[playerid][pInt] = 122;
  190. SetPlayerVirtualWorld(playerid, 122);
  191. return true;
  192. }
  193. case 9:
  194. {
  195. SetPlayerInterior(playerid, 3);
  196. SetPPos(playerid, 373.8919,192.2131,1014.1875);
  197. SetPlayerFacingAngle(playerid, 182.7769);
  198. PlayerInfo[playerid][pInt] = 3;
  199. SetPlayerVirtualWorld(playerid, 1);
  200. return true;
  201. }
  202. case 16:
  203. {
  204. SetPPos(playerid, 2170.2366,1599.8336,999.9702);
  205. SetPlayerInterior(playerid,1);
  206. SetPlayerFacingAngle(playerid, 90.1896);
  207. PlayerInfo[playerid][pInt] = 0;
  208. SetPlayerVirtualWorld(playerid, 0);
  209. lNews[playerid] = 0;
  210. return true;
  211. }
  212. case 6:
  213. {
  214. SetPlayerInterior(playerid, 5);
  215. SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
  216. SetPPos(playerid, 1265.7104,-793.7453,1084.0078);
  217. SetPlayerCheckpoint(playerid,1261.6259,-781.8162,1084.0078,1.0);
  218. PlayerInfo[playerid][pInt] = 5;
  219. SetPlayerVirtualWorld(playerid, 0);
  220. return true;
  221. }
  222. case 14:
  223. {
  224. SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
  225. SetPlayerInterior(playerid, 5);
  226. SetPPos(playerid, 1265.7104,-793.7453,1084.0078);
  227. SetPlayerCheckpoint(playerid,1261.6259,-781.8162,1084.0078,1.0);
  228. PlayerInfo[playerid][pInt] = 5;
  229. SetPlayerVirtualWorld(playerid, 1);
  230. return true;
  231. }
  232. case 11:
  233. {
  234. SetPPos(playerid, -2031.7778,-117.3789,1035.1719);
  235. SetPlayerFacingAngle(playerid, 268.5241);
  236. SetPlayerInterior(playerid,3);
  237. PlayerInfo[playerid][pInt] = 3;
  238. SetPlayerVirtualWorld(playerid, 1);
  239. return true;
  240. }
  241. case 5:
  242. {
  243. SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
  244. SetPlayerInterior(playerid, 5);
  245. SetPPos(playerid, 1265.7104,-793.7453,1084.0078);
  246. SetPlayerCheckpoint(playerid,1261.6259,-781.8162,1084.0078,1.0);
  247. PlayerInfo[playerid][pInt] = 5;
  248. SetPlayerVirtualWorld(playerid, 2);
  249. return true;
  250. }
  251. case 4:
  252. {
  253. SetPlayerInterior(playerid, 15);
  254. SetPlayerVirtualWorld(playerid, 4);
  255. PlayerInfo[playerid][pInt] = 15;
  256. SetPPos(playerid, 364.2723,-24.0404,1076.4578);
  257. SetPlayerFacingAngle(playerid, 181.0575);
  258. Medics += 1;
  259. return true;
  260. }
  261. case 12:
  262. {
  263. SetPPos(playerid, -61.2984,1364.5847,1080.2109);
  264. SetPlayerFacingAngle(playerid, 100);
  265. SetPlayerInterior(playerid,6);
  266. SetPlayerVirtualWorld(playerid, 34);
  267. PlayerInfo[playerid][pInt] = 6;
  268. return true;
  269. }
  270. case 18:
  271. {
  272. SetPlayerInterior(playerid, 8);
  273. SetPlayerVirtualWorld(playerid, 63);
  274. SetPPos(playerid, 2817.0813,-1168.2172,1025.5778);
  275. RemovePlayerAttachedObject(playerid, 1);
  276. PlayerInfo[playerid][pInt] = 0;
  277. return true;
  278. }
  279. case 17:
  280. {
  281. SetPlayerFacingAngle(playerid, 90.4248);
  282. SetPPos(playerid, -49.7558,1400.3553,1084.4297);
  283. SetPlayerInterior(playerid,8);
  284. SetPlayerVirtualWorld(playerid, 36);
  285. PlayerInfo[playerid][pInt] = 0;
  286. return true;
  287. }
  288. case 13:
  289. {
  290. SetPlayerInterior(playerid, 4);
  291. SetPlayerVirtualWorld(playerid, 75);
  292. SetPlayerFacingAngle(playerid, 263.0497);
  293. SetPPos(playerid, 308.7524,306.6759,1003.3047);
  294. PlayerInfo[playerid][pInt] = 0;
  295. return true;
  296. }
  297. case 15:
  298. {
  299. SetPlayerInterior(playerid, 3);
  300. SetPlayerVirtualWorld(playerid, 0);
  301. SetPPos(playerid, 2492.3748,-1703.7333,1018.3438);
  302. SetPlayerFacingAngle(playerid, 0.191693);
  303. PlayerInfo[playerid][pInt] = 3;
  304. SetPlayerVirtualWorld(playerid, 1);
  305. return true;
  306. }
  307. case 8:
  308. {
  309. SetPlayerInterior(playerid, 0);
  310. SetPlayerPos(playerid, 1280.3894,1271.6595,10.8281);
  311. SetPlayerFacingAngle(playerid, 316.8163);
  312. PlayerInfo[playerid][pInt] = 0;
  313. SetPlayerVirtualWorld(playerid, 0);
  314. return true;
  315. }
  316. case 1:
  317. {
  318. SetPlayerInterior(playerid, 6);
  319. SetPPos(playerid, 235.8750,73.5106,1005.0391);
  320. PlayerInfo[playerid][pInt] = 6;
  321. SetPlayerVirtualWorld(playerid, 0);
  322. return true;
  323. }
  324. case 7:
  325. {
  326. SetPlayerInterior(playerid, 3);
  327. SetPPos(playerid, 373.8919,192.2131,1014.1875);
  328. SetPlayerFacingAngle(playerid, 182.7769);
  329. PlayerInfo[playerid][pInt] = 3;
  330. SetPlayerVirtualWorld(playerid, 0);
  331. return true;
  332. }
  333. }
  334. SetPlayerInterior(playerid,0);
  335. PlayerInfo[playerid][pInt] = 0;
  336. SetPlayerVirtualWorld(playerid, 0);
  337. new rands = random(sizeof(RandomSpawns));
  338. SetPPos(playerid, RandomSpawns[rands][0], RandomSpawns[rands][1], RandomSpawns[rands][2]);
  339. SetPlayerFacingAngle(playerid, RandomSpawns[rands][3]);
  340. }
  341. return true;
  342. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement