Guest User

Untitled

a guest
May 19th, 2016
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.87 KB | None | 0 0
  1. public: PlayerTimer(playerid)
  2. {
  3. new string[175],AnimName[32],AnimLibrary[32];
  4. GetAnimationName(GetPlayerAnimationIndex(playerid), AnimLibrary, sizeof(AnimLibrary), AnimName, sizeof(AnimName));
  5. //******************************** UAC на оружие ********************************
  6. if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
  7. {
  8. if(PlayerInfo[playerid][pAdmin] == 0) UAC(playerid,"JetPack",true);
  9. }
  10. if(WeaponInfo[playerid][GetPlayerWeapon(playerid)] == false && GetPlayerWeapon(playerid) != 40 && GetPlayerWeapon(playerid) != 0 && GetPlayerWeapon(playerid) != 46)
  11. {
  12. if(PlayerInfo[playerid][pAdmin] == 0) UAC(playerid,"Weapon-Hack",true);
  13. }
  14. if(!IsPlayerInAnyVehicle(playerid))
  15. {
  16. if(AFK[playerid] < 2)
  17. {
  18. if(PlayerInfo[playerid][pAdmin] == 0)
  19. {
  20. if(TeleportTime{playerid} > 0) TeleportTime{playerid}--;
  21. GetPlayerPos(playerid, TelePos[playerid][3], TelePos[playerid][4], TelePos[playerid][5]);
  22. if(TelePos[playerid][5] > 550.0)
  23. {
  24. TelePos[playerid][0] = 0.0;
  25. TelePos[playerid][1] = 0.0;
  26. }
  27. if(TelePos[playerid][0] != 0.0)
  28. {
  29. new Float:xdist = TelePos[playerid][3]-TelePos[playerid][0];
  30. new Float:ydist = TelePos[playerid][4]-TelePos[playerid][1];
  31. new Float:sqxdist = xdist*xdist;
  32. new Float:sqydist = ydist*ydist;
  33. new Float:distance = (sqxdist+sqydist)/31;
  34. if(distance < 2000 && distance > 100 && !TeleportTime{playerid} && GetPlayerState(playerid) != PLAYER_STATE_SPECTATING && GetPVarInt(playerid,"Crasher") <= gettime())
  35. {
  36. frm(string,"[UAC]: %s[%d] подозревается в читерстве Air-Break/Fly-Hack. Дистанция: %.1f.",PN(playerid),playerid,distance);
  37. ABroadCast(COLOR_LIGHTRED,string,1);
  38. SetPVarInt(playerid,"CheatLimit",GetPVarInt(playerid,"CheatLimit") + 1);
  39. }
  40. if(distance > 2000 && distance < 50000 && !TeleportTime{playerid} && GetPlayerState(playerid) != PLAYER_STATE_SPECTATING && GetPVarInt(playerid,"Crasher") <= gettime())
  41. {
  42. frm(string,"[UAC]: %s[%d] подозревается в читерстве Teleport. Дистанция: %.1f.",PN(playerid),playerid,distance);
  43. ABroadCast(COLOR_LIGHTRED,string,1);
  44. SetPVarInt(playerid,"CheatLimit",GetPVarInt(playerid,"CheatLimit") + 1);
  45. }
  46. }
  47. if(TelePos[playerid][5] < 550.0 && TelePos[playerid][3] != 0.0)
  48. {
  49. TelePos[playerid][0] = TelePos[playerid][3];
  50. TelePos[playerid][1] = TelePos[playerid][4];
  51. }
  52. }
  53. }
  54. }
  55. if(GetPVarInt(playerid,"UseDialogID") == D_LOGIN && IsPlayerLogged[playerid] == false)
  56. {
  57. LoginTimer[playerid]++;
  58. if(LoginTimer[playerid] > 30) SendClientMessage(playerid, COLOR_LIGHTRED, "Вы были исключены с сервера, Время на авторизацию вышло."),LoginTimer[playerid] = 0,KickEx(playerid);
  59. }
  60. if(racing1 != -1 && racing2 != -1)
  61. {
  62. if(PlayerR1[playerid] == -1)
  63. {
  64. ractime = 10;
  65. PlayerT[playerid] = true;
  66. PlayerR1[playerid] = racing2;
  67. SendClientMessage(playerid,COLOR_LIME,"Приготовьтесь скоро начнётся бой, отправьте соперника в нокаут.");
  68. }
  69. if(PlayerR2[playerid] == -1)
  70. {
  71. PlayerT[playerid] = true;
  72. PlayerR2[playerid] = racing1;
  73. SendClientMessage(playerid,COLOR_LIME,"Приготовьтесь скоро начнётся бой, отправьте соперника в нокаут.");
  74. }
  75. }
  76. if(PlayerT[playerid] == true)
  77. {
  78. if(ractime > 0)
  79. {
  80. ractime--;
  81. format(string,sizeof(string),"~g~%d",ractime);
  82. GameTextForPlayer(playerid, string, 1000, 6);
  83. }
  84. }
  85.  
  86. if(ractime == 0)
  87. {
  88. if(PlayerT[playerid] == true)
  89. {
  90. SetCameraBehindPlayer(playerid);
  91. TogglePlayerControllableEx(playerid,true);
  92. PlayerT[playerid] = false;
  93. }
  94. }
  95. if(GetPlayerState(playerid) == 2)
  96. {
  97. if(AFK[playerid] < 2)
  98. {
  99. if(PlayerInfo[playerid][pAdmin] == 0)
  100. {
  101. new carid = GetPlayerVehicleID(playerid);
  102. GetVehiclePos(carid, TelePos[playerid][3], TelePos[playerid][4], TelePos[playerid][5]);
  103. if(TelePos[playerid][5] > 550.0)
  104. {
  105. TelePos[playerid][0] = 0.0;
  106. TelePos[playerid][1] = 0.0;
  107. }
  108. if(TelePos[playerid][0] != 0.0)
  109. {
  110. new Float:xdist = TelePos[playerid][3]-TelePos[playerid][0];
  111. new Float:ydist = TelePos[playerid][4]-TelePos[playerid][1];
  112. new Float:sqxdist = xdist*xdist;
  113. new Float:sqydist = ydist*ydist;
  114. new Float:distance = (sqxdist+sqydist)/31;
  115. if(distance > 300)
  116. {
  117. if(!TeleportTime{playerid} && GetPVarInt(playerid,"Crasher") <= gettime())
  118. {
  119. frm(string,"[UAC]: %s[%d] подозревается в читерстве Air-Break/Teleport (CAR) Дистанция: %.1f.",PN(playerid),playerid,distance);
  120. ABroadCast(COLOR_LIGHTRED,string,1);
  121. SetPVarInt(playerid,"CheatLimit",GetPVarInt(playerid,"CheatLimit") + 1);
  122. }
  123. }
  124. }
  125. if(TelePos[playerid][5] < 550.0 && TelePos[playerid][3] != 0.0)
  126. {
  127. TelePos[playerid][0] = TelePos[playerid][3];
  128. TelePos[playerid][1] = TelePos[playerid][4];
  129. }
  130. }
  131. }
  132. }
  133. new Float:currentPos[3];
  134. GetPlayerPos(playerid,currentPos[0],currentPos[1],currentPos[2]);
  135. pTemp[playerid][pX] = currentPos[0];
  136. pTemp[playerid][pY] = currentPos[1];
  137. pTemp[playerid][pZ] = currentPos[2];
  138. SetPVarInt(playerid,"CrashCarsAC",0);
  139. if(GetPVarInt(playerid,"CheatLimit") >= 5) return UAC(playerid,"Air-Break/FlyHack/TP",true);
  140. if(!IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) != 9)
  141. {
  142. if(AFK[playerid] < 2)
  143. {
  144. if(PlayerInfo[playerid][pAdmin] == 0)
  145. {
  146. new Float:posx, Float:posy, Float:posz;
  147. GetPlayerPos(playerid, posx, posy, posz);
  148. if(posz >= 2 && !TeleportTime{playerid})
  149. {
  150. if(strcmp(AnimLibrary, "SWIM", true) == 0 && strcmp(AnimName, "SWIM_crawl", true) == 0 && GetPVarInt(playerid,"Crasher") <= gettime())
  151. {
  152. SetPVarInt(playerid,"Flylimit",GetPVarInt(playerid,"Flylimit") + 1);
  153. UAC(playerid,"Fly-Hack",false);
  154. if(GetPVarInt(playerid,"Flylimit") >= 4) return UAC(playerid,"Fly-Hack",true);
  155. }
  156. }
  157. }
  158. }
  159. }
  160. if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && IsPlayerLogged[playerid] == true && GetPVarInt(playerid,"Crasher") <= gettime())
  161. {
  162. new Float:vec[3];
  163. GetPlayerCameraFrontVector(playerid, vec[0], vec[1], vec[2]);
  164. new bool:crasher = false;
  165. for (new i = 0; !crasher && i < sizeof(vec); i++)
  166. if(floatabs(vec[i]) > 10.0)
  167. crasher = true;
  168.  
  169. if(crasher)
  170. {
  171. UAC(playerid,"Crasher",true);
  172. }
  173. }
  174.  
  175. if(GetPlayerSurfingVehicleID(playerid) != INVALID_VEHICLE_ID)
  176. {
  177. if(PlayerInfo[playerid][pAdmin] == 0)
  178. {
  179. new cid = GetPlayerSurfingVehicleID(playerid);
  180. new cm = GetVehicleModel(cid); // получаем модель авто
  181. switch(cm)
  182. {
  183. case 430,446,452,453,454,472,473,484,493,595,478: { return true; } // если это лодка, скидывать ненадо)
  184. default: { }
  185. }
  186. pTemp[playerid][pX] -= 1.5;
  187. SetPlayerPosEx(playerid,pTemp[playerid][pX],pTemp[playerid][pY],pTemp[playerid][pZ]);
  188. }
  189. }
  190. //******************************** UAC на пиздорванку *******************************
  191. new Float:xw, Float:yw, Float:zw;
  192. GetPlayerVelocity(playerid,xw,yw,zw);
  193. if(xw > 2.0 || yw > 2.0)
  194. {
  195. Pizdorvanka[playerid]++;
  196. if(Pizdorvanka[playerid] >= 3)
  197. {
  198. UAC(playerid,"Пиздарванка",true);
  199. Pizdorvanka[playerid] = 0;
  200. }
  201. }
  202. //
  203. switch(CreateMats[playerid])
  204. {
  205. case 2, 4, 6, 9:
  206. {
  207. if(IsAZavodSkin(playerid))
  208. {
  209. ApplyAnimation(playerid, "CARRY", "CRRY_PRTIAL", 4.1, 0, 1, 1, 1, 1, 1);
  210. }
  211. }
  212. }
  213. //******************************** UAC на быструю езду на мопеде *******************************
  214. if(IsPlayerInAnyVehicle(playerid) && GetVehicleModel(GetPlayerVehicleID(playerid)) == 462 && SpeedVehicle(playerid) > 110)
  215. {
  216. if(PlayerInfo[playerid][pAdmin] == 0) UAC(playerid, "Быстрая езда",true);
  217. }
  218. //******************************** UAC на fly *******************************
  219. if(SpeedVehicle(playerid) > 40 && strcmp(AnimLibrary, "SWIM", true) == 0 && strcmp(AnimName, "SWIM_crawl", true) == 0 && !IsPlayerInAnyVehicle(playerid))
  220. {
  221. if(PlayerInfo[playerid][pAdmin] == 0) UAC(playerid, "Fly-Hack",true);
  222. }
  223. //******************************** UAC на fly *******************************
  224. if(SpeedVehicle(playerid) > 40 && GetPlayerWeapon(playerid) != 46 && strcmp(AnimName, "FALL_SKYDIVE_ACCEL", true) == 0 && !IsPlayerInAnyVehicle(playerid))
  225. {
  226. if(PlayerInfo[playerid][pAdmin] == 0) UAC(playerid, "Fly-Hack",true);
  227. }
  228. //
  229. new Float:armour;
  230. GetPlayerArmour(playerid, armour);
  231. if(pTemp[playerid][pAmountArmour] < armour) SetPlayerArmour(playerid, pTemp[playerid][pAmountArmour]);
  232. else pTemp[playerid][pAmountArmour] = armour;
  233. //
  234. if(pTemp[playerid][pHealthON] == 0)
  235. {
  236. new Float: Health;
  237. GetPlayerHealth(playerid, Health);
  238. if(pTemp[playerid][pAmountHealth] < Health) SetPlayerHealth(playerid, pTemp[playerid][pAmountHealth]);
  239. else pTemp[playerid][pAmountHealth] = Health;
  240. }
  241. else pTemp[playerid][pHealthON] = 0;
  242.  
  243. if(PlayerInfo[playerid][pCash] > GetPlayerMoney(playerid))// условие: если у игрока денег выданных сервером больше чем игровых.
  244. {
  245. ResetPlayerMoney(playerid);
  246. GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
  247. }
  248. else if(PlayerInfo[playerid][pCash] < GetPlayerMoney(playerid))// условие: если игровых денег у игрока больше чем выданных сервером.
  249. {
  250. ResetPlayerMoney(playerid);
  251. GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
  252. }
  253. if(IsAtFerris(playerid))
  254. {
  255. if(!PlayerInfo[playerid][pFerrisTicket])
  256. {
  257. SetPlayerPosEx(playerid,385.7043,-2028.6235,7.8359);
  258. }
  259. }
  260.  
  261. if(PlayerToActor(1.2, playerid, Actor[0]))
  262. {
  263. if(SpawnActor[playerid] == false)
  264. {
  265. if(SpawnActor_Timer[playerid] <= 0)
  266. {
  267. ShowPlayerDialog(playerid, 1521, DIALOG_STYLE_LIST, "Чем могу помочь?","Как тебя зовут?\nГде можно поселится\nКакие работы посоветуешь?\nКак мне устроиться на работу?\nУ тебя нет для меня работы?\nИзвини, я забыл что хотел спросить.", "Select","Cancel");
  268. SpawnActor[playerid] = true;
  269. }
  270. }
  271. }
  272. SpawnActor_Timer[playerid] --;
  273.  
  274. if(GetPVarInt(playerid, "BusTime") > 0)
  275. {
  276. SetPVarInt(playerid, "BusTime", GetPVarInt(playerid, "BusTime") - 1);
  277. format(string,10,"~r~%d",GetPVarInt(playerid, "BusTime"));
  278. ShowMesageTD(playerid, string);
  279. if(GetPVarInt(playerid, "BusTime") == 0)
  280. {
  281. frm(string, "Рабочий день завершен. Вами заработано: $%d. За ремонт: -$%d", GetPVarInt(playerid, "BusMoney"), GetPVarInt(playerid,"BusRepairMoney"));
  282. SendClientMessage(playerid, COLOR_LIGHTRED, string);
  283. SetVehicleToRespawn(GetPVarInt(playerid, "rentcar_job"));
  284. Delete3DTextLabel(JobText3D[GetPlayerVehicleID(playerid)]);
  285. PlayerInfo[playerid][pCash] += GetPVarInt(playerid,"BusMoney");
  286. PlayerInfo[playerid][pCash] -= GetPVarInt(playerid,"BusRepairMoney");
  287. DeletePVar(playerid, "BusTime");
  288. DeletePVar(playerid, "TypeBus");
  289. DeletePVar(playerid, "BusStop");
  290. DeletePVar(playerid, "BusMoney");
  291. DeletePVar(playerid, "BusRepairMoney");
  292. DeletePVar(playerid, "rentcar_job");
  293. pPressed[playerid] = 0;
  294. }
  295. }
  296. if(GetPVarInt(playerid, "TimeBus") > 0)
  297. {
  298. SetPVarInt(playerid, "TimeBus", GetPVarInt(playerid, "TimeBus") - 1);
  299. format(string,32,"~r~%d",GetPVarInt(playerid, "TimeBus"));
  300. ShowMesageTD(playerid, string);
  301. if(GetPVarInt(playerid, "TimeBus") == 0)
  302. {
  303. DeletePVar(playerid, "TimeBus");
  304. new type = GetPVarInt(playerid, "TypeBus"), p = pPressed[playerid];
  305. SetPVarInt(playerid, "BusStop", 1);
  306. if(type == 1) SetPlayerRaceCheckpoint(playerid,0,BusCityLS[p][0],BusCityLS[p][1],BusCityLS[p][2],BusCityLS[p][3],BusCityLS[p][4],BusCityLS[p][5],5.0);
  307. if(type == 2) SetPlayerRaceCheckpoint(playerid,0,BusCitySF[p][0],BusCitySF[p][1],BusCitySF[p][2],BusCitySF[p][3],BusCitySF[p][4],BusCitySF[p][5],5.0);
  308. if(type == 3) SetPlayerRaceCheckpoint(playerid,0,BusCityLV[p][0],BusCityLV[p][1],BusCityLV[p][2],BusCityLV[p+1][0],BusCityLV[p+1][1],BusCityLV[p+1][2],5.0);
  309. if(type == 4) SetPlayerRaceCheckpoint(playerid,0,BusSchool[p][0],BusSchool[p][1],BusSchool[p][2],BusSchool[p][3],BusSchool[p][4],BusSchool[p][5],5.0);
  310. if(type == 5) SetPlayerRaceCheckpoint(playerid,0,BusLSLV[p][0],BusLSLV[p][1],BusLSLV[p][2],BusLSLV[p][3],BusLSLV[p][4],BusLSLV[p][5],5.0);
  311. if(type == 6) SetPlayerRaceCheckpoint(playerid,0,BusLSZavodi[p][0],BusLSZavodi[p][1],BusLSZavodi[p][2],BusLSZavodi[p][3],BusLSZavodi[p][4],BusLSZavodi[p][5],5.0);
  312. }
  313. }
  314. //
  315. if(Smoke[playerid] == 1)
  316. {
  317. if(SmokeTime[playerid] > 0)
  318. {
  319. SmokeTime[playerid] --;
  320. if(!SmokeTime[playerid])
  321. {
  322. new Float:Health;
  323. GetPlayerHealth(playerid, Health);
  324. SetPlayerSpecialActionEx(playerid,SPECIAL_ACTION_SMOKE_CIGGY);
  325. SetPlayerHealth(playerid,Health+5);
  326. if(Smokes[playerid] >= 4)
  327. {
  328. frm(string,"* %s докурил(а) сигарету и выбросил(а) окурок",cPN(playerid));
  329. ProxDetector(15.0,playerid,string,COLOR_PURPLE);
  330. SmokeTime[playerid] = 0;
  331. Smokes[playerid] = 0;
  332. Smoke[playerid] = 0;
  333. }
  334. else
  335. {
  336. Smokes[playerid] ++;
  337. SmokeTime[playerid] = 10;
  338. frm(string,"* %s стряхнул(а) пепел",cPN(playerid));
  339. ProxDetector(15.0,playerid,string,COLOR_PURPLE);
  340. }
  341. }
  342. }
  343. }
  344. //
  345. if(GetPlayerVehicleID(playerid) <= TOTALCARS)
  346. {
  347. new Float:probeg = (SpeedVehicle(playerid)/7.5)/500;
  348. if(probeg > 0) CarsInfo[GetPlayerVehicleID(playerid)][vProbeg] += probeg;
  349. }
  350. //
  351. if(onBed[playerid] > 0)
  352. {
  353. frm(string, "~r~%d",onBed[playerid]);
  354. GameTextForPlayer(playerid, string, 1000, 6);
  355. onBed[playerid] --;
  356. if(!onBed[playerid])
  357. {
  358. SetPlayerInterior(playerid, 0);//Замените на свою функцию
  359. SetPlayerVirtualWorld(playerid, 0);//Замените на свою функцию
  360. SendClientMessage(playerid, 0xBFC0C2FF,"Вас выпустили из госпиталя, берегите здоровие!");//Замените на свою функцию
  361. SetPlayerPosEx(playerid,156.2945,1955.5758,19.6265);//Замените на свою функцию
  362. SetPlayerFacingAngle(playerid, 90.0);
  363. SetCameraBehindPlayer(playerid);
  364. TogglePlayerControllableEx(playerid, true);//Замените на свою функцию
  365. SetPlayerHealth(playerid,100);
  366. }
  367. }
  368. if(PlayerInfo[playerid][pHeal] > 0 && onBed[playerid] == 0)
  369. {
  370. PlayerInfo[playerid][pHealTime] ++;
  371. if(PlayerInfo[playerid][pHealTime] >= 10)
  372. {
  373. PlayerInfo[playerid][pHealTime] = 0;
  374. new Float:Health;
  375. GetPlayerHealth(playerid,Health);
  376. if(!PlayerLie[playerid])
  377. {
  378. Health += 1.0;
  379. if(PlayerInfo[playerid][pVIP] != 0) Health += 2.0;
  380. frm(string,"%.0f.0 HP",Health);
  381. GameTextForPlayer(playerid, string, 0, 1);
  382. }
  383. else
  384. {
  385. Health += 3.0;
  386. if(PlayerInfo[playerid][pVIP] != 0) Health += 2.0;
  387. frm(string,"%.0f.0 HP",Health);
  388. GameTextForPlayer(playerid, string, 0, 1);
  389. }
  390. SetPlayerHealth(playerid,Health);
  391. if(Health >= 99.0)
  392. {
  393. if(PlayerLie[playerid])
  394. {
  395. new bed = PlayerBed[playerid];
  396. ClearAnims(playerid);
  397. SetPlayerPosEx(playerid,HealInfo[bed][hCP][0],HealInfo[bed][hCP][1],HealInfo[bed][hCP][2]);
  398. SetPlayerFacingAngle(playerid,180.0);
  399. CheckBed(playerid);
  400. }
  401. PlayerInfo[playerid][pHeal] = 0;
  402. SetPlayerHealth(playerid,100);
  403. SendClientMessage(playerid,COLOR_LIGHTBLUE,"Вы здоровы и можете покинуть больницу");
  404. }
  405. }
  406. }
  407. AFK[playerid]++;
  408. if(AFK[playerid] > 2)
  409. {
  410. new result[10];
  411. Convert(AFK[playerid],result);
  412. frm(string,"В AFK {AA3333}( %s )",result);
  413. SetPlayerChatBubble(playerid,string,COLOR_WHITE,30.0,3000);
  414. if(AFK[playerid] >= 1200) ApplyAnimation(playerid, "MISC", "Scratchballs_01", 4.0, 0, 1, 1, 0, 0);
  415. }
  416. if(GetPVarInt(playerid,"GotoME")) OnPlayerInConvoi(playerid);
  417.  
  418. if(PlayerInfo[playerid][pLevel] == 0 && pRegister[playerid] == 1 && IsPlayerLogged[playerid] == true)
  419. {
  420. if(GetPlayerVirtualWorld(playerid) != playerid)
  421. {
  422. SpawnPlayer(playerid);
  423. }
  424. }
  425. if(PlayerInfo[playerid][pJail] == 2 && PlayerInfo[playerid][pAdmin] == 0 && IsPlayerLogged[playerid] == true)
  426. {
  427. if(GetPlayerVirtualWorld(playerid) != 999+playerid)
  428. {
  429. SpawnPlayer(playerid);
  430. }
  431. }
  432. //==========================================================================
  433. if(GetPlayerSpeed(playerid) > 5 && Cuffed{playerid} == true)
  434. {
  435. if(!IsPlayerInAnyVehicle(playerid))
  436. {
  437. if(SystemFlood[playerid] <= 0)
  438. {
  439. SendClientMessage(playerid, COLOR_WHITE, "Вы в наручниках, Используйте {9ACD32}ALT {FFFFFF}чтобы идти за полицейским.");
  440. }
  441. TogglePlayerControllableEx(playerid, false);
  442. ApplyAnimation(playerid, "PED", "GETUP_FRONT", 4.0, 0, 1, 1, 0, 0, 1);
  443. SetTimerEx("UnFreeze", 3000, 0, "%d", playerid);
  444. SystemFlood[playerid] = 30;
  445. }
  446. }
  447. //==========================================================================
  448. if(UseDrugsTime[playerid] > 0)
  449. {
  450. UseDrugsTime[playerid] --;
  451. if(UseDrugsTime[playerid] <= 120)
  452. {
  453. if(DrugsCrack{playerid})
  454. {
  455. DrugsCrack{playerid} = false;
  456. ClearAnimations(playerid);
  457. }
  458. if(!UseDrugsTime[playerid])
  459. {
  460. SetPlayerWeather(playerid,DefaultWeather);
  461. }
  462. }
  463. }
  464. if(DrugsCrack{playerid})
  465. {
  466. if(IsPlayerInAnyVehicle(playerid)) RemovePlayerFromVehicle(playerid);
  467. else ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.1, 0, 1, 1, 1, 0, 1);
  468. }
  469. //==========================================================================
  470. if(FreezeTime[playerid] > 0)
  471. {
  472. FreezeTime[playerid] --;
  473. if(!FreezeTime[playerid])
  474. {
  475. ShowPlayerDialog(playerid, D_NULL, 0, "{10F441}Вы разморожены", "{FFFFFF}Вы были разморожены.", "Ок", "");
  476. TogglePlayerControllableEx(playerid, true);
  477. }
  478. else
  479. {
  480. frm(string,"{FFFFFF}Вы были заморожены на 5 секунд.\nДо разморозки: {FF9900}%d{FFFFFF} секунд.",FreezeTime[playerid]);
  481. ShowPlayerDialog(playerid, 95, 0, "{FF6347}ДМ запрещен", string, "Ок", "");
  482. }
  483. }
  484. if(NoPlayerDM{playerid})
  485. {
  486. new team = Team(playerid);
  487. if(CapturedGZ[team] == -1 && CaptureGZ[team] == -1)
  488. {
  489. if(GetPlayerWeapon(playerid) != 43)
  490. {
  491. SetPlayerArmedWeapon(playerid,0);
  492. }
  493. }
  494. }
  495. if(IsPlayerApplyAnimation(playerid, "FALL_back")
  496. || IsPlayerApplyAnimation(playerid, "FALL_collapse")
  497. || IsPlayerApplyAnimation(playerid, "FALL_fall")
  498. || IsPlayerApplyAnimation(playerid, "FALL_front")
  499. || IsPlayerApplyAnimation(playerid, "FALL_glide")
  500. || IsPlayerApplyAnimation(playerid, "FALL_land")
  501. || IsPlayerApplyAnimation(playerid, "FALL_skyDive")
  502. || IsPlayerApplyAnimation(playerid, "JUMP_glide")
  503. || IsPlayerApplyAnimation(playerid, "JUMP_land")
  504. || IsPlayerApplyAnimation(playerid, "JUMP_launch")
  505. || IsPlayerApplyAnimation(playerid, "JUMP_launch_R"))
  506. {
  507. if(PlayerInfo[playerid][pJob] == J_FACTORY)
  508. {
  509. if(InJob[playerid] == 3)
  510. {
  511. SendClientMessage(playerid, COLOR_WHITE, "Вы уронили коробку/мешок");
  512. ReloadAllAnims(playerid);
  513. RemovePlayerAttachedObject(playerid, 0);
  514. }
  515. }
  516. }
  517. if(LieReset[playerid] > 0) LieReset[playerid] --;
  518. if(LastPSave[playerid]) LastPSave[playerid]--;
  519. if(DMCount[playerid] > 0) DMCount[playerid] --;
  520. if(CreateMats[playerid] == 4) ApplyAnimation(playerid, "CARRY", "CRRY_PRTIAL", 4.1, 0, 1, 1, 1, 1, 1);
  521. if(RepairTimer[playerid] > 0)
  522. {
  523. RepairTimer[playerid] --;
  524. frm(string,"~g~Repair: ~w~%d",RepairTimer[playerid]);
  525. GameTextForPlayer(playerid, string, 600, 6);
  526. if(RepairTimer[playerid] == 0) RepaircarOut(playerid);
  527. }
  528. if(PlayerInfo[playerid][pContractTime] > 0) PlayerInfo[playerid][pContractTime]--;
  529. new Speedtimer = 0;
  530. Speedtimer++;
  531. if(Speedtimer == 45)
  532. {
  533. Speedtimer = 0;
  534. if(SpeedKick[playerid] > 0) SpeedKick[playerid] -= 2;
  535. }
  536. if(FindPlayer[playerid] != INVALID_PLAYER_ID)
  537. {
  538. new find = FindPlayer[playerid];
  539. if(IsPlayerInDynamicArea(playerid, PlayerFindZone[find]))
  540. {
  541. new Float:X, Float:Y, Float:Z;
  542. GetPlayerPos(FindPlayer[playerid], X, Y, Z);
  543. SetPlayerMapIcon(playerid, 97, X, Y, Z, 56, 0, MAPICON_GLOBAL);
  544. }
  545. else
  546. {
  547. RemovePlayerMapIcon(playerid, 97);
  548. }
  549. }
  550.  
  551. if(Clother[playerid] != -1)
  552. {
  553. if(PlayerInfo[playerid][pChar] != 0)
  554. {
  555. if(!IsPlayerInRangeOfPoint(playerid, 1.0, 199.1063, -128.3574, 1003.5152))
  556. {
  557. Clother[playerid] = -1;
  558. TogglePlayerControllableEx(playerid, true);
  559. if(PlayerInfo[playerid][pMember] > 0) SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  560. else SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
  561. SetCameraBehindPlayer(playerid);
  562. }
  563. }
  564. }
  565. if(TimesShow[playerid] > 0)
  566. {
  567. TimesShow[playerid] --;
  568. if(TimesShow[playerid] == 0)
  569. {
  570. TimesShow[playerid] = 0;
  571. TextDrawHideForPlayer(playerid,Text:Times);
  572. }
  573. }
  574. if(PlayerInfo[playerid][pJailTime] > 0)
  575. {
  576. PlayerInfo[playerid][pJailTime] --;
  577. if(!PlayerInfo[playerid][pJailTime])
  578. {
  579. if(PlayerInfo[playerid][pMember] > 0) SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  580. else SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
  581. ShowMesageTD(playerid,"~y~Freedom");
  582. SendClientMessage(playerid,COLOR_LIGHTBLUE,"Вы отсидели свой срок и были выпущены");
  583. SetPlayerInterior(playerid, 0);
  584. SetPlayerVirtualWorld(playerid, 0);
  585. SetPlayerPosEx(playerid,1546.7046,-1675.4485,13.5628);
  586. SetPlayerFacingAngle(playerid, 86.9815);
  587. PlayerInfo[playerid][pJail] = 0;
  588. PlayerInfo[playerid][pBailPrice] = 0;
  589. SetCameraBehindPlayer(playerid);
  590.  
  591. }
  592. }
  593. if(ResetGunsUP[playerid] > 0)
  594. {
  595. ResetGunsUP[playerid] --;
  596. }
  597. if(PlayerInfo[playerid][pMuteTime] > 0)
  598. {
  599. PlayerInfo[playerid][pMuteTime] --;
  600. if(!PlayerInfo[playerid][pMuteTime])
  601. {
  602. SendClientMessage(playerid,COLOR_LIGHTGREEN,"[UnMute]: Не нарушайте правила сервера!");
  603. }
  604. }
  605. if(TazerTime[playerid] > 0)
  606. {
  607. TazerTime[playerid]--;
  608. if(TazerTime[playerid] == 0)
  609. {
  610. TogglePlayerControllableEx(playerid, true);
  611. ClearAnimations(playerid);
  612. }
  613. }
  614. if(PlayerInfo[playerid][pFMuteTime] > 0)
  615. {
  616. PlayerInfo[playerid][pFMuteTime] --;
  617. if(!PlayerInfo[playerid][pFMuteTime])
  618. {
  619. SendClientMessage(playerid,COLOR_LIGHTGREEN,"[UnMute]: Ваша рация была разблокирована!");
  620. }
  621. }
  622. if(TransferReset[playerid] > 0)
  623. {
  624. TransferReset[playerid] --;
  625. }
  626. if(PlayerInfo[playerid][pDCTime] > 0)
  627. {
  628. PlayerInfo[playerid][pDCTime] --;
  629. }
  630. if(GetPVarInt(playerid, "TheifTime") > 0)
  631. {
  632. SetPVarInt(playerid, "TheifTime", GetPVarInt(playerid, "TheifTime") - 1);
  633. new result[10];
  634. Convert(GetPVarInt(playerid, "TheifTime"),result);
  635. format(string,10,"~r~%s",result);
  636. if(GetPVarInt(playerid, "TheifTime") == 1)
  637. {
  638. if(PlayerInfo[playerid][pJackSkill] !=0){ PlayerInfo[playerid][pJackSkill] -=1; }
  639. SendClientMessage(playerid, 0xFDE640AA,"SMS: Вы не справились... Отправитель: Неизвестно");
  640. DestroyVehicleAC(TheifCar[playerid][0]);
  641. DeletePVar(playerid, "TheifTime");
  642. }
  643. }
  644. if(RepairReset[playerid] > 0)
  645. {
  646. RepairReset[playerid] --;
  647. }
  648. if(CuffedTime[playerid] > 0)
  649. {
  650. CuffedTime[playerid]--;
  651. if(!CuffedTime[playerid])
  652. {
  653. Cuffed{playerid} = false;
  654. }
  655. }
  656. if(IznasTime[playerid] > 0)
  657. {
  658. IznasTime[playerid] --;
  659. }
  660. if(PickUpTime[playerid] > 0)
  661. {
  662. if(PlayerInfo[playerid][pEnterKey] == 0) PickUpTime[playerid] --;
  663. }
  664. if(SystemFlood[playerid] > 0)
  665. {
  666. SystemFlood[playerid] --;
  667. }
  668. if(PlayerInfo[playerid][pAdminTime] > 0)
  669. {
  670. PlayerInfo[playerid][pAdminTime] --;
  671. }
  672. //======================================================================
  673. if(IsPlayerInAnyVehicle(playerid))
  674. {
  675. new carid = GetPlayerVehicleID(playerid);
  676. new myseat = GetPlayerVehicleSeat(playerid);
  677. if(VehicleSeat[carid][myseat] != playerid) VehicleSeat[carid][myseat] = playerid;
  678. if(CarTest[playerid] >= 0)
  679. {
  680. new Float:VHealth;
  681. GetVehicleHealth(carid,VHealth);
  682. if(VHealth < 900)
  683. {
  684. SendClientMessage(playerid,COLOR_GREY,"Вы провалили тест т.к повредили авто.");
  685. SetVehicleToRespawn(carid);
  686. new i = CarTest[playerid];
  687. TogglePlayerDynamicRaceCP(playerid, Test_CP[i], false);
  688. CarTest[playerid] = -1;
  689. SaveAccount(playerid);
  690. return true;
  691. }
  692. }
  693. else if(GetPlayerState(playerid) != 2)
  694. {
  695. if(IsATaxi(carid))
  696. {
  697. new id = GetVehicleSeat(carid, 0);
  698. if(id != INVALID_PLAYER_ID && PlayerInfo[id][pJob] == J_TAXI) //JOB_TAXI
  699. {
  700. if(Taxi_GO[playerid] == 2)
  701. {
  702. TaxiDistance[playerid] += GetPlayerVehicleSpeed(playerid);
  703. if(TaxiDistance[playerid] >= 300)
  704. {
  705. TaxiDistance[playerid] = 0;
  706. if(PlayerInfo[playerid][pCash] > TaxiPrice[playerid])
  707. {
  708. TaxiPrice[playerid] += TaxiTarif[id];
  709. frm(string,"$%d",TaxiPrice[playerid]);
  710. PlayerTextDrawSetString(playerid, TaxiDraw[playerid],string);
  711. new money;
  712. for(new k = 1; k < 4; k ++)
  713. {
  714. new seat = GetVehicleSeat(carid, k);
  715. if(seat != INVALID_PLAYER_ID) money += TaxiPrice[seat];
  716. }
  717. frm(string,"$%d",money);
  718. PlayerTextDrawSetString(id, TaxiDraw[id],string);
  719. }
  720. else if(SystemFlood[id] <= 0)
  721. {
  722. new str[128];
  723. format(str, sizeof(str), "У пасажира %s недостаточно денег!", PN(playerid));
  724. SendClientMessage(id,COLOR_YELLOW, str);
  725. SendClientMessage(playerid,COLOR_YELLOW, "У вас недостаточно денег!");
  726. SystemFlood[id] = 5;
  727. }
  728. }
  729. }
  730. }
  731. }
  732. }
  733. }
  734. players_timer[playerid] = SetTimerEx("PlayerTimer",1000,false,"d",playerid);
  735. return true;
  736. }
Add Comment
Please, Sign In to add comment