mission checkpoints? [point to point][streamer]
#1

I've been trying for the past 8 hours wondering how i can get mission checkpoints working with incognitos streamer. I gave it a few cracks and after failing heaps of times using 3 different methods that i concocted, i decided to try find some help on the forums.

My ideal mission is a pizza delivery mission where a player starts it by using /pizza while on a Pizza Boy.

Then the server chooses 1 out of 10 random locations to go deliver pizza to and it creates a checkpoint there.

Then when the player enters that checkpoint, it adds +1 to a variable and also disables that checkpoint from re-entering the random pool(can't be the same checkpoint twice).

Once a player delivers 5 pizzas (variable = 5) the player gets rewarded money for his efforts and the mission ends.


Checkpoints i've already created (the reason the distance is set to 10000 is so that the checkpoint can be seen from anywhere on the map).
PHP Code:
// PIZZA MISSION
Checkpoint[183] = CreateDynamicCP(2326.3721,-1795.8042,13.14292, -10, -110000); //Pizza 1//
Checkpoint[184] = CreateDynamicCP(2385.5088,-1346.9873,24.00062, -10, -110000); //Pizza 2//
Checkpoint[185] = CreateDynamicCP(2284.9150,-1053.8678,48.72152, -10, -110000); //Pizza 3//
Checkpoint[186] = CreateDynamicCP(1892.4847,-1120.8831,24.98252, -10, -110000); //Pizza 4//
Checkpoint[187] = CreateDynamicCP(2746.5930,-1206.0051,66.81442, -10, -110000); //Pizza 5//
Checkpoint[188] = CreateDynamicCP(2804.7375,-1963.1422,13.14662, -10, -110000); //Pizza 6//
Checkpoint[189] = CreateDynamicCP(2507.0293,-2016.8033,13.14402, -10, -110000); //Pizza 7//
Checkpoint[190] = CreateDynamicCP(1730.6172,-2127.7078,13.14222, -10, -110000); //Pizza 8//
Checkpoint[191] = CreateDynamicCP(1973.9854,-1673.2322,15.56252, -10, -110000); //Pizza 9//
Checkpoint[192] = CreateDynamicCP(2452.1389,-1645.9849,13.06232, -10, -110000); //Pizza 10// 
could anyone help me with a little example of some sort? it's been hassling me for so long, haven't been able to get point to point missions to work at all.
Reply
#2

Check this, https://sampforum.blast.hk/showthread.php?tid=322360

Might help you.
Reply
#3

Set Player checkpoint is so easy, but that is not what I'm looking for, trust me every script I have found on the forums was with Set Player checkpoint, I have no idea how to directly convert it into streamer format, like I said, I can't even manage to hide a streamer checkpoint.

The streamer thread doesn't tell much about the functions, isValidDynamicCp, TogglePlayerDynamicCp
none of these really explain themselves.

I've toggled a checkpoint to false when the player spawns but it still stays there.
Reply
#4

They stay there because those checkpoints are created during server startup presumable and they are there for everyone.
They always exist until you use DestroyDynamicCheckpoint.

That's why everyone uses SetPlayerCheckpoint as they only need 1 checkpoint to be visible to only 1 player during his mission.
Otherwise you can't plot a course using those checkpoints.
Dynamic checkpoints are visible when you come into range, so your players might just go through any of them instead of your script forcing them to follow a specific order.
Reply
#5

Quote:
Originally Posted by tommzy09
View Post
The streamer thread doesn't tell much about the functions, isValidDynamicCp, TogglePlayerDynamicCp
none of these really explain themselves.

I've toggled a checkpoint to false when the player spawns but it still stays there.
Their names are self-explanatory to be honest so no need to.

TogglePlayerDynamicCP should have worked but even if it didn't, you can always use Streamer_AppendArrayData and Streamer_RemoveArrayData functions.

Usage:
pawn Code:
// visible that checkpoint for that player:
Streamer_AppendArrayData(STREAMER_TYPE_CP, checkpointid, E_STREAMER_PLAYER_ID, playerid);
// not visible that checkpoint for that player:
Streamer_RemoveArrayData(STREAMER_TYPE_CP, checkpointid, E_STREAMER_PLAYER_ID, playerid);
Reply
#6

thanks konstantinos, i've been able to get it to work with the code you provided above, thanks heaps
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)