Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- task speedtimer[1000]()
- {
- foreach(new i: DriverIter)
- {
- new string[128], Float:health;
- new veh = GetPlayerVehicleID(i);
- new speed=GetPlayerSpeed(i);
- new carid = FindSpawnID(veh);
- format(string,sizeof(string),"%d", speed);
- PlayerTextDrawSetString(i, speedom[i], string);
- GetVehicleHealth(veh, health);
- format(string,sizeof(string),"HEALTH: ~w~ %.2f", health);
- PlayerTextDrawSetString(i, damagetd[i], string);
- if(CarInfo[carid][cID] != -2 && carid != 0)
- {
- CarInfo[carid][cKM] += (speed*0.27)/100;
- //CarInfo[carid][cKM] += (speed*5)/18;
- format(string,sizeof(string),"%.2f KM", CarInfo[carid][cKM]);
- PlayerTextDrawSetString(i, kilometraj[i], string);
- }
- if(!IsAPlane(veh))
- {
- new speed2 = GetPlayerSpeed2(i,0);
- if(speed2 > 300)// && !IsPlayerInArea(i,-3000,-2197.265625,-1886.71875,-849.609375))
- {
- SpeedHackWarn[i]++;
- if(SpeedHackWarn[i] == 3)
- {
- va_SendClientMessageToAll(COLOR_LIGHTRED, ""#SERVER_NAME": %s a primit kick de la AdmBot, motiv: SpeedHack", PlayerInfo[i][pServerName]);
- defer KickTimer(i);
- }
- else
- {
- format(string, 256, "Anti-Cheat:{FFFFFF} %s(%d, level %d) este suspect de Speed Hack | Speed %.0d km/h, Vehicle %s", PlayerInfo[i][pServerName],i,PlayerInfo[i][pLevel],speed2,aVehicleNames[GetVehicleModel(GetPlayerVehicleID(i))-400]);
- ABroadCast(0xC40B0BFF,string,1);
- }
- }
- }
- if(IsABoat(veh))
- {
- if(PlayerInfo[i][pBoatLic] < 1)
- {
- RemovePlayerFromVehicleEx(i);
- }
- }
- else if(IsAPlane(veh))
- {
- if(PlayerInfo[i][pFlyLic] < 1)
- {
- RemovePlayerFromVehicleEx(i);
- }
- }
- else
- {
- if(PlayerInfo[i][pCarLic] != 1)
- {
- if(IsABike(veh)) { }
- else { RemovePlayerFromVehicleEx(i); }
- }
- }
- }/*
- foreach(new i: Player)
- {
- if(IsAtBornToRaceEvent[i] == 1)
- {
- if (IsPlayerInAnyVehicle(i))
- {
- new veh = GetPlayerVehicleID(i), Float:health;
- GetVehicleHealth(veh, health);
- Gas[GetPlayerVehicleID(i)]=1000;
- GetVehicleHealth(veh, health);
- if(health < 250)
- {
- SetVehicleHealth(veh, 1000);
- RepairVehicle(GetPlayerVehicleID(i));
- SendClientMessage(i,COLOR_LIGHTBLUE, "Fast And Furios:"#COL_EASY" Masina reparata!");
- }
- }
- }
- } */
- return 1;
- }
- task OtherTimer[1000]()
- {
- AdminsOnline();
- GetMoney();
- foreach(new i: KickPPlayer)
- {
- if(KickP[i] < 1)
- {
- CheckJetpack(i);
- AntiHA(i);
- AntiSpeed(i);
- }
- if(SpeedWarning[i] > 0) SpeedWarning[i]--;
- if(SpeedWarning[i] == 0)
- {
- SpeedWarning[i] = -1;
- }
- }
- foreach(new i: HelpMesendPlayer) {
- if(helpmesend[i] > 0) helpmesend[i]--;
- if(helpmesend[i] == 1)
- {
- helps--;
- helpmesend[i] = -1;
- DeletePVar(i, "Help");
- }
- }
- foreach(new i: FlyAdmin) {
- if(fly[i] == 1)
- {
- SetPlayerHealthEx(i, 500000.0);
- SetPlayerArmourEx(i, 999999);
- }
- }
- foreach(new i: Admins) {
- if(PlayerInfo[i][pAdmin] >= 1338 && OwnerInfo[i] == 1) {
- new string[128];
- format(string, sizeof(string), "~r~~n~~n~%d~w~~n~TICK~g~~n~~n~%d~w~~n~ANIM~n~~n~~y~%d~w~~n~FPS~n~~n~~b~%d~w~~n~QUERIES", GetServerTickRate(), GetPlayerAnimationIndex(i), FPS2[i]-1, mysql_unprocessed_queries());
- PlayerTextDrawSetString(i, InfoTD, string);
- PlayerTextDrawShow(i, InfoTD);
- }
- else PlayerTextDrawHide(i, InfoTD);
- }
- foreach(new i: Player) {
- if(PlayerInfo[i][pLocal] != DEFAULT_VAR && PlayerInfo[i][pInt] != 0)
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- GetPlayerPos(i, oldposx, oldposy, oldposz);
- if(oldposz != 0.0)
- {
- if(oldposz < 600.0)
- {
- if(PlayerInfo[i][pLocal] == LOCAL_CITYHALL)//City Hall
- {
- SetPlayerInterior(i,0);
- SetPlayerPos(i,1480.9103,-1770.3743,18.7958);
- PlayerInfo[i][pInt] = 0;
- PlayerInfo[i][pLocal] = DEFAULT_VAR;
- }
- if(PlayerInfo[i][pLocal] >= 10001 && PlayerInfo[i][pLocal] <= 10000 + MAX_BIZ)
- {
- SetPlayerPos(i, BizzInfo[PlayerInfo[i][pLocal]-10000][bEntranceX], BizzInfo[PlayerInfo[i][pLocal]-10000][bEntranceY],BizzInfo[PlayerInfo[i][pLocal]-10000][bEntranceZ]); // Warp the player
- PlayerInfo[i][pLocal] = DEFAULT_VAR;
- SetPlayerInterior(i,0);
- PlayerInfo[i][pInt] = 0;
- }
- else if(PlayerInfo[i][pLocal] <= MAX_HOUSES)
- {
- SetPlayerPos(i, HouseInfo[PlayerInfo[i][pLocal]][hEntrancex], HouseInfo[PlayerInfo[i][pLocal]][hEntrancey],HouseInfo[PlayerInfo[i][pLocal]][hEntrancez]); // Warp the player
- PlayerInfo[i][pLocal] = DEFAULT_VAR;
- SetPlayerInterior(i,0);
- PlayerInfo[i][pInt] = 0;
- SetPlayerVirtualWorld(i,0);
- PlayerInfo[i][pVirWorld] = 0;
- }
- }
- }
- }
- if(CellTime[i] > 0)
- {
- if (CellTime[i] == cchargetime)
- {
- CellTime[i] = 1;
- if(Mobile[Mobile[i]] == i)
- {
- CallCost[i] = CallCost[i]+callcost;
- }
- }
- CellTime[i] = CellTime[i] +1;
- if (Mobile[Mobile[i]] == DEFAULT_VAR && CellTime[i] == 5)
- {
- if(IsPlayerConnected(Mobile[i]))
- {
- new string[46];
- format(string, sizeof(string), "* %s telefonul suna.", PlayerInfo[Mobile[i]][pServerName]);
- RingTone[Mobile[i]] = 10;
- ProxDetector(30.0, Mobile[i], string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- }
- }
- }
- if(CellTime[i] == 0 && CallCost[i] > 0)
- {
- new string[35];
- format(string, sizeof(string), "~w~Costul apelului~n~~r~%s$",FormatNumber(CallCost[i]));
- GivePlayerCash(i, -CallCost[i]);
- Update(i, pCashx);
- BizzInfo[BIZ_PHONECOMPANY][bTill] += CallCost[i];
- ExtortionBiz(BIZ_PHONECOMPANY, CallCost[i]);
- GameTextForPlayer(i, string, 5000, 1);
- CallCost[i] = 0;
- }
- if(TransportTime[i] > 0)
- {
- TransportTime[i] += 1;
- if(TransportTime[i] >= 16)
- {
- new string[60];
- format(string, sizeof(string), "~r~Costul Calatoriei ~w~: ~g~$$%s",FormatNumber(TransportCost[i]));
- GameTextForPlayer(i, string, 1500, 4);
- TransportTime[i] = 1;
- if(TransportDriver[i] < DEFAULT_VAR)
- {
- if(IsPlayerConnected(TransportDriver[i]))
- {
- TransportCost[i] += TransportValue[TransportDriver[i]];
- TransportCost[TransportDriver[i]] = TransportCost[i];
- if(GetPlayerCash(i) < TransportCost[i])
- {
- RemovePlayerFromVehicle(i);
- SendClientMessage(TransportDriver[i],0xD8C169FF,"Clientul a coborat din masina deoarece nu avea bani.");
- }
- }
- }
- else if(TransportDriver[i] == 1001)
- {
- TransportCost[i] += TransportValue[i];
- }
- }
- }
- if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
- {
- for(new s = 0; s < sizeof(SpikeInfo); s++)
- {
- if(IsPlayerInRangeOfPoint(s, 3.3, SpikeInfo[s][sX], SpikeInfo[s][sY], SpikeInfo[s][sZ]-1.5))
- {
- if(SpikeInfo[s][sCreated] == 1)
- {
- new panels, doors, lights, tires;
- new carid = GetPlayerVehicleID(i);
- GetVehicleDamageStatus(carid, panels, doors, lights, tires);
- tires = encode_tires(1, 1, 1, 1);
- UpdateVehicleDamageStatus(carid, panels, doors, lights, tires);
- return 0;
- }
- }
- }
- }
- if(PlayerToPoint(50.0, i, -2317.8091, -1637.5575, 483.7031)) {
- for(new m; m < 3; m++) {
- if(PlayerInfo[i][pDailyMission][m] == 8) CheckMission(i, m);
- }
- }
- if(PlayerToPoint(50.0, i, 1962.4126,-2193.3279,13.5469)) {
- for(new m; m < 3; m++) {
- if(PlayerInfo[i][pDailyMission][m] == 9) CheckMission(i, m);
- }
- }
- if(PlayerToPoint(100.0, i, 1338.6273,2153.1045,11.0578)) {
- for(new m; m < 3; m++) {
- if(PlayerInfo[i][pDailyMission][m] == 10) CheckMission(i, m);
- }
- }
- }
- return 1;
- }
- task CarCheck[30000]() {
- foreach(new j: Player) {
- SetVehicleParamsForPlayer(99, j, 0, 0);
- SetVehicleParamsForPlayer(100, j, 0, 0);
- SetVehicleParamsForPlayer(101, j, 0, 0);
- SetVehicleParamsForPlayer(102, j, 0, 0);
- SetVehicleParamsForPlayer(103, j, 0, 0);
- SetVehicleParamsForPlayer(104, j, 0, 0);
- SetVehicleParamsForPlayer(105, j, 0, 0);
- SetVehicleParamsForPlayer(106, j, 0, 0);
- SetVehicleParamsForPlayer(107, j, 0, 0);
- SetVehicleParamsForPlayer(108, j, 0, 0);
- SetVehicleParamsForPlayer(109, j, 0, 0);
- new Float:health;
- GetPlayerHealth(j, health);
- SetPlayerHealthEx(j, health - 1.0);
- switch(STDPlayer[j]) {
- case 1: {
- GetPlayerHealth(j, health);
- SetPlayerHealthEx(j, health - 5.0);
- SendClientMessage(j, COLOR_LIGHTBLUE, "* Ai pierdut 4 sanatate din cauza STD.");
- }
- case 2: {
- GetPlayerHealth(j, health);
- SetPlayerHealthEx(j, health - 12.0);
- SendClientMessage(j, COLOR_LIGHTBLUE, "* Ai pierdut 8 sanatate din cauza STD.");
- }
- case 3: {
- GetPlayerHealth(j, health);
- SetPlayerHealthEx(j, health - 20.0);
- SendClientMessage(j, COLOR_LIGHTBLUE, "* Ai pierdut 12 sanatate din cauza STD.");
- }
- }
- }
- for(new c = 1; c < 254; c++) {
- foreach(new i: CarJackerJob) {
- if (PlayerInfo[i][pJob] == 5) SetVehicleParamsForPlayer(c, i, 0, 0);
- }
- if (gLastDriver[c] == 301) CarRespawn(c);
- if (gLastDriver[c] >= 300) gLastDriver[c]++;
- }
- return 1;
- }
- task CustomPickups[1000]()
- {
- foreach(new i: Player)
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- GetPlayerPos(i, oldposx, oldposy, oldposz);
- new tmpcar = GetPlayerVehicleID(i);
- if(oldposx!=0.0 && oldposy!=0.0 && oldposz!=0.0)
- {
- for(new h=1;h<=MAX_BIZ;h++)
- {
- if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))
- {
- new string[128];
- format(string, sizeof(string), "~w~%s~n~~r~Products Required~w~: %d~n~~y~Price per product: ~w~: %s$~n~~g~Funds: ~w~: $%d",BizzInfo[h][bMessage],(BizzInfo[h][bMaxProducts]-BizzInfo[h][bProducts]),FormatNumber(BizzInfo[h][bPriceProd]),BizzInfo[h][bTill]);
- GameTextForPlayer(i, string, 5000, 3);
- return 1;
- }
- }
- }//custompickups end
- if (PlayerToPoint(2.0, i, 1173.2563,-1323.3102,15.3943))
- {// Hospital near Ammu
- GameTextForPlayer(i, "~w~Type /healme to cure yourself", 5000, 5);
- }
- else if (PlayerToPoint(2.0, i, 2029.5945,-1404.6426,17.2512))
- {// Hospital near speedway
- GameTextForPlayer(i, "~w~Type /healme to cure yourself", 5000, 5);
- }
- else if (PlayerToPoint(3, i,1480.9103,-1770.3743,18.7958))
- {
- GameTextForPlayer(i, "~y~Welcome to the ~r~City Hall~n~~w~Type /enter to go in", 5000, 5);
- }
- else if (GetPlayerState(i) == 1 && PlayerToPoint(1.0, i,242.7591,66.4315,1003.6406))
- {
- if(PlayerInfo[i][pLeader] == 1 || PlayerInfo[i][pLeader] == 2 || PlayerInfo[i][pLeader] == 3 || PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pMember] == 2 || PlayerInfo[i][pMember] == 3)
- {
- GameTextForPlayer(i, "~g~Police Department elevator~n~~w~Type ~r~/pdup ~w~to go up~n~Type ~r~/pddown ~w~to go down", 5000, 3);
- }
- else
- {
- GameTextForPlayer(i, "~r~Staff only!", 5000, 3);
- }
- }
- else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1110.9738,-305.4099,73.9922))
- {
- GameTextForPlayer(i, "~g~Hitman Undercover Place,~n~~y~Use /disguise", 5000, 3);
- }
- else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,2752.7515,-1962.4762,13.5469))
- {
- GameTextForPlayer(i, "~g~LSV Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
- }
- else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,690.5870,-1275.9880,13.5600))
- {
- GameTextForPlayer(i, "~g~VLA Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
- }
- else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,2146.2664,-1470.3286,25.7121))
- {
- GameTextForPlayer(i, "~g~Ballas Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
- }
- else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,2498.6650,-1687.3389,13.5035))
- {
- GameTextForPlayer(i, "~g~Grove Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
- }
- else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1107.4956,-315.6171,74.7422))
- {
- GameTextForPlayer(i, "~g~Hitman Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
- }
- else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1308.5664,-47.2725,1001.0313))
- {
- GameTextForPlayer(i, "~g~Russian Mafia Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
- }
- else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,2561.5168,-1305.3997,1060.9844))
- {
- GameTextForPlayer(i, "~g~Yakuza Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
- }
- else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,-2651.3530,638.9305,14.4531))
- {
- GameTextForPlayer(i, "~g~Medic HQ,~n~~y~Use /enter", 5000, 3);
- }
- else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,-2060.3362,469.6569,35.1723))
- {
- GameTextForPlayer(i, "~g~News HQ,~n~~y~Use /enter", 5000, 3);
- }
- else if (PlayerToPoint(2.0, i, 694.7092,-455.9879,16.3359))
- {
- GameTextForPlayer(i, "~r~Materials Shop~n~~w~To sell type /sellmats~n~To buy type /buymats", 5000, 3);
- }
- else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1381.0413,-1088.8511,27.3906) || PlayerToPoint(2.0, i,-1963.6067,437.5748,35.1719))
- {
- GameTextForPlayer(i, "~g~Welcome,~n~~y~Use /mission to take on a Mission", 5000, 3);
- }
- else if (PlayerToPoint(3, i,2027.5966,1008.9321,10.8203) || PlayerToPoint(3, i,-2190.7061,641.7987,49.4375) || PlayerToPoint(3, i,2769.5718,-1953.5166,13.3783) || PlayerToPoint(3, i,679.4280,-1276.8392,13.5956) || PlayerToPoint(3, i,2156.3076,-1455.8517,25.5391) || PlayerToPoint(3, i,2494.8640,-1668.1879,13.3438))
- {
- GameTextForPlayer(i, "~g~Gang Seif,~n~~y~Scrie /depune ca sa depui si /retrage ca sa scoti", 5000, 5);
- }
- else if (PlayerToPoint(3, i,597.1277,-1248.6479,18.2734))
- {
- GameTextForPlayer(i, "~w~Type ~r~/Materials get ~w~ to get some materials", 5000, 5);
- }
- else if (PlayerToPoint(3, i,-2119.5469,-178.5679,35.3203))
- {
- GameTextForPlayer(i, "~w~Type ~g~/Materials deliver ~w~ to deliver materials", 5000, 5);
- }
- else if (PlayerToPoint(3, i,-1982.8839,164.2848,27.6875))
- {
- GameTextForPlayer(i, "~w~Type: ~r~/withdraw ~w~to withdraw your money", 5000, 5);
- }
- else if (PlayerToPoint(2, i,1080.9414,-344.6483,73.9815))
- {
- GameTextForPlayer(i, "~r~Order ~w~Place.", 5000, 3);
- }
- else if (PlayerToPoint(2.0, i,-2640.9878,635.8196,14.4531) || PlayerToPoint(2.0, i,1179.4683,-1338.6075,13.8445))
- {
- GameTextForPlayer(i, "~w~Type /get healkit, to get ~r~HealKit", 5000, 3);
- SetPlayerHealthEx(i, 100);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement