Guest User

et sve

a guest
Jan 4th, 2014
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.92 KB | None | 0 0
  1. public OnPlayerDeath(playerid, killerid, reason)
  2. {
  3. antifakekill[playerid] ++;
  4. SetTimerEx("antifakekill2", 1000,false,"i",playerid);
  5. RemovePlayerAttachedObject(playerid,0);
  6. RemovePlayerAttachedObject(playerid,1);
  7. RemovePlayerAttachedObject(playerid,2);
  8. RemovePlayerAttachedObject(playerid,3);
  9. RemovePlayerAttachedObject(playerid,4);
  10. RemovePlayerAttachedObject(playerid,5);
  11. RemovePlayerAttachedObject(playerid,6);
  12. RemovePlayerAttachedObject(playerid,7);
  13. RemovePlayerAttachedObject(playerid,8);
  14. RemovePlayerAttachedObject(playerid,9);
  15. SetPlayerArmour(playerid, 0);
  16. DisablePlayerCheckpoint(playerid);
  17. PosaoGPS[playerid] = 0;
  18. if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
  19. {
  20. PlayerInfo[killerid][pUbistava]++; PlayerInfo[playerid][pSmrti]++;
  21. ResetPlayerWeapons(playerid); ResetujVar(playerid);
  22. }
  23. ////////////////////////////////////////////////////////////
  24. if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
  25. {
  26. if(IgracPolicajac(killerid))
  27. {
  28. PlayerInfo[killerid][pTrazeniLevel] = 0;
  29. SetPlayerWantedLevel(killerid,0);
  30. SetPlayerColor(killerid,0xFFFFFF00);
  31.  
  32. }
  33. if(IgracPolicajac(killerid))
  34. {
  35. PlayerInfo[killerid][pTrazeniLevel] = 0;
  36. SetPlayerWantedLevel(killerid,0);
  37. SetPlayerColor(killerid,0xFFFFFF00);
  38. }
  39. }
  40. ////////////////////////////////////////////////////////////
  41. if(!IgracPolicajac(killerid) && IsPlayerConnected(playerid))
  42. {
  43. if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
  44. {
  45. PostaviWanted(killerid, "Ubistvo", "Nepoznat");
  46. }
  47. }
  48. ////////////////////////////////////////////////////////////
  49. if(GetPlayerWantedLevel(killerid) > 6)
  50. {
  51. SetPlayerWantedLevel(killerid, 6);
  52. PlayerInfo[killerid][pTrazeniLevel] = 6;
  53. }
  54. ////////////////////////////////////////////////////////////
  55. if(GetPlayerWantedLevel(playerid) > 0)
  56. {
  57. new string[256];
  58. g_NovacMinus(playerid, GetPlayerWantedLevel(playerid)*3000);
  59. SCMF(playerid, -1, ""ZUTA"[INFO] "CRVENA"Izgubili ste %d$ zbog umiranja sa wanted level-om "ZUTA"%d!", GetPlayerWantedLevel(playerid)*3000, GetPlayerWantedLevel(playerid));
  60. SetPlayerWantedLevel(playerid, 0); PlayerInfo[playerid][pTrazeniLevel] = 0;
  61. format(string,sizeof(string),""SPLAVA"[MC:RP] "SIVA"Igrac %s je ubijen/se ubio sa wanted level-om!",GetName(playerid));
  62. AdminGameMaster(-1,string);
  63. format(string,sizeof(string),""SPLAVA"[MC:RP] "SIVA"Igrac %s je ubijen/se ubio sa wanted level-om!",GetName(playerid));
  64. ChatPD(-1, string);
  65. SetPlayerColor(playerid, BELA2);
  66. }
  67. ////////////////////////////////////////////////////////////
  68. if(IsPlayerConnected(killerid) && GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
  69. {
  70. new string[256];
  71. format(string,sizeof(string), ""SPLAVA"[MC:RP Anti DB] "SIVA"Igrac %s (ID:%d) je uradio Drive By nad igracem %s (ID:%d)!", GetName(killerid), killerid, GetName(playerid), playerid);
  72. AdminGameMaster(-1, string);
  73. SetPlayerColor(killerid, COLOR_RED);
  74. }
  75. ////////////////////////////////////////////////////////////
  76. if(IsPlayerConnected(killerid) && PlayerInfo[playerid][pLevel] >= 1)
  77. {
  78. new string[256];
  79. format(string,sizeof(string), ""SPLAVA"[MC:RP AK] "SIVA"Igrac %s (ID:%d) je ubio igraca %s (ID:%d)", GetName(killerid), killerid, GetName(playerid), playerid);
  80. AdminGameMaster(-1, string);
  81. if(PlayerInfo[killerid][pLider] >= 2 || PlayerInfo[killerid][pClan] >= 2)
  82. {
  83. SetPlayerColor(killerid, COLOR_RED);
  84. }
  85. else if(PlayerInfo[killerid][pLider] == 1 || PlayerInfo[killerid][pClan] == 1)
  86. {
  87. SetPlayerColor(killerid, BELA2);
  88. }
  89. else if(PlayerInfo[killerid][pLider] == 10 || PlayerInfo[killerid][pClan] == 10)
  90. {
  91. SetPlayerColor(killerid, BELA2);
  92. }
  93. else if(PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pAdmin] < 6)
  94. {
  95. SetPlayerColor(killerid, BELA2);
  96. }
  97. }
  98. ////////////////////////////////////////////////////////////
  99. if(gPlayerUsingLoopingAnim[playerid])
  100. {
  101. gPlayerUsingLoopingAnim[playerid] = 0;
  102. }
  103. ////////////////////////////////////////////////////////////
  104. return 1;
  105. }
  106. ////////////////////////////////////////////////////////////////////////////////////////////
  107. stock SpawnIgraca(playerid)
  108. {
  109. g_SetPlayerHealth(playerid, 99.0); vrataspawn[playerid] = false;
  110. if(PlayerInfo[playerid][pProveraSpawna] == SPAWN_BAZA)
  111. {
  112. if(PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pClan] == 1)
  113. {
  114. SetPlayerPos(playerid, 1477.2086,-1780.2563,3288.7859);
  115. SetPlayerInterior(playerid, 0);
  116. SetPlayerColor(playerid, 0x2641FEAA);
  117. TogglePlayerControllable(playerid, 0);
  118. freeze[playerid] = SetTimerEx("Freeze",3000, false, "i", playerid);
  119. }
  120. else if(PlayerInfo[playerid][pLider] == 2 || PlayerInfo[playerid][pClan] == 2)
  121. {
  122. SetPlayerPos(playerid, 2125.8074,-2278.5754,20.6643);
  123. SetPlayerInterior(playerid, 0);
  124. }
  125. else if(PlayerInfo[playerid][pLider] == 3 || PlayerInfo[playerid][pClan] == 3)
  126. {
  127. SetPlayerPos(playerid, 1329.0504,-638.9127,14280.8857);
  128. SetPlayerInterior(playerid, 0);
  129. TogglePlayerControllable(playerid, 0);
  130. freeze[playerid] = SetTimerEx("Freeze",3000, false, "i", playerid);
  131. }
  132. else if(PlayerInfo[playerid][pLider] == 4 || PlayerInfo[playerid][pClan] == 4)
  133. {
  134. SetPlayerPos(playerid, 323.8689,1127.7897,1083.8828);
  135. SetPlayerInterior(playerid, 5);
  136. }
  137. else if(PlayerInfo[playerid][pLider] == 5 || PlayerInfo[playerid][pClan] == 5)
  138. {
  139. SetPlayerPos(playerid, 2451.1052,-1688.5116,1013.5078);
  140. SetPlayerInterior(playerid, 2);
  141. }
  142. else if(PlayerInfo[playerid][pLider] == 6 || PlayerInfo[playerid][pClan] == 6)
  143. {
  144. SetPlayerPos(playerid, 1785.8721,-1797.5588,-43.3141);
  145. SetPlayerInterior(playerid, 0);
  146. TogglePlayerControllable(playerid, 0);
  147. g_GivePlayerWeapon(playerid, 43, 50);
  148. freeze[playerid] = SetTimerEx("Freeze",3000, false, "i", playerid);
  149. }
  150. else if(PlayerInfo[playerid][pLider] == 7 || PlayerInfo[playerid][pClan] == 7)
  151. {
  152. SetPlayerPos(playerid, 299.7097,183.1322,1007.1719);
  153. SetPlayerInterior(playerid, 3);
  154. SetPlayerColor(playerid, 0x2641FEAA);
  155. TogglePlayerControllable(playerid, 0);
  156. freeze[playerid] = SetTimerEx("Freeze",3000, false, "i", playerid);
  157. }
  158. else if(PlayerInfo[playerid][pLider] == 8 || PlayerInfo[playerid][pClan] == 8)
  159. {
  160. SetPlayerPos(playerid, 1072.2762,-888.2515,43.3932);
  161. SetPlayerInterior(playerid, 0);
  162. TogglePlayerControllable(playerid, 0);
  163. freeze[playerid] = SetTimerEx("Freeze",3000, false, "i", playerid);
  164. }
  165. else if(PlayerInfo[playerid][pLider] == 9 || PlayerInfo[playerid][pClan] == 9)
  166. {
  167. SetPlayerPos(playerid, 1727.7302,-1668.0768,22.6094);
  168. SetPlayerInterior(playerid, 18);
  169. SetPlayerHealth(playerid, 99.0);
  170. SetPlayerArmour(playerid, 99.0);
  171. TogglePlayerControllable(playerid, 0);
  172. freeze[playerid] = SetTimerEx("Freeze",3000, false, "i", playerid);
  173. }
  174. else if(PlayerInfo[playerid][pLider] == 10 || PlayerInfo[playerid][pClan] == 10)
  175. {
  176. SetPlayerPos(playerid, 254.2736,190.5443,1008.1719);
  177. SetPlayerInterior(playerid, 3);
  178. SetPlayerHealth(playerid, 99.0);
  179. SetPlayerArmour(playerid, 99.0);
  180. TogglePlayerControllable(playerid, 0);
  181. freeze[playerid] = SetTimerEx("Freeze",3000, false, "i", playerid);
  182. }
  183. else if(PlayerInfo[playerid][pLider] == 11 || PlayerInfo[playerid][pClan] == 11)
  184. {
  185. SetPlayerPos(playerid, 681.4780,-473.5774,16.5363);
  186. SetPlayerInterior(playerid, 0);
  187. TogglePlayerControllable(playerid, 0);
  188. freeze[playerid] = SetTimerEx("Freeze",3000, false, "i", playerid);
  189. }
  190. else
  191. {
  192. PlayerInfo[playerid][pProveraSpawna] = SPAWN_NORMAL;
  193. new rand = random(sizeof(RandomSpawn));
  194. SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]);
  195. SetPlayerInterior(playerid, 0);
  196. }
  197. }
  198. else if(PlayerInfo[playerid][pProveraSpawna] == SPAWN_KUCA)
  199. {
  200. if(PlayerInfo[playerid][pPosedovanjeKuce] != -1)
  201. {
  202. new i = PlayerInfo[playerid][pPosedovanjeKuce];
  203. SetPlayerInterior(playerid, KucaInfo[i][kInt]); SetPlayerVirtualWorld(playerid, KucaInfo[i][kVW]);
  204. SetPlayerPos(playerid, KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]);
  205. }
  206. else
  207. {
  208. PlayerInfo[playerid][pProveraSpawna] = SPAWN_NORMAL;
  209. new rand = random(sizeof(RandomSpawn));
  210. SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]);
  211. SetPlayerInterior(playerid, 0);
  212. SetPlayerFacingAngle(playerid, 270.00);
  213. SetCameraBehindPlayer(playerid);
  214. ApplyAnimation(playerid,"PED","WALK_GANG1",4.1,1,1,1,50,1);
  215. }
  216. }
  217. else if(PlayerInfo[playerid][pProveraSpawna] == SPAWN_RENTKUCA)
  218. {
  219. if(PlayerInfo[playerid][pRent] != -1)
  220. {
  221. new i = PlayerInfo[playerid][pRent];
  222. SetPlayerInterior(playerid, KucaInfo[i][kInt]); SetPlayerVirtualWorld(playerid, KucaInfo[i][kVW]);
  223. SetPlayerPos(playerid, KucaInfo[i][kIzlazX], KucaInfo[i][kIzlazY], KucaInfo[i][kIzlazZ]);
  224. }
  225. else
  226. {
  227. PlayerInfo[playerid][pProveraSpawna] = SPAWN_NORMAL;
  228. new rand = random(sizeof(RandomSpawn));
  229. SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]);
  230. SetPlayerInterior(playerid, 0);
  231. SetPlayerFacingAngle(playerid, 270.00);
  232. SetCameraBehindPlayer(playerid);
  233. ApplyAnimation(playerid,"PED","WALK_GANG1",4.1,1,1,1,50,1);
  234. }
  235. }
  236. else if(PlayerInfo[playerid][pProveraSpawna] == SPAWN_STAN)
  237. {
  238. if(PlayerInfo[playerid][pPosedovanjeStana] != -1)
  239. {
  240. new i = PlayerInfo[playerid][pPosedovanjeStana];
  241. SetPlayerInterior(playerid, StanInfo[i][sInt]); SetPlayerVirtualWorld(playerid, StanInfo[i][sVW]);
  242. SetPlayerPos(playerid, StanInfo[i][sIzlazX], StanInfo[i][sIzlazY], StanInfo[i][sIzlazZ]);
  243. }
  244. else
  245. {
  246. PlayerInfo[playerid][pProveraSpawna] = SPAWN_NORMAL;
  247. new rand = random(sizeof(RandomSpawn));
  248. SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]);
  249. SetPlayerInterior(playerid, 0);
  250. SetPlayerFacingAngle(playerid, 270.00);
  251. SetCameraBehindPlayer(playerid);
  252. ApplyAnimation(playerid,"PED","WALK_GANG1",4.1,1,1,1,50,1);
  253. }
  254. }
  255. else if(PlayerInfo[playerid][pProveraSpawna] == SPAWN_VIKENDICA)
  256. {
  257. if(PlayerInfo[playerid][pPosedovanjeVikendice] != -1)
  258. {
  259. new i = PlayerInfo[playerid][pPosedovanjeVikendice];
  260. SetPlayerInterior(playerid, VikendiceInfo[i][viInt]); SetPlayerVirtualWorld(playerid, VikendiceInfo[i][viVW]);
  261. SetPlayerPos(playerid, VikendiceInfo[i][viIzlazX], VikendiceInfo[i][viIzlazY], VikendiceInfo[i][viIzlazZ]);
  262. }
  263. else
  264. {
  265. PlayerInfo[playerid][pProveraSpawna] = SPAWN_NORMAL;
  266. new rand = random(sizeof(RandomSpawn));
  267. SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]);
  268. SetPlayerInterior(playerid, 0);
  269. SetPlayerFacingAngle(playerid, 270.00);
  270. SetCameraBehindPlayer(playerid);
  271. ApplyAnimation(playerid,"PED","WALK_GANG1",4.1,1,1,1,50,1);
  272. }
  273. }
  274. return 1;
  275. }
Advertisement
Add Comment
Please, Sign In to add comment