Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public: PlayerTimer(playerid)
- {
- new string[175],AnimName[32],AnimLibrary[32];
- GetAnimationName(GetPlayerAnimationIndex(playerid), AnimLibrary, sizeof(AnimLibrary), AnimName, sizeof(AnimName));
- //******************************** UAC на оружие ********************************
- if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
- {
- if(PlayerInfo[playerid][pAdmin] == 0) UAC(playerid,"JetPack",true);
- }
- if(WeaponInfo[playerid][GetPlayerWeapon(playerid)] == false && GetPlayerWeapon(playerid) != 40 && GetPlayerWeapon(playerid) != 0 && GetPlayerWeapon(playerid) != 46)
- {
- if(PlayerInfo[playerid][pAdmin] == 0) UAC(playerid,"Weapon-Hack",true);
- }
- if(!IsPlayerInAnyVehicle(playerid))
- {
- if(AFK[playerid] < 2)
- {
- if(PlayerInfo[playerid][pAdmin] == 0)
- {
- if(TeleportTime{playerid} > 0) TeleportTime{playerid}--;
- GetPlayerPos(playerid, TelePos[playerid][3], TelePos[playerid][4], TelePos[playerid][5]);
- if(TelePos[playerid][5] > 550.0)
- {
- TelePos[playerid][0] = 0.0;
- TelePos[playerid][1] = 0.0;
- }
- if(TelePos[playerid][0] != 0.0)
- {
- new Float:xdist = TelePos[playerid][3]-TelePos[playerid][0];
- new Float:ydist = TelePos[playerid][4]-TelePos[playerid][1];
- new Float:sqxdist = xdist*xdist;
- new Float:sqydist = ydist*ydist;
- new Float:distance = (sqxdist+sqydist)/31;
- if(distance < 2000 && distance > 100 && !TeleportTime{playerid} && GetPlayerState(playerid) != PLAYER_STATE_SPECTATING && GetPVarInt(playerid,"Crasher") <= gettime())
- {
- frm(string,"[UAC]: %s[%d] подозревается в читерстве Air-Break/Fly-Hack. Дистанция: %.1f.",PN(playerid),playerid,distance);
- ABroadCast(COLOR_LIGHTRED,string,1);
- SetPVarInt(playerid,"CheatLimit",GetPVarInt(playerid,"CheatLimit") + 1);
- }
- if(distance > 2000 && distance < 50000 && !TeleportTime{playerid} && GetPlayerState(playerid) != PLAYER_STATE_SPECTATING && GetPVarInt(playerid,"Crasher") <= gettime())
- {
- frm(string,"[UAC]: %s[%d] подозревается в читерстве Teleport. Дистанция: %.1f.",PN(playerid),playerid,distance);
- ABroadCast(COLOR_LIGHTRED,string,1);
- SetPVarInt(playerid,"CheatLimit",GetPVarInt(playerid,"CheatLimit") + 1);
- }
- }
- if(TelePos[playerid][5] < 550.0 && TelePos[playerid][3] != 0.0)
- {
- TelePos[playerid][0] = TelePos[playerid][3];
- TelePos[playerid][1] = TelePos[playerid][4];
- }
- }
- }
- }
- if(GetPVarInt(playerid,"UseDialogID") == D_LOGIN && IsPlayerLogged[playerid] == false)
- {
- LoginTimer[playerid]++;
- if(LoginTimer[playerid] > 30) SendClientMessage(playerid, COLOR_LIGHTRED, "Вы были исключены с сервера, Время на авторизацию вышло."),LoginTimer[playerid] = 0,KickEx(playerid);
- }
- if(racing1 != -1 && racing2 != -1)
- {
- if(PlayerR1[playerid] == -1)
- {
- ractime = 10;
- PlayerT[playerid] = true;
- PlayerR1[playerid] = racing2;
- SendClientMessage(playerid,COLOR_LIME,"Приготовьтесь скоро начнётся бой, отправьте соперника в нокаут.");
- }
- if(PlayerR2[playerid] == -1)
- {
- PlayerT[playerid] = true;
- PlayerR2[playerid] = racing1;
- SendClientMessage(playerid,COLOR_LIME,"Приготовьтесь скоро начнётся бой, отправьте соперника в нокаут.");
- }
- }
- if(PlayerT[playerid] == true)
- {
- if(ractime > 0)
- {
- ractime--;
- format(string,sizeof(string),"~g~%d",ractime);
- GameTextForPlayer(playerid, string, 1000, 6);
- }
- }
- if(ractime == 0)
- {
- if(PlayerT[playerid] == true)
- {
- SetCameraBehindPlayer(playerid);
- TogglePlayerControllableEx(playerid,true);
- PlayerT[playerid] = false;
- }
- }
- if(GetPlayerState(playerid) == 2)
- {
- if(AFK[playerid] < 2)
- {
- if(PlayerInfo[playerid][pAdmin] == 0)
- {
- new carid = GetPlayerVehicleID(playerid);
- GetVehiclePos(carid, TelePos[playerid][3], TelePos[playerid][4], TelePos[playerid][5]);
- if(TelePos[playerid][5] > 550.0)
- {
- TelePos[playerid][0] = 0.0;
- TelePos[playerid][1] = 0.0;
- }
- if(TelePos[playerid][0] != 0.0)
- {
- new Float:xdist = TelePos[playerid][3]-TelePos[playerid][0];
- new Float:ydist = TelePos[playerid][4]-TelePos[playerid][1];
- new Float:sqxdist = xdist*xdist;
- new Float:sqydist = ydist*ydist;
- new Float:distance = (sqxdist+sqydist)/31;
- if(distance > 300)
- {
- if(!TeleportTime{playerid} && GetPVarInt(playerid,"Crasher") <= gettime())
- {
- frm(string,"[UAC]: %s[%d] подозревается в читерстве Air-Break/Teleport (CAR) Дистанция: %.1f.",PN(playerid),playerid,distance);
- ABroadCast(COLOR_LIGHTRED,string,1);
- SetPVarInt(playerid,"CheatLimit",GetPVarInt(playerid,"CheatLimit") + 1);
- }
- }
- }
- if(TelePos[playerid][5] < 550.0 && TelePos[playerid][3] != 0.0)
- {
- TelePos[playerid][0] = TelePos[playerid][3];
- TelePos[playerid][1] = TelePos[playerid][4];
- }
- }
- }
- }
- new Float:currentPos[3];
- GetPlayerPos(playerid,currentPos[0],currentPos[1],currentPos[2]);
- pTemp[playerid][pX] = currentPos[0];
- pTemp[playerid][pY] = currentPos[1];
- pTemp[playerid][pZ] = currentPos[2];
- SetPVarInt(playerid,"CrashCarsAC",0);
- if(GetPVarInt(playerid,"CheatLimit") >= 5) return UAC(playerid,"Air-Break/FlyHack/TP",true);
- if(!IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) != 9)
- {
- if(AFK[playerid] < 2)
- {
- if(PlayerInfo[playerid][pAdmin] == 0)
- {
- new Float:posx, Float:posy, Float:posz;
- GetPlayerPos(playerid, posx, posy, posz);
- if(posz >= 2 && !TeleportTime{playerid})
- {
- if(strcmp(AnimLibrary, "SWIM", true) == 0 && strcmp(AnimName, "SWIM_crawl", true) == 0 && GetPVarInt(playerid,"Crasher") <= gettime())
- {
- SetPVarInt(playerid,"Flylimit",GetPVarInt(playerid,"Flylimit") + 1);
- UAC(playerid,"Fly-Hack",false);
- if(GetPVarInt(playerid,"Flylimit") >= 4) return UAC(playerid,"Fly-Hack",true);
- }
- }
- }
- }
- }
- if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && IsPlayerLogged[playerid] == true && GetPVarInt(playerid,"Crasher") <= gettime())
- {
- new Float:vec[3];
- GetPlayerCameraFrontVector(playerid, vec[0], vec[1], vec[2]);
- new bool:crasher = false;
- for (new i = 0; !crasher && i < sizeof(vec); i++)
- if(floatabs(vec[i]) > 10.0)
- crasher = true;
- if(crasher)
- {
- UAC(playerid,"Crasher",true);
- }
- }
- if(GetPlayerSurfingVehicleID(playerid) != INVALID_VEHICLE_ID)
- {
- if(PlayerInfo[playerid][pAdmin] == 0)
- {
- new cid = GetPlayerSurfingVehicleID(playerid);
- new cm = GetVehicleModel(cid); // получаем модель авто
- switch(cm)
- {
- case 430,446,452,453,454,472,473,484,493,595,478: { return true; } // если это лодка, скидывать ненадо)
- default: { }
- }
- pTemp[playerid][pX] -= 1.5;
- SetPlayerPosEx(playerid,pTemp[playerid][pX],pTemp[playerid][pY],pTemp[playerid][pZ]);
- }
- }
- //******************************** UAC на пиздорванку *******************************
- new Float:xw, Float:yw, Float:zw;
- GetPlayerVelocity(playerid,xw,yw,zw);
- if(xw > 2.0 || yw > 2.0)
- {
- Pizdorvanka[playerid]++;
- if(Pizdorvanka[playerid] >= 3)
- {
- UAC(playerid,"Пиздарванка",true);
- Pizdorvanka[playerid] = 0;
- }
- }
- //
- switch(CreateMats[playerid])
- {
- case 2, 4, 6, 9:
- {
- if(IsAZavodSkin(playerid))
- {
- ApplyAnimation(playerid, "CARRY", "CRRY_PRTIAL", 4.1, 0, 1, 1, 1, 1, 1);
- }
- }
- }
- //******************************** UAC на быструю езду на мопеде *******************************
- if(IsPlayerInAnyVehicle(playerid) && GetVehicleModel(GetPlayerVehicleID(playerid)) == 462 && SpeedVehicle(playerid) > 110)
- {
- if(PlayerInfo[playerid][pAdmin] == 0) UAC(playerid, "Быстрая езда",true);
- }
- //******************************** UAC на fly *******************************
- if(SpeedVehicle(playerid) > 40 && strcmp(AnimLibrary, "SWIM", true) == 0 && strcmp(AnimName, "SWIM_crawl", true) == 0 && !IsPlayerInAnyVehicle(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] == 0) UAC(playerid, "Fly-Hack",true);
- }
- //******************************** UAC на fly *******************************
- if(SpeedVehicle(playerid) > 40 && GetPlayerWeapon(playerid) != 46 && strcmp(AnimName, "FALL_SKYDIVE_ACCEL", true) == 0 && !IsPlayerInAnyVehicle(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] == 0) UAC(playerid, "Fly-Hack",true);
- }
- //
- new Float:armour;
- GetPlayerArmour(playerid, armour);
- if(pTemp[playerid][pAmountArmour] < armour) SetPlayerArmour(playerid, pTemp[playerid][pAmountArmour]);
- else pTemp[playerid][pAmountArmour] = armour;
- //
- if(pTemp[playerid][pHealthON] == 0)
- {
- new Float: Health;
- GetPlayerHealth(playerid, Health);
- if(pTemp[playerid][pAmountHealth] < Health) SetPlayerHealth(playerid, pTemp[playerid][pAmountHealth]);
- else pTemp[playerid][pAmountHealth] = Health;
- }
- else pTemp[playerid][pHealthON] = 0;
- if(PlayerInfo[playerid][pCash] > GetPlayerMoney(playerid))// условие: если у игрока денег выданных сервером больше чем игровых.
- {
- ResetPlayerMoney(playerid);
- GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
- }
- else if(PlayerInfo[playerid][pCash] < GetPlayerMoney(playerid))// условие: если игровых денег у игрока больше чем выданных сервером.
- {
- ResetPlayerMoney(playerid);
- GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
- }
- if(IsAtFerris(playerid))
- {
- if(!PlayerInfo[playerid][pFerrisTicket])
- {
- SetPlayerPosEx(playerid,385.7043,-2028.6235,7.8359);
- }
- }
- if(PlayerToActor(1.2, playerid, Actor[0]))
- {
- if(SpawnActor[playerid] == false)
- {
- if(SpawnActor_Timer[playerid] <= 0)
- {
- ShowPlayerDialog(playerid, 1521, DIALOG_STYLE_LIST, "Чем могу помочь?","Как тебя зовут?\nГде можно поселится\nКакие работы посоветуешь?\nКак мне устроиться на работу?\nУ тебя нет для меня работы?\nИзвини, я забыл что хотел спросить.", "Select","Cancel");
- SpawnActor[playerid] = true;
- }
- }
- }
- SpawnActor_Timer[playerid] --;
- if(GetPVarInt(playerid, "BusTime") > 0)
- {
- SetPVarInt(playerid, "BusTime", GetPVarInt(playerid, "BusTime") - 1);
- format(string,10,"~r~%d",GetPVarInt(playerid, "BusTime"));
- ShowMesageTD(playerid, string);
- if(GetPVarInt(playerid, "BusTime") == 0)
- {
- frm(string, "Рабочий день завершен. Вами заработано: $%d. За ремонт: -$%d", GetPVarInt(playerid, "BusMoney"), GetPVarInt(playerid,"BusRepairMoney"));
- SendClientMessage(playerid, COLOR_LIGHTRED, string);
- SetVehicleToRespawn(GetPVarInt(playerid, "rentcar_job"));
- Delete3DTextLabel(JobText3D[GetPlayerVehicleID(playerid)]);
- PlayerInfo[playerid][pCash] += GetPVarInt(playerid,"BusMoney");
- PlayerInfo[playerid][pCash] -= GetPVarInt(playerid,"BusRepairMoney");
- DeletePVar(playerid, "BusTime");
- DeletePVar(playerid, "TypeBus");
- DeletePVar(playerid, "BusStop");
- DeletePVar(playerid, "BusMoney");
- DeletePVar(playerid, "BusRepairMoney");
- DeletePVar(playerid, "rentcar_job");
- pPressed[playerid] = 0;
- }
- }
- if(GetPVarInt(playerid, "TimeBus") > 0)
- {
- SetPVarInt(playerid, "TimeBus", GetPVarInt(playerid, "TimeBus") - 1);
- format(string,32,"~r~%d",GetPVarInt(playerid, "TimeBus"));
- ShowMesageTD(playerid, string);
- if(GetPVarInt(playerid, "TimeBus") == 0)
- {
- DeletePVar(playerid, "TimeBus");
- new type = GetPVarInt(playerid, "TypeBus"), p = pPressed[playerid];
- SetPVarInt(playerid, "BusStop", 1);
- 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);
- 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);
- 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);
- 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);
- 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);
- 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);
- }
- }
- //
- if(Smoke[playerid] == 1)
- {
- if(SmokeTime[playerid] > 0)
- {
- SmokeTime[playerid] --;
- if(!SmokeTime[playerid])
- {
- new Float:Health;
- GetPlayerHealth(playerid, Health);
- SetPlayerSpecialActionEx(playerid,SPECIAL_ACTION_SMOKE_CIGGY);
- SetPlayerHealth(playerid,Health+5);
- if(Smokes[playerid] >= 4)
- {
- frm(string,"* %s докурил(а) сигарету и выбросил(а) окурок",cPN(playerid));
- ProxDetector(15.0,playerid,string,COLOR_PURPLE);
- SmokeTime[playerid] = 0;
- Smokes[playerid] = 0;
- Smoke[playerid] = 0;
- }
- else
- {
- Smokes[playerid] ++;
- SmokeTime[playerid] = 10;
- frm(string,"* %s стряхнул(а) пепел",cPN(playerid));
- ProxDetector(15.0,playerid,string,COLOR_PURPLE);
- }
- }
- }
- }
- //
- if(GetPlayerVehicleID(playerid) <= TOTALCARS)
- {
- new Float:probeg = (SpeedVehicle(playerid)/7.5)/500;
- if(probeg > 0) CarsInfo[GetPlayerVehicleID(playerid)][vProbeg] += probeg;
- }
- //
- if(onBed[playerid] > 0)
- {
- frm(string, "~r~%d",onBed[playerid]);
- GameTextForPlayer(playerid, string, 1000, 6);
- onBed[playerid] --;
- if(!onBed[playerid])
- {
- SetPlayerInterior(playerid, 0);//Замените на свою функцию
- SetPlayerVirtualWorld(playerid, 0);//Замените на свою функцию
- SendClientMessage(playerid, 0xBFC0C2FF,"Вас выпустили из госпиталя, берегите здоровие!");//Замените на свою функцию
- SetPlayerPosEx(playerid,156.2945,1955.5758,19.6265);//Замените на свою функцию
- SetPlayerFacingAngle(playerid, 90.0);
- SetCameraBehindPlayer(playerid);
- TogglePlayerControllableEx(playerid, true);//Замените на свою функцию
- SetPlayerHealth(playerid,100);
- }
- }
- if(PlayerInfo[playerid][pHeal] > 0 && onBed[playerid] == 0)
- {
- PlayerInfo[playerid][pHealTime] ++;
- if(PlayerInfo[playerid][pHealTime] >= 10)
- {
- PlayerInfo[playerid][pHealTime] = 0;
- new Float:Health;
- GetPlayerHealth(playerid,Health);
- if(!PlayerLie[playerid])
- {
- Health += 1.0;
- if(PlayerInfo[playerid][pVIP] != 0) Health += 2.0;
- frm(string,"%.0f.0 HP",Health);
- GameTextForPlayer(playerid, string, 0, 1);
- }
- else
- {
- Health += 3.0;
- if(PlayerInfo[playerid][pVIP] != 0) Health += 2.0;
- frm(string,"%.0f.0 HP",Health);
- GameTextForPlayer(playerid, string, 0, 1);
- }
- SetPlayerHealth(playerid,Health);
- if(Health >= 99.0)
- {
- if(PlayerLie[playerid])
- {
- new bed = PlayerBed[playerid];
- ClearAnims(playerid);
- SetPlayerPosEx(playerid,HealInfo[bed][hCP][0],HealInfo[bed][hCP][1],HealInfo[bed][hCP][2]);
- SetPlayerFacingAngle(playerid,180.0);
- CheckBed(playerid);
- }
- PlayerInfo[playerid][pHeal] = 0;
- SetPlayerHealth(playerid,100);
- SendClientMessage(playerid,COLOR_LIGHTBLUE,"Вы здоровы и можете покинуть больницу");
- }
- }
- }
- AFK[playerid]++;
- if(AFK[playerid] > 2)
- {
- new result[10];
- Convert(AFK[playerid],result);
- frm(string,"В AFK {AA3333}( %s )",result);
- SetPlayerChatBubble(playerid,string,COLOR_WHITE,30.0,3000);
- if(AFK[playerid] >= 1200) ApplyAnimation(playerid, "MISC", "Scratchballs_01", 4.0, 0, 1, 1, 0, 0);
- }
- if(GetPVarInt(playerid,"GotoME")) OnPlayerInConvoi(playerid);
- if(PlayerInfo[playerid][pLevel] == 0 && pRegister[playerid] == 1 && IsPlayerLogged[playerid] == true)
- {
- if(GetPlayerVirtualWorld(playerid) != playerid)
- {
- SpawnPlayer(playerid);
- }
- }
- if(PlayerInfo[playerid][pJail] == 2 && PlayerInfo[playerid][pAdmin] == 0 && IsPlayerLogged[playerid] == true)
- {
- if(GetPlayerVirtualWorld(playerid) != 999+playerid)
- {
- SpawnPlayer(playerid);
- }
- }
- //==========================================================================
- if(GetPlayerSpeed(playerid) > 5 && Cuffed{playerid} == true)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- if(SystemFlood[playerid] <= 0)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Вы в наручниках, Используйте {9ACD32}ALT {FFFFFF}чтобы идти за полицейским.");
- }
- TogglePlayerControllableEx(playerid, false);
- ApplyAnimation(playerid, "PED", "GETUP_FRONT", 4.0, 0, 1, 1, 0, 0, 1);
- SetTimerEx("UnFreeze", 3000, 0, "%d", playerid);
- SystemFlood[playerid] = 30;
- }
- }
- //==========================================================================
- if(UseDrugsTime[playerid] > 0)
- {
- UseDrugsTime[playerid] --;
- if(UseDrugsTime[playerid] <= 120)
- {
- if(DrugsCrack{playerid})
- {
- DrugsCrack{playerid} = false;
- ClearAnimations(playerid);
- }
- if(!UseDrugsTime[playerid])
- {
- SetPlayerWeather(playerid,DefaultWeather);
- }
- }
- }
- if(DrugsCrack{playerid})
- {
- if(IsPlayerInAnyVehicle(playerid)) RemovePlayerFromVehicle(playerid);
- else ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.1, 0, 1, 1, 1, 0, 1);
- }
- //==========================================================================
- if(FreezeTime[playerid] > 0)
- {
- FreezeTime[playerid] --;
- if(!FreezeTime[playerid])
- {
- ShowPlayerDialog(playerid, D_NULL, 0, "{10F441}Вы разморожены", "{FFFFFF}Вы были разморожены.", "Ок", "");
- TogglePlayerControllableEx(playerid, true);
- }
- else
- {
- frm(string,"{FFFFFF}Вы были заморожены на 5 секунд.\nДо разморозки: {FF9900}%d{FFFFFF} секунд.",FreezeTime[playerid]);
- ShowPlayerDialog(playerid, 95, 0, "{FF6347}ДМ запрещен", string, "Ок", "");
- }
- }
- if(NoPlayerDM{playerid})
- {
- new team = Team(playerid);
- if(CapturedGZ[team] == -1 && CaptureGZ[team] == -1)
- {
- if(GetPlayerWeapon(playerid) != 43)
- {
- SetPlayerArmedWeapon(playerid,0);
- }
- }
- }
- if(IsPlayerApplyAnimation(playerid, "FALL_back")
- || IsPlayerApplyAnimation(playerid, "FALL_collapse")
- || IsPlayerApplyAnimation(playerid, "FALL_fall")
- || IsPlayerApplyAnimation(playerid, "FALL_front")
- || IsPlayerApplyAnimation(playerid, "FALL_glide")
- || IsPlayerApplyAnimation(playerid, "FALL_land")
- || IsPlayerApplyAnimation(playerid, "FALL_skyDive")
- || IsPlayerApplyAnimation(playerid, "JUMP_glide")
- || IsPlayerApplyAnimation(playerid, "JUMP_land")
- || IsPlayerApplyAnimation(playerid, "JUMP_launch")
- || IsPlayerApplyAnimation(playerid, "JUMP_launch_R"))
- {
- if(PlayerInfo[playerid][pJob] == J_FACTORY)
- {
- if(InJob[playerid] == 3)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Вы уронили коробку/мешок");
- ReloadAllAnims(playerid);
- RemovePlayerAttachedObject(playerid, 0);
- }
- }
- }
- if(LieReset[playerid] > 0) LieReset[playerid] --;
- if(LastPSave[playerid]) LastPSave[playerid]--;
- if(DMCount[playerid] > 0) DMCount[playerid] --;
- if(CreateMats[playerid] == 4) ApplyAnimation(playerid, "CARRY", "CRRY_PRTIAL", 4.1, 0, 1, 1, 1, 1, 1);
- if(RepairTimer[playerid] > 0)
- {
- RepairTimer[playerid] --;
- frm(string,"~g~Repair: ~w~%d",RepairTimer[playerid]);
- GameTextForPlayer(playerid, string, 600, 6);
- if(RepairTimer[playerid] == 0) RepaircarOut(playerid);
- }
- if(PlayerInfo[playerid][pContractTime] > 0) PlayerInfo[playerid][pContractTime]--;
- new Speedtimer = 0;
- Speedtimer++;
- if(Speedtimer == 45)
- {
- Speedtimer = 0;
- if(SpeedKick[playerid] > 0) SpeedKick[playerid] -= 2;
- }
- if(FindPlayer[playerid] != INVALID_PLAYER_ID)
- {
- new find = FindPlayer[playerid];
- if(IsPlayerInDynamicArea(playerid, PlayerFindZone[find]))
- {
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(FindPlayer[playerid], X, Y, Z);
- SetPlayerMapIcon(playerid, 97, X, Y, Z, 56, 0, MAPICON_GLOBAL);
- }
- else
- {
- RemovePlayerMapIcon(playerid, 97);
- }
- }
- if(Clother[playerid] != -1)
- {
- if(PlayerInfo[playerid][pChar] != 0)
- {
- if(!IsPlayerInRangeOfPoint(playerid, 1.0, 199.1063, -128.3574, 1003.5152))
- {
- Clother[playerid] = -1;
- TogglePlayerControllableEx(playerid, true);
- if(PlayerInfo[playerid][pMember] > 0) SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
- else SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
- SetCameraBehindPlayer(playerid);
- }
- }
- }
- if(TimesShow[playerid] > 0)
- {
- TimesShow[playerid] --;
- if(TimesShow[playerid] == 0)
- {
- TimesShow[playerid] = 0;
- TextDrawHideForPlayer(playerid,Text:Times);
- }
- }
- if(PlayerInfo[playerid][pJailTime] > 0)
- {
- PlayerInfo[playerid][pJailTime] --;
- if(!PlayerInfo[playerid][pJailTime])
- {
- if(PlayerInfo[playerid][pMember] > 0) SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
- else SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
- ShowMesageTD(playerid,"~y~Freedom");
- SendClientMessage(playerid,COLOR_LIGHTBLUE,"Вы отсидели свой срок и были выпущены");
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerPosEx(playerid,1546.7046,-1675.4485,13.5628);
- SetPlayerFacingAngle(playerid, 86.9815);
- PlayerInfo[playerid][pJail] = 0;
- PlayerInfo[playerid][pBailPrice] = 0;
- SetCameraBehindPlayer(playerid);
- }
- }
- if(ResetGunsUP[playerid] > 0)
- {
- ResetGunsUP[playerid] --;
- }
- if(PlayerInfo[playerid][pMuteTime] > 0)
- {
- PlayerInfo[playerid][pMuteTime] --;
- if(!PlayerInfo[playerid][pMuteTime])
- {
- SendClientMessage(playerid,COLOR_LIGHTGREEN,"[UnMute]: Не нарушайте правила сервера!");
- }
- }
- if(TazerTime[playerid] > 0)
- {
- TazerTime[playerid]--;
- if(TazerTime[playerid] == 0)
- {
- TogglePlayerControllableEx(playerid, true);
- ClearAnimations(playerid);
- }
- }
- if(PlayerInfo[playerid][pFMuteTime] > 0)
- {
- PlayerInfo[playerid][pFMuteTime] --;
- if(!PlayerInfo[playerid][pFMuteTime])
- {
- SendClientMessage(playerid,COLOR_LIGHTGREEN,"[UnMute]: Ваша рация была разблокирована!");
- }
- }
- if(TransferReset[playerid] > 0)
- {
- TransferReset[playerid] --;
- }
- if(PlayerInfo[playerid][pDCTime] > 0)
- {
- PlayerInfo[playerid][pDCTime] --;
- }
- if(GetPVarInt(playerid, "TheifTime") > 0)
- {
- SetPVarInt(playerid, "TheifTime", GetPVarInt(playerid, "TheifTime") - 1);
- new result[10];
- Convert(GetPVarInt(playerid, "TheifTime"),result);
- format(string,10,"~r~%s",result);
- if(GetPVarInt(playerid, "TheifTime") == 1)
- {
- if(PlayerInfo[playerid][pJackSkill] !=0){ PlayerInfo[playerid][pJackSkill] -=1; }
- SendClientMessage(playerid, 0xFDE640AA,"SMS: Вы не справились... Отправитель: Неизвестно");
- DestroyVehicleAC(TheifCar[playerid][0]);
- DeletePVar(playerid, "TheifTime");
- }
- }
- if(RepairReset[playerid] > 0)
- {
- RepairReset[playerid] --;
- }
- if(CuffedTime[playerid] > 0)
- {
- CuffedTime[playerid]--;
- if(!CuffedTime[playerid])
- {
- Cuffed{playerid} = false;
- }
- }
- if(IznasTime[playerid] > 0)
- {
- IznasTime[playerid] --;
- }
- if(PickUpTime[playerid] > 0)
- {
- if(PlayerInfo[playerid][pEnterKey] == 0) PickUpTime[playerid] --;
- }
- if(SystemFlood[playerid] > 0)
- {
- SystemFlood[playerid] --;
- }
- if(PlayerInfo[playerid][pAdminTime] > 0)
- {
- PlayerInfo[playerid][pAdminTime] --;
- }
- //======================================================================
- if(IsPlayerInAnyVehicle(playerid))
- {
- new carid = GetPlayerVehicleID(playerid);
- new myseat = GetPlayerVehicleSeat(playerid);
- if(VehicleSeat[carid][myseat] != playerid) VehicleSeat[carid][myseat] = playerid;
- if(CarTest[playerid] >= 0)
- {
- new Float:VHealth;
- GetVehicleHealth(carid,VHealth);
- if(VHealth < 900)
- {
- SendClientMessage(playerid,COLOR_GREY,"Вы провалили тест т.к повредили авто.");
- SetVehicleToRespawn(carid);
- new i = CarTest[playerid];
- TogglePlayerDynamicRaceCP(playerid, Test_CP[i], false);
- CarTest[playerid] = -1;
- SaveAccount(playerid);
- return true;
- }
- }
- else if(GetPlayerState(playerid) != 2)
- {
- if(IsATaxi(carid))
- {
- new id = GetVehicleSeat(carid, 0);
- if(id != INVALID_PLAYER_ID && PlayerInfo[id][pJob] == J_TAXI) //JOB_TAXI
- {
- if(Taxi_GO[playerid] == 2)
- {
- TaxiDistance[playerid] += GetPlayerVehicleSpeed(playerid);
- if(TaxiDistance[playerid] >= 300)
- {
- TaxiDistance[playerid] = 0;
- if(PlayerInfo[playerid][pCash] > TaxiPrice[playerid])
- {
- TaxiPrice[playerid] += TaxiTarif[id];
- frm(string,"$%d",TaxiPrice[playerid]);
- PlayerTextDrawSetString(playerid, TaxiDraw[playerid],string);
- new money;
- for(new k = 1; k < 4; k ++)
- {
- new seat = GetVehicleSeat(carid, k);
- if(seat != INVALID_PLAYER_ID) money += TaxiPrice[seat];
- }
- frm(string,"$%d",money);
- PlayerTextDrawSetString(id, TaxiDraw[id],string);
- }
- else if(SystemFlood[id] <= 0)
- {
- new str[128];
- format(str, sizeof(str), "У пасажира %s недостаточно денег!", PN(playerid));
- SendClientMessage(id,COLOR_YELLOW, str);
- SendClientMessage(playerid,COLOR_YELLOW, "У вас недостаточно денег!");
- SystemFlood[id] = 5;
- }
- }
- }
- }
- }
- }
- }
- players_timer[playerid] = SetTimerEx("PlayerTimer",1000,false,"d",playerid);
- return true;
- }
Add Comment
Please, Sign In to add comment