PDA

View Full Version : Objects quest problem


enzulikeS
30/01/2018, 04:32 PM
Ok so i spawned some object, they need to count for a special quest with object.. i made the entirely script but, when i enter in a object it doesn't count for the progress..
i don't know what to post, tell me what i should post and i will

edyun
30/01/2018, 04:41 PM
Just post the code that updates the count for the progress, and the IsPlayerInRangeOfPoint for the objects please.

enzulikeS
30/01/2018, 05:19 PM
https://pastebin.com/rSxwjgqV

I think i forgot the IsPlayerInRangeOfPoint... i dont know how to create it :/

enzulikeS
30/01/2018, 08:03 PM
can someone help?

YouAlreadyKnowWhoItIs
30/01/2018, 08:33 PM
Ok, look at this line:
format(string,sizeof(string)," Felicitari! Ai gasit obiectul nr. {FF0000}%d{FFFFFF}! Acum ai {FF0000}%d / %d {FFFFFF}obiecte!",j,ObiecteGasite[playerid],MAX_OBIECTE);
You have put ObiecteGasite[playerid]. Shouldnt it be ObiecteGasiteTotal[playerid]?

enzulikeS
31/01/2018, 09:58 AM
Ok, look at this line:
format(string,sizeof(string)," Felicitari! Ai gasit obiectul nr. {FF0000}%d{FFFFFF}! Acum ai {FF0000}%d / %d {FFFFFF}obiecte!",j,ObiecteGasite[playerid],MAX_OBIECTE);
You have put ObiecteGasite[playerid]. Shouldnt it be ObiecteGasiteTotal[playerid]?

Modified, but same problem

enzulikeS
31/01/2018, 04:00 PM
anyone?

PepsiCola23
31/01/2018, 05:47 PM
You can place the objects somewhere,get the coordinates.

and use if isplayerinrangeofpoint and if he gets in the range of the object send him a message saying "you`ve collected an item" , destroy the object and set the variable of player total gifts to current value + 1.

you also have to stock that in mysql / ini to make sure he wont do the quest all over again or make sure his progress won`t reset.

enzulikeS
31/01/2018, 05:48 PM
i don't know how to do this: player is going into a object but it isn't count to the progress.. i dont know how to do this, how te player can collect it

PepsiCola23
31/01/2018, 06:22 PM
what variable do you use for gifts?
btw i wouldnt suggest starting with this type of scripts if you are a beginner..its quite difficult,check tutorials section and start with easier things.

Mugala
31/01/2018, 07:49 PM
try this one, u dont need loop for this script.
public OnPlayerPickUpPickup(playerid, pickupid)
{
new string[128];
if(pickupid >= Obiecte[0] && pickupid <= Obiecte[14])
{

dont forget to replace 'j' to 'pickupid'

PepsiCola23
31/01/2018, 08:13 PM
yeah that would be the second method ..the one mugalito explained