Peršokti į turinį
Negalima prašyti ar platinti betkokių žaidimą (multiplayer) palengvinančių programų ir scriptų! Kitaip bus taikoma 1.21. taisyklė

Atiduodu žolės veiklą [automatinė]


Deep_Dark

Ši tema yra neaktyvi. Paskutinis pranešimas šioje temoje buvo prieš 2071 dienas (-ų). Patariame sukurti naują temą, o ne rašyti naują pranešimą.

Už neaktyvių temų prikėlimą galite sulaukti įspėjimo ir pranešimo pašalinimo!

Recommended Posts

new bool:   ZolesRezimas = false; // žolės rėžimas
new Text3D: zolestxd[16];// žolės tekstai
new ZolesObj[16]; // žolės objektai
new IeskoZoles[MAX_PLAYERS];//taimeris
new NaikinaZole[MAX_PLAYERS];//taimeris

public OnGameModeInit()
{
	//sukuriame taimeri kas kiek laiko atsispamins objektai/tekstai ir pranesimas.
	SetTimer("Spawninamzole", 60000 * 60 * 2, true);
	
	return 1;
}

//skripto apačioje

f_public: Spawninamzole()
{
	if(ZolesRezimas == false)//tikrina ar veikla išjunkta
	{
		ZolesObj[0] = CreateDynamicObject(19473, -21.84169, 94.41344, 2.10345,   0.00000, 0.00000, 0.00000);
		zolestxd[0] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -21.84169, 94.41344, 2.10345, 15, 0, 0);
		ZolesObj[1] = CreateDynamicObject(19473, -27.71765, 31.70114, 2.10472,   0.00000, 0.00000, 0.00000);
		zolestxd[1] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -27.71765, 31.70114, 2.10472, 15, 0, 0);
		ZolesObj[2] = CreateDynamicObject(19473, -75.11143, 74.92611, 2.09649,   0.00000, 0.00000, 0.00000);
		zolestxd[2] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -75.11143, 74.92611, 2.09649, 15, 0, 0);
		ZolesObj[3] = CreateDynamicObject(19473, -64.44716, 106.69865, 2.06659,   0.00000, 0.00000, 0.00000);
		zolestxd[3] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -64.44716, 106.69865, 2.06659, 15, 0, 0);
		ZolesObj[4] = CreateDynamicObject(19473, -79.06287, 35.42387, 2.07655,   0.00000, 0.00000, 0.00000);
		zolestxd[4] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -79.06287, 35.42387, 2.07655, 15, 0, 0);
		ZolesObj[5] = CreateDynamicObject(19473, -106.56698, 10.60192, 2.08213,   0.00000, 0.00000, 0.00000);
		zolestxd[5] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -106.56698, 10.60192, 2.08213, 15, 0, 0);
		ZolesObj[6] = CreateDynamicObject(19473, -104.94350, -22.93669, 2.08048,   0.00000, 0.00000, 0.00000);
		zolestxd[6] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -104.94350, -22.93669, 2.08048, 15, 0, 0);
		ZolesObj[7] = CreateDynamicObject(19473, -47.23285, -16.03860, 2.07273,   0.00000, 0.00000, 0.00000);
		zolestxd[7] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -47.23285, -16.03860, 2.07273, 15, 0, 0);
		ZolesObj[8] = CreateDynamicObject(19473, -81.86527, -3.38968, 2.08045,   0.00000, 0.00000, 0.00000);
		zolestxd[8] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -81.86527, -3.38968, 2.08045, 15, 0, 0);
		ZolesObj[9] = CreateDynamicObject(19473, -102.12997, -57.96952, 2.09165,   0.00000, 0.00000, 0.00000);
		zolestxd[9] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -102.12997, -57.96952, 2.09165, 15, 0, 0);
		ZolesObj[10] = CreateDynamicObject(19473, -140.18343, -66.80074, 2.08824,   0.00000, 0.00000, 0.00000);
		zolestxd[10] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -140.18343, -66.80074, 2.08824, 15, 0, 0);
		ZolesObj[11] = CreateDynamicObject(19473, -160.07346, -96.79213, 2.08254,   0.00000, 0.00000, 0.00000);
		zolestxd[11] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -160.07346, -96.79213, 2.08254, 15, 0, 0);
		ZolesObj[12] = CreateDynamicObject(19473, -63.61949, -76.18393, 2.08652,   0.00000, 0.00000, 0.00000);
		zolestxd[12] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -63.61949, -76.18393, 2.08652, 15, 0, 0);
		ZolesObj[13] = CreateDynamicObject(19473, -74.55096, -114.63991, 2.08767,   0.00000, 0.00000, 0.00000);
		zolestxd[13] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -74.55096, -114.63991, 2.08767, 15, 0, 0);
		ZolesObj[14] = CreateDynamicObject(19473, -31.50261, 8.37005, 2.08921,   0.00000, 0.00000, 0.00000);
		zolestxd[14] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -31.50261, 8.37005, 2.08921, 15, 0, 0);
		ZolesObj[15] = CreateDynamicObject(19473, -2.93329, 65.97160, 2.08720,   0.00000, 0.00000, 0.00000);
		zolestxd[15] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -2.93329, 65.97160, 2.08720, 15, 0, 0);

		SendClientMessageToAll(-1, "{36ABEA}• [SANFIERRO] {ffffff}Serveryje atidaryta žolės ferma, skubėk greičiau, kol gaujos ar teisėsauga neišrinko!");
		SendClientMessageToAll(-1, "{36ABEA}• [SANFIERRO] {ffffff}({36ABEA} Žalia kaukolė minimape {ffffff})");

		ZolesRezimas = true; //įjungią veiklą

		SetTimer("Atstatomzole", 60000 * 20, false);//uzsidarys žolė po 20min
	}

	return 1;
}

f_public: Atstatomzole(playerid)// taimerio pabaiga, kurioje užsidaro veikla
{
	if(ZolesRezimas == true) //tikrina ar veikla įjunkta
	{
	    for(new s = 0; s < 16; s++) DestroyDynamicObject(ZolesObj[s]);// sunaikina visus žolės objektus
		ZolesRezimas = false; //išjungią veiklą

		for(new s = 0; s < 16; s++) Delete3DTextLabel(zolestxd[s]); //sunaikina visus žolės tekstus

		SendClientMessage(playerid, -1, "{36ABEA}• {ffffff}Išjungiai žolės fermą!");

		SendClientMessageToAll(-1, "{36ABEA}• {ffffff}Žolės ferma buvo ištuštinta, todėl iškarto užsidarė.");
	}

	return 1;
}

f_public: IeskoZolesEx(playerid)
{
    SendClientMessage(playerid, -1, "{CECE41}••• {ffffff}Radai kazkiek zoles.!");
	new str[456];
    new randomzole = 2 + random(5);//nustatom kiek duos žolės
    PI[playerid][Weed] +=randomzole;
    format(str, sizeof(str), "{999999}• [FERMA]: {ffffff}Radai {CECE41}%s {ffffff}vnt žolės{CECE41} /narkotikai",konvertuoti_pinigus(randomzole));
    SendClientMessage(playerid, -1, str);

	TogglePlayerControllable(playerid,true);

	return 1;
}

f_public: NaikinaZoleEx(playerid)//teisesaugai
{
    new str[456];
    new randomzole = 3 + random(5); //nustatom kiek sunaikinta bus žolės
    new randommoney = 23 + random(100); //nustatom kiek gaus pinigų už sunaikintą žolę
    format(str, sizeof(str), "{CECE41}• [FERMA]: {ffffff}Sunaikinai {CECE41}%s {ffffff}vnt žolės ir gavai: {CECE41}%s eur",konvertuoti_pinigus(randomzole),konvertuoti_pinigus(randommoney));
    SendClientMessage(playerid, -1, str);
    GivePlayerMoneyA(playerid, randommoney);
    TogglePlayerControllable(playerid,true);
    //pranešam teisėsaugai į raciją apie sėkmingą sunaikinimą
    foreach(new p : Player)
	{
		switch(PI[p][specialybe])
		{
			case 1, 5:
			{
			    new String[456];
				format(String, sizeof(String), "{FFFFFF}• [TEISESAUGA] :{CECE41} %s {FFFFFF} Sunaikino: {CECE41}%s {FFFFFF}vnt žolės", GetPlayerNameEx(playerid),konvertuoti_pinigus(randomzole));
				SendClientMessage(p, -1, String);
			}
		}
	}
    return 1;
}

CMD:ieskotizoles(playerid)//komanda norint ieškoti žolę
{
    if(ZolesRezimas == false) return SendClientMessage(playerid, -1, "{36ABEA}• {ffffff}Žolės ferma šiuo metu neveikia!");
    if(PI[playerid][specialybe] == 1 && PI[playerid][specialybe] == 5) return SendClientMessage(playerid, -1, "{36ABEA}• {ffffff}Teisėsaugai komanda {{36ABEA}}/naikintizole!"); // tikrina ar teisėsauga, jiems kita komanda
    if(IsPlayerInRangeOfPoint(playerid, 5.0, -21.84169, 94.41344, 2.10345))
    {
    	GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		IeskoZoles[playerid] = SetTimerEx("IeskoZolesEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[0]);
		DestroyDynamicObject(ZolesObj[0]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -27.71765, 31.70114, 2.10472))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		IeskoZoles[playerid] = SetTimerEx("IeskoZolesEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[1]);
		DestroyDynamicObject(ZolesObj[1]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -75.11143, 74.92611, 2.09649))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		IeskoZoles[playerid] = SetTimerEx("IeskoZolesEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[2]);
		DestroyDynamicObject(ZolesObj[2]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -64.44716, 106.69865, 2.06659))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		IeskoZoles[playerid] = SetTimerEx("IeskoZolesEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[3]);
		DestroyDynamicObject(ZolesObj[3]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -79.06287, 35.42387, 2.07655))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		IeskoZoles[playerid] = SetTimerEx("IeskoZolesEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[4]);
		DestroyDynamicObject(ZolesObj[4]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -106.56698, 10.60192, 2.08213))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		IeskoZoles[playerid] = SetTimerEx("IeskoZolesEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[5]);
		DestroyDynamicObject(ZolesObj[5]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -104.94350, -22.93669, 2.08048))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		IeskoZoles[playerid] = SetTimerEx("IeskoZolesEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[6]);
		DestroyDynamicObject(ZolesObj[6]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -47.23285, -16.03860, 2.07273))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		IeskoZoles[playerid] = SetTimerEx("IeskoZolesEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[7]);
		DestroyDynamicObject(ZolesObj[7]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -81.86527, -3.38968, 2.08045))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		IeskoZoles[playerid] = SetTimerEx("IeskoZolesEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[8]);
		DestroyDynamicObject(ZolesObj[8]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -102.12997, -57.96952, 2.09165))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		IeskoZoles[playerid] = SetTimerEx("IeskoZolesEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[9]);
		DestroyDynamicObject(ZolesObj[9]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -140.18343, -66.80074, 2.08824))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		IeskoZoles[playerid] = SetTimerEx("IeskoZolesEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[10]);
		DestroyDynamicObject(ZolesObj[10]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -160.07346, -96.79213, 2.08254))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		IeskoZoles[playerid] = SetTimerEx("IeskoZolesEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[11]);
		DestroyDynamicObject(ZolesObj[11]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -63.61949, -76.18393, 2.08652))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		IeskoZoles[playerid] = SetTimerEx("IeskoZolesEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[12]);
		DestroyDynamicObject(ZolesObj[12]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -74.55096, -114.63991, 2.08767))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		IeskoZoles[playerid] = SetTimerEx("IeskoZolesEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[13]);
		DestroyDynamicObject(ZolesObj[13]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -31.50261, 8.37005, 2.08921))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		IeskoZoles[playerid] = SetTimerEx("IeskoZolesEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[14]);
		DestroyDynamicObject(ZolesObj[14]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -2.93329, 65.97160, 2.08720))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		IeskoZoles[playerid] = SetTimerEx("IeskoZolesEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[15]);
		DestroyDynamicObject(ZolesObj[15]);
	}
	return 1;
}

CMD:naikintizole(playerid)
{
    if(ZolesRezimas == false) return SendClientMessage(playerid, -1, "{36ABEA}• {ffffff}Žolės ferma šiuo metu neveikia!"); //tikrina ar žolės eventas veikia
    if(PI[playerid][specialybe] != 1 && PI[playerid][specialybe] != 5) return 0; //jai nebūsite teisėsaugos darbuotojas, komanda neveiks
    if(IsPlayerInRangeOfPoint(playerid, 5.0, -21.84169, 94.41344, 2.10345)) //tikrina ar yra šiose kordinatėse, taip kiekvienam atskirai
    {
    	GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false); //užšaldom žaidėją, kad nebugintu

		NaikinaZole[playerid] = SetTimerEx("NaikinaZoleEx", 3000, false, "d", playerid); //taimeris po 3s
		Delete3DTextLabel(zolestxd[0]);
		DestroyDynamicObject(ZolesObj[0]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -27.71765, 31.70114, 2.10472))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		NaikinaZole[playerid] = SetTimerEx("NaikinaZoleEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[1]);
		DestroyDynamicObject(ZolesObj[1]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -75.11143, 74.92611, 2.09649))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		NaikinaZole[playerid] = SetTimerEx("NaikinaZoleEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[2]);
		DestroyDynamicObject(ZolesObj[2]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -64.44716, 106.69865, 2.06659))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		NaikinaZole[playerid] = SetTimerEx("NaikinaZoleEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[3]);
		DestroyDynamicObject(ZolesObj[3]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -79.06287, 35.42387, 2.07655))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		NaikinaZole[playerid] = SetTimerEx("NaikinaZoleEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[4]);
		DestroyDynamicObject(ZolesObj[4]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -106.56698, 10.60192, 2.08213))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		NaikinaZole[playerid] = SetTimerEx("NaikinaZoleEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[5]);
		DestroyDynamicObject(ZolesObj[5]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -104.94350, -22.93669, 2.08048))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		NaikinaZole[playerid] = SetTimerEx("NaikinaZoleEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[6]);
		DestroyDynamicObject(ZolesObj[6]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -47.23285, -16.03860, 2.07273))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		NaikinaZole[playerid] = SetTimerEx("NaikinaZoleEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[7]);
		DestroyDynamicObject(ZolesObj[7]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -81.86527, -3.38968, 2.08045))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		NaikinaZole[playerid] = SetTimerEx("NaikinaZoleEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[8]);
		DestroyDynamicObject(ZolesObj[8]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -102.12997, -57.96952, 2.09165))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		NaikinaZole[playerid] = SetTimerEx("NaikinaZoleEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[9]);
		DestroyDynamicObject(ZolesObj[9]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -140.18343, -66.80074, 2.08824))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		NaikinaZole[playerid] = SetTimerEx("NaikinaZoleEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[10]);
		DestroyDynamicObject(ZolesObj[10]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -160.07346, -96.79213, 2.08254))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		NaikinaZole[playerid] = SetTimerEx("NaikinaZoleEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[11]);
		DestroyDynamicObject(ZolesObj[11]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -63.61949, -76.18393, 2.08652))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		NaikinaZole[playerid] = SetTimerEx("NaikinaZoleEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[12]);
		DestroyDynamicObject(ZolesObj[12]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -74.55096, -114.63991, 2.08767))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		NaikinaZole[playerid] = SetTimerEx("NaikinaZoleEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[13]);
		DestroyDynamicObject(ZolesObj[13]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -31.50261, 8.37005, 2.08921))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		NaikinaZole[playerid] = SetTimerEx("NaikinaZoleEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[14]);
		DestroyDynamicObject(ZolesObj[14]);
	}
	else if(IsPlayerInRangeOfPoint(playerid, 5.0, -2.93329, 65.97160, 2.08720))
	{
		GameTextForPlayer(playerid,"~w~IESKAI ZOLES..", 3000, 5);

		TogglePlayerControllable(playerid,false);

		NaikinaZole[playerid] = SetTimerEx("NaikinaZoleEx", 3000, false, "d", playerid);
		Delete3DTextLabel(zolestxd[15]);
		DestroyDynamicObject(ZolesObj[15]);
	}
	return 1;
}

Atiduodu, man jo nebereiks.

Nuoroda į komentarą
Dalintis per kitą puslapį

Citata

new str[456];
format(str, sizeof(str), "{999999}• [FERMA]: {ffffff}Radai {CECE41}%s {ffffff}vnt žolės{CECE41} /narkotikai",konvertuoti_pinigus(randomzole));

Kam tu kuri tokius didelius pranešimo kintamuosius? Tavo žinutė užima vos 90 simbolių, o sukuri 5 kartus didesnio dydžio kintamąjį, kas bereikalingai išnaudoja atmintį.

Citata

ZolesObj[15] = CreateDynamicObject(19473, -2.93329, 65.97160, 2.08720,   0.00000, 0.00000, 0.00000);
zolestxd[15] = Create3DTextLabel("{36ABEA}Žolės ferma\n{ffffff}Norint rinkti žoles rašyk {36ABEA}/ieskotizoles\n{ffffff}Teisėsaugai: {36ABEA}/naikintizole", -1, -2.93329, 65.97160, 2.08720, 15, 0, 0);

Jeigu kuri dinaminius objektus, būtų gerai kurti ir dinaminį tekstą.

Nebūtų lengviau, dinamiškiau, ir lengviau pridėti naujų žolės paieškos vietų su panašiu kodu, tikrindamas ar žaidėjas yra šalia pozicijos, nes dabar turi virš 10+ tokių pačių klausimų, kurie atlieka visiškai tą patį;

new const Float: weedSpots[3][] =
{
	{-27.71765, 31.70114, 2.10472},
	{-21.84169, 94.41344, 2.10345},
	{-75.11143, 74.92611, 2.09649}
};

for(new i = 0, j = sizeof(weedSpots); i < j; i++)
{
	if(IsPlayerInRangeOfPoint(playerid, 5.0, weedSpots[i][0], weedSpots[i][1], weedSpots[i][2]))
	{
		[...]
		break;
	}
}

Nežinau kodėl žmonės dar vartoja lietuviškus terminus kodavime, jeigu pati kalba programuota anglų kalba, tai būtų logiška ir koduoti anglų kalba. Pats skriptas gal ir neblogas pakoregavus jį, bet dabartinėje jo stadijoje tikslo platint nematau.

Nuoroda į komentarą
Dalintis per kitą puslapį

prieš 5 valandas(-ų), *Andrius parašė:

f_public

Kur define'as??

prieš 5 valandas(-ų), *Andrius parašė:

if(ZolesRezimas == false)//tikrina ar veikla išjunkta

Galima ir taip:
 

if(!ZolesRezimas)
prieš 5 valandas(-ų), *Andrius parašė:

new str[456];

Kaip jau žmogus minėjo aukščiau, kam tiek daug? Tai galioja visiems tokiems kintamiesiems.

prieš 5 valandas(-ų), *Andrius parašė:

GivePlayerMoneyA(playerid, randommoney);

Galėtum užhookinti arba pačią funkciją numesti. Just in case kažkam nedaeis kodėl su A.

 

Nieko įspūdingo čia nėra, paprastas skriptas. Manau iš kokio modo ištraukei ir įmetei, kas pilnai įmanoma, kadangi nerašei, kad tavo skriptas. Tokiu atveju būtų gerai nurodyti autorių/modifikaciją iš kurios ištraukei kodo dalį.

 

Nuoroda į komentarą
Dalintis per kitą puslapį

8 minutes prieš, *Andrius parašė:

Atiduodi ir da blogai, tai ka man gal uz eurus atidavinet, bent skripto nematysit.

Juk mes (bent aš) rašydamas komentarą noriu tik, kad tobulėtum, parodžiau greitesnę pozicijų nurodymo technika, paprasčiausiai pasakiau, kad nenaudotum tiek atminties bereikalingai, nieko dėl jos nesakyčiau, bet platini skriptą, o ne modifikaciją. Sėkmės su kitais darbais.

Nuoroda į komentarą
Dalintis per kitą puslapį

prieš 9 valandas(-ų), *Andrius parašė:

Aš apie timber heiteri. Jam čia reik kišt nosį.

Heiteris:D:D:D ble negaliu :D, parašai, parodai kaip geriau, kad žmogus įsisavintų ir kitą kartą padarytų dar geriau, o tau špygą ir heiteriu pavadina :D. Jesus, nereikalingas man tas tavo skriptas, kam reikės tas paims... :D

Nuoroda į komentarą
Dalintis per kitą puslapį

Ši tema yra neaktyvi. Paskutinis pranešimas šioje temoje buvo prieš 2071 dienas (-ų). Patariame sukurti naują temą, o ne rašyti naują pranešimą.

Už neaktyvių temų prikėlimą galite sulaukti įspėjimo ir pranešimo pašalinimo!

Prisijungti prie diskusijos

Palikti atsakymą galite iš karto, o užsiregistruoti vėliau. Jeigu jau turite paskyrą mūsų forume, Prisijunkite.

Svečias
Atsakyti šioje temoje...

×   Įklijuotas tekstas turi teksto formatavimą.   Pašalinti teksto formatavimą

  Galimi tik 75 veidukai.

×   Nuoroda buvo automatiškai įterpta.   Įterpti nuorodą paprastai

×   Jūsų ankstesnis pranešimas buvo atkurtas.   Išvalyti redaktorių

×   Jūs negalite įkelti nuotraukas tiesiogiai.Įkelkite arba įdėkite nuotraukas iš URL.

  • Šiame puslapyje naršo:   0 nariai

    • Nėra registruotų narių peržiūrinčių šį forumą.

Skelbimai


×
×
  • Sukurti naują...