Jump to content
  • 0

Se blocheaza timmerul la jobul Farmer


KripToN.

Question

  1. Problemă:Cand lucrez la jobul farmer,uneori sa blocheaza timmer.
  2. Ce ai încercat să faci:Sa caut codul poate rezolv singur cumva,dar in zadar totul pare in regula.
  3. Erori/atentionari:  Nu are,
  4. Cod sursă:System Error:https://pastebin.com/NRH57Lbq
  5. Imagini: https://www.youtube.com/watch?v=jwVoKBi73PA Uitativa la sfirsitul video.
  6. Precizări: Sper sa ma ajute cineva.
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
Acum 16 ore, Th3FuK3R Channel a spus:

 

  1. Problemă:Cand lucrez la jobul farmer,uneori sa blocheaza timmer.
  2. Ce ai încercat să faci:Sa caut codul poate rezolv singur cumva,dar in zadar totul pare in regula.
  3. Erori/atentionari:  Nu are,
  4. Cod sursă:System Error:https://pastebin.com/NRH57Lbq
  5. Imagini: https://www.youtube.com/watch?v=jwVoKBi73PA Uitativa la sfirsitul video.
  6. Precizări: Sper sa ma ajute cineva.

Si eu aveam problema asta tot pe modul bigzone incearca asta de mai jos al meu e putin mai diferit in sensul ca detecteaza si viteza si limba ro sau eng vezi tu ce erori iti da si editeaza stiu ca nu scriptezi de ieri deci te descurci cu una - doua erori mici

public SetFarmer(playerid)
{
	if(farmerc[playerid] == 1)
	{
		PlayerTextDrawShow(playerid, farmtime[playerid]);
	    PlayerTextDrawShow(playerid, farmjob[playerid]);
		PlayerTextDrawShow(playerid, farmbox[playerid]);
	    if(IsPlayerInRangeOfPoint(playerid,270.0,-388.4804,-1395.7417,23.4229))
	    {
			new tmpcar = GetPlayerVehicleID(playerid),
				ccar = IsPlayerInAnyVehicle(playerid),
				spe = Carspeed(playerid);
			GetPlayerPos(playerid, PlayerPos[playerid][0], PlayerPos[playerid][1], PlayerPos[playerid][2]);
			if(PlayerPos[playerid][0] == PlayerPos[playerid][3] && PlayerPos[playerid][1] == PlayerPos[playerid][4] && PlayerPos[playerid][2] == PlayerPos[playerid][5])
			{
				PlayerTextDrawShow(playerid, farmspeed[playerid]);
				if(PlayerInfo[playerid][pLanguage] == 1) PlayerTextDrawSetString(playerid, farmspeed[playerid], "~r~(!) Your moving speed needs to be higher than 25 KM/H.");
				if(PlayerInfo[playerid][pLanguage] == 2) PlayerTextDrawSetString(playerid, farmspeed[playerid], "~r~(!) Trebuie sa mergi cu o viteza mai mare de 25 KM/H.");
				return 1;
			}
			PlayerPos[playerid][3] = PlayerPos[playerid][0];
			PlayerPos[playerid][4] = PlayerPos[playerid][1];
			PlayerPos[playerid][5] = PlayerPos[playerid][2];
			if(ccar && IsAFarmer(tmpcar) && spe > 24)
			{
			    PlayerTextDrawHide(playerid, farmspeed[playerid]);
			    PlayerTextDrawHide(playerid, farmwanted[playerid]);
				if(farmertime[playerid] >= 1)
				{
					farmertime[playerid]--;
					new str2[128];
					if(PlayerInfo[playerid][pLanguage] == 1)
					{
						format(str2,sizeof(str2),"Work ~r~%d ~w~more seconds to get your reward",farmertime[playerid]);
					}
					else
					{
						format(str2,sizeof(str2),"Munceste pentru inca ~r~%d ~w~secunde pentru a fi platit",farmertime[playerid]);
					}
					PlayerTextDrawSetString(playerid, farmtime[playerid], str2);
					PlayerTextDrawShow(playerid, farmtime[playerid]);
				}
				else if(farmertime[playerid] == 0)
				{
				    new str3[128];
				    farmertime[playerid] = 1;
					farmerc[playerid] = 0;
					SetVehicleToRespawn(tmpcar);
					new randomtransport = random(10);
					if(randomtransport > 8)
					{
						new randfarmer;
						if(SvarInfo[2][svValue] == 0) randfarmer = 30000 + random(50000);
						else randfarmer = 33000 + random(55000);
						if(PlayerInfo[playerid][pLanguage] == 1) format(str3,sizeof(str3),"The farm owners were very pleased with the quality of your work. You received $%s.",FormatNumber(randfarmer));
						if(PlayerInfo[playerid][pLanguage] == 2) format(str3,sizeof(str3),"Detinatorii fermei au fost foarte multumiti de calitatea muncii prestate. Ai primit $%s.",FormatNumber(randfarmer));
						SCM(playerid,COLOR_GREEN,str3);
						GivePlayerCash(playerid,randfarmer);
						Update(playerid, pCashx);
					}
					else if(randomtransport >= 0 && randomtransport <= 8)
					{
						new faina;
						if(PlayerInfo[playerid][pFarmSkill] == 1)
						{
							faina = 15 + random(15);
						}
						else if(PlayerInfo[playerid][pFarmSkill] == 2)
						{
							faina = 17 + random(15);
						}
						else if(PlayerInfo[playerid][pFarmSkill] == 3)
						{
							faina = 19 + random(15);
						}
						else if(PlayerInfo[playerid][pFarmSkill] == 4)
						{
							faina = 21 + random(15);
						}
						else if(PlayerInfo[playerid][pFarmSkill] == 5)
						{
							faina = 23 + random(15);
						}
						else if(PlayerInfo[playerid][pFarmSkill] >= 6)
						{
							faina = 25 + random(15);
						}
					    AreFaina[playerid] = faina;
						if(PlayerInfo[playerid][pLanguage] == 1)
						{
							SendClientMessage(playerid, COLOR_GREEN, "The farm owners don't have any money to give you, but they can give you a bag of flour.");
							format(str3,sizeof(str3),"You have received a bag that contains %d kg of flour.", faina);
							SendClientMessage(playerid, COLOR_GREEN, str3);
							new randsms = random(2);
							if(randsms == 0)
							{
								SendClientMessage(playerid, COLOR_YELLOW, "SMS from Jake_Farmer (5554444): I heard the local fast food store is looking to buy some flour.");
							}
							else if(randsms == 1)
							{
								SendSplitMessage(playerid, COLOR_YELLOW, "SMS from Joe_Farmer (5554443): The local fast food store is probably looking to buy some flour. If I had the time, I would sell it myself.");
							}
						}
						else
						{
							SendClientMessage(playerid, COLOR_GREEN, "Detinatorii fermei nu au bani pentru a te plati, dar iti pot oferi un sac cu faina drept rasplata.");
							format(str3,sizeof(str3),"Ai primit un sac ce contine %d kg de faina.", faina);
							SendClientMessage(playerid, COLOR_GREEN, str3);
							new randsms = random(4);
							if(randsms == 0)
							{
								SendClientMessage(playerid, COLOR_YELLOW, "SMS de la Aurel.Tractoristul (5554441): Poti merge la fast food-urile din zona pentru a vinde faina.");
							}
							else if(randsms == 1)
							{
								SendClientMessage(playerid, COLOR_YELLOW, "SMS de la Marian.Tractoristul (5554442): Poti merge la fast food-urile din zona pentru a vinde faina.");
							}
							else if(randsms == 2)
							{
								SendClientMessage(playerid, COLOR_YELLOW, "SMS de la Mihai.Fermierul (5554443): Poti merge la fast food-urile din zona pentru a vinde faina.");
							}
							else if(randsms == 3)
							{
								SendClientMessage(playerid, COLOR_YELLOW, "SMS de la Gigel.Fermierul (5554444): Poti merge la fast food-urile din zona pentru a vinde faina.");
							}
						}
					}
					PlayerTextDrawHide(playerid, farmtime[playerid]);
					PlayerTextDrawHide(playerid, farmjob[playerid]);
					PlayerTextDrawHide(playerid, farmbox[playerid]);
					PlayerTextDrawHide(playerid, farmspeed[playerid]);
					PlayerTextDrawHide(playerid, farmwanted[playerid]);
					KillTimer(timerfarmm[playerid]);
				}
			}
			else
			{
			    PlayerTextDrawShow(playerid, farmspeed[playerid]);
				if(PlayerInfo[playerid][pLanguage] == 1) PlayerTextDrawSetString(playerid, farmspeed[playerid], "~r~(!) Your moving speed needs to be higher than 25 KM/H.");
				if(PlayerInfo[playerid][pLanguage] == 2) PlayerTextDrawSetString(playerid, farmspeed[playerid], "~r~(!) Trebuie sa mergi cu o viteza mai mare de 25 KM/H.");
			}
		}
		else
		{
			if(WantedFarmer[playerid] == 0)
			{
				PlayerTextDrawHide(playerid, farmspeed[playerid]);
				PlayerTextDrawShow(playerid, farmwanted[playerid]);
				if(PlayerInfo[playerid][pLanguage] == 1) PlayerTextDrawSetString(playerid, farmwanted[playerid], "~r~Go back to the farm or the farm owners ~n~will call the police.");
				if(PlayerInfo[playerid][pLanguage] == 2) PlayerTextDrawSetString(playerid, farmwanted[playerid], "~r~Mergi inapoi la ferma sau vei primi wanted !");
				WantedFarmer[playerid] = 60;
			}
			else
			{
				WantedFarmer[playerid]--;
				if(WantedFarmer[playerid] == 0)
				{
					if(!IsACop(playerid))
					{
						SetVehicleToRespawn(GetPlayerVehicleID(playerid));
						WantedPoints[playerid] += 2;
						SetPlayerCriminal(playerid,-1, "stealing a vehicle from the farm");
					}
					else
					{
						WantedFarmer[playerid] = 60;
					}
				}
			}
		}
	}
	return 1;
}

 

Edited by StR_Marian

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to comment
Share on other sites

  • 0
Acum 2 ore, StR_Marian a spus:

Si eu aveam problema asta tot pe modul bigzone incearca asta de mai jos al meu e putin mai diferit in sensul ca detecteaza si viteza si limba ro sau eng vezi tu ce erori iti da si editeaza stiu ca nu scriptezi de ieri deci te descurci cu una - doua erori mici


public SetFarmer(playerid)
{
	if(farmerc[playerid] == 1)
	{
		PlayerTextDrawShow(playerid, farmtime[playerid]);
	    PlayerTextDrawShow(playerid, farmjob[playerid]);
		PlayerTextDrawShow(playerid, farmbox[playerid]);
	    if(IsPlayerInRangeOfPoint(playerid,270.0,-388.4804,-1395.7417,23.4229))
	    {
			new tmpcar = GetPlayerVehicleID(playerid),
				ccar = IsPlayerInAnyVehicle(playerid),
				spe = Carspeed(playerid);
			GetPlayerPos(playerid, PlayerPos[playerid][0], PlayerPos[playerid][1], PlayerPos[playerid][2]);
			if(PlayerPos[playerid][0] == PlayerPos[playerid][3] && PlayerPos[playerid][1] == PlayerPos[playerid][4] && PlayerPos[playerid][2] == PlayerPos[playerid][5])
			{
				PlayerTextDrawShow(playerid, farmspeed[playerid]);
				if(PlayerInfo[playerid][pLanguage] == 1) PlayerTextDrawSetString(playerid, farmspeed[playerid], "~r~(!) Your moving speed needs to be higher than 25 KM/H.");
				if(PlayerInfo[playerid][pLanguage] == 2) PlayerTextDrawSetString(playerid, farmspeed[playerid], "~r~(!) Trebuie sa mergi cu o viteza mai mare de 25 KM/H.");
				return 1;
			}
			PlayerPos[playerid][3] = PlayerPos[playerid][0];
			PlayerPos[playerid][4] = PlayerPos[playerid][1];
			PlayerPos[playerid][5] = PlayerPos[playerid][2];
			if(ccar && IsAFarmer(tmpcar) && spe > 24)
			{
			    PlayerTextDrawHide(playerid, farmspeed[playerid]);
			    PlayerTextDrawHide(playerid, farmwanted[playerid]);
				if(farmertime[playerid] >= 1)
				{
					farmertime[playerid]--;
					new str2[128];
					if(PlayerInfo[playerid][pLanguage] == 1)
					{
						format(str2,sizeof(str2),"Work ~r~%d ~w~more seconds to get your reward",farmertime[playerid]);
					}
					else
					{
						format(str2,sizeof(str2),"Munceste pentru inca ~r~%d ~w~secunde pentru a fi platit",farmertime[playerid]);
					}
					PlayerTextDrawSetString(playerid, farmtime[playerid], str2);
					PlayerTextDrawShow(playerid, farmtime[playerid]);
				}
				else if(farmertime[playerid] == 0)
				{
				    new str3[128];
				    farmertime[playerid] = 1;
					farmerc[playerid] = 0;
					SetVehicleToRespawn(tmpcar);
					new randomtransport = random(10);
					if(randomtransport > 8)
					{
						new randfarmer;
						if(SvarInfo[2][svValue] == 0) randfarmer = 30000 + random(50000);
						else randfarmer = 33000 + random(55000);
						if(PlayerInfo[playerid][pLanguage] == 1) format(str3,sizeof(str3),"The farm owners were very pleased with the quality of your work. You received $%s.",FormatNumber(randfarmer));
						if(PlayerInfo[playerid][pLanguage] == 2) format(str3,sizeof(str3),"Detinatorii fermei au fost foarte multumiti de calitatea muncii prestate. Ai primit $%s.",FormatNumber(randfarmer));
						SCM(playerid,COLOR_GREEN,str3);
						GivePlayerCash(playerid,randfarmer);
						Update(playerid, pCashx);
					}
					else if(randomtransport >= 0 && randomtransport <= 8)
					{
						new faina;
						if(PlayerInfo[playerid][pFarmSkill] == 1)
						{
							faina = 15 + random(15);
						}
						else if(PlayerInfo[playerid][pFarmSkill] == 2)
						{
							faina = 17 + random(15);
						}
						else if(PlayerInfo[playerid][pFarmSkill] == 3)
						{
							faina = 19 + random(15);
						}
						else if(PlayerInfo[playerid][pFarmSkill] == 4)
						{
							faina = 21 + random(15);
						}
						else if(PlayerInfo[playerid][pFarmSkill] == 5)
						{
							faina = 23 + random(15);
						}
						else if(PlayerInfo[playerid][pFarmSkill] >= 6)
						{
							faina = 25 + random(15);
						}
					    AreFaina[playerid] = faina;
						if(PlayerInfo[playerid][pLanguage] == 1)
						{
							SendClientMessage(playerid, COLOR_GREEN, "The farm owners don't have any money to give you, but they can give you a bag of flour.");
							format(str3,sizeof(str3),"You have received a bag that contains %d kg of flour.", faina);
							SendClientMessage(playerid, COLOR_GREEN, str3);
							new randsms = random(2);
							if(randsms == 0)
							{
								SendClientMessage(playerid, COLOR_YELLOW, "SMS from Jake_Farmer (5554444): I heard the local fast food store is looking to buy some flour.");
							}
							else if(randsms == 1)
							{
								SendSplitMessage(playerid, COLOR_YELLOW, "SMS from Joe_Farmer (5554443): The local fast food store is probably looking to buy some flour. If I had the time, I would sell it myself.");
							}
						}
						else
						{
							SendClientMessage(playerid, COLOR_GREEN, "Detinatorii fermei nu au bani pentru a te plati, dar iti pot oferi un sac cu faina drept rasplata.");
							format(str3,sizeof(str3),"Ai primit un sac ce contine %d kg de faina.", faina);
							SendClientMessage(playerid, COLOR_GREEN, str3);
							new randsms = random(4);
							if(randsms == 0)
							{
								SendClientMessage(playerid, COLOR_YELLOW, "SMS de la Aurel.Tractoristul (5554441): Poti merge la fast food-urile din zona pentru a vinde faina.");
							}
							else if(randsms == 1)
							{
								SendClientMessage(playerid, COLOR_YELLOW, "SMS de la Marian.Tractoristul (5554442): Poti merge la fast food-urile din zona pentru a vinde faina.");
							}
							else if(randsms == 2)
							{
								SendClientMessage(playerid, COLOR_YELLOW, "SMS de la Mihai.Fermierul (5554443): Poti merge la fast food-urile din zona pentru a vinde faina.");
							}
							else if(randsms == 3)
							{
								SendClientMessage(playerid, COLOR_YELLOW, "SMS de la Gigel.Fermierul (5554444): Poti merge la fast food-urile din zona pentru a vinde faina.");
							}
						}
					}
					PlayerTextDrawHide(playerid, farmtime[playerid]);
					PlayerTextDrawHide(playerid, farmjob[playerid]);
					PlayerTextDrawHide(playerid, farmbox[playerid]);
					PlayerTextDrawHide(playerid, farmspeed[playerid]);
					PlayerTextDrawHide(playerid, farmwanted[playerid]);
					KillTimer(timerfarmm[playerid]);
				}
			}
			else
			{
			    PlayerTextDrawShow(playerid, farmspeed[playerid]);
				if(PlayerInfo[playerid][pLanguage] == 1) PlayerTextDrawSetString(playerid, farmspeed[playerid], "~r~(!) Your moving speed needs to be higher than 25 KM/H.");
				if(PlayerInfo[playerid][pLanguage] == 2) PlayerTextDrawSetString(playerid, farmspeed[playerid], "~r~(!) Trebuie sa mergi cu o viteza mai mare de 25 KM/H.");
			}
		}
		else
		{
			if(WantedFarmer[playerid] == 0)
			{
				PlayerTextDrawHide(playerid, farmspeed[playerid]);
				PlayerTextDrawShow(playerid, farmwanted[playerid]);
				if(PlayerInfo[playerid][pLanguage] == 1) PlayerTextDrawSetString(playerid, farmwanted[playerid], "~r~Go back to the farm or the farm owners ~n~will call the police.");
				if(PlayerInfo[playerid][pLanguage] == 2) PlayerTextDrawSetString(playerid, farmwanted[playerid], "~r~Mergi inapoi la ferma sau vei primi wanted !");
				WantedFarmer[playerid] = 60;
			}
			else
			{
				WantedFarmer[playerid]--;
				if(WantedFarmer[playerid] == 0)
				{
					if(!IsACop(playerid))
					{
						SetVehicleToRespawn(GetPlayerVehicleID(playerid));
						WantedPoints[playerid] += 2;
						SetPlayerCriminal(playerid,-1, "stealing a vehicle from the farm");
					}
					else
					{
						WantedFarmer[playerid] = 60;
					}
				}
			}
		}
	}
	return 1;
}

 

Ms

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.