Jump to content

Problema quest


AnDrEyUpS

Recommended Posts

Salut @AnDrEyUpS ,

In primul rand, nu ar trebui sa setezi variabila StartQuest[playerid] pe 1 (true), inaintea celorlalte verificari. Practic, tu daca nu ai inceput questul si ai dat /startquest, dar nu esti in locatia potrivita (cum ai tu verificarea acolo), variabila StartQuest o sa fie setata pe 1, iar apoi o sa-ti returneze mesajul cum ca nu esti in locatia potrivita. Si probabil de aici si pleaca problema ta.

Deci, muti variabila StartQuest[playerid] inainte de "return 1;", in asa fel incat sa fie setata doar in cazul in care nu intampini vr-o problema (adica sa nu ai licenta de condus, sau sa nu fii in locatia potrivita), cum ai tu facute verificarile. La asta ma refer prin problema.

Cam asa ar trebui sa arate comanda, ca sa-ti faci o idee despre ce am zis:

CMD:startquest(playerid, params[])
{
    	if(StartQuest[playerid]) return SCM(playerid, COLOR_SPECIALMISSION, "Special Quest: Text.");
    	//StartQuest[playerid] = 1; ==> ASTA STERS
	if(!IsPlayerInRangeOfPoint(playerid, 3.5, 1123.0138, -1127.3977, 23.8047)) return SCM(playerid, COLOR_INFO, "Eroare: Nu esti la locatia potrivita.");
	if(pInfo[playerid][pCarLic] > 1) return SCM(playerid, COLOR_INFO, "Eroare: Nu ai licenta de condus!");
	SetPlayerRaceCheckpoint(playerid, 0, 2091.1172 ,-1278.4653, 26.1797, 2091.1172, -1278.4653, 26.1797, 3.5), CP[playerid] = 348;
	SCM(playerid, COLOR_SPECIALMISSION, "Special Quest: Text.");
	StartQuest[playerid] = 1; // ==> ASTA ADAUGAT
	return 1;
}

 

  • Like 1

Daca te-am ajutat =>

spacer.png

Link to comment
Share on other sites

On 10/4/2021 at 11:39 PM, shane said:

Salut @AnDrEyUpS ,

In primul rand, nu ar trebui sa setezi variabila StartQuest[playerid] pe 1 (true), inaintea celorlalte verificari. Practic, tu daca nu ai inceput questul si ai dat /startquest, dar nu esti in locatia potrivita (cum ai tu verificarea acolo), variabila StartQuest o sa fie setata pe 1, iar apoi o sa-ti returneze mesajul cum ca nu esti in locatia potrivita. Si probabil de aici si pleaca problema ta.

Deci, muti variabila StartQuest[playerid] inainte de "return 1;", in asa fel incat sa fie setata doar in cazul in care nu intampini vr-o problema (adica sa nu ai licenta de condus, sau sa nu fii in locatia potrivita), cum ai tu facute verificarile. La asta ma refer prin problema.

Cam asa ar trebui sa arate comanda, ca sa-ti faci o idee despre ce am zis:

CMD:startquest(playerid, params[])
{
    	if(StartQuest[playerid]) return SCM(playerid, COLOR_SPECIALMISSION, "Special Quest: Text.");
    	//StartQuest[playerid] = 1; ==> ASTA STERS
	if(!IsPlayerInRangeOfPoint(playerid, 3.5, 1123.0138, -1127.3977, 23.8047)) return SCM(playerid, COLOR_INFO, "Eroare: Nu esti la locatia potrivita.");
	if(pInfo[playerid][pCarLic] > 1) return SCM(playerid, COLOR_INFO, "Eroare: Nu ai licenta de condus!");
	SetPlayerRaceCheckpoint(playerid, 0, 2091.1172 ,-1278.4653, 26.1797, 2091.1172, -1278.4653, 26.1797, 3.5), CP[playerid] = 348;
	SCM(playerid, COLOR_SPECIALMISSION, "Special Quest: Text.");
	StartQuest[playerid] = 1; // ==> ASTA ADAUGAT
	return 1;
}

Multumesc!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.