need help with a Point to Point Mission (incognito Streamer)
#1

well I am currently trying to make my own Pizza Delivery Mission where the player has to travel to multiple checkpoints in order to complete the mission.

how do i make the checkpoints only show when I start the mission?

and also once the player enters the 1st checkpoint, i want the 1st checkpoint to disappear and then the 2nd checkpoint to appear, and so on.

after 2 hours of trial and error, i could not figure this out, here are my 2 checkpoints.

Checkpoint[0] = CreateDynamicCP(2012.6134,-1729.3796,13.1536, 4, -1, 0, -1, 1000); // Pizza 1st CP //
Checkpoint[1] = CreateDynamicCP(2012.4771,-1640.1229,13.1431, 4, -1, 0, -1, 1000); // Pizza 2nd CP //

if i could get some help that would be much appreciated
Reply
#2

use CreateDynamicRaceCP and when the player enters the first checkpoint use DestroyDynamicRaceCP and create a new one and so on.
Reply
#3

He doesn't want it for races..
@OP Show the first CP wherever you start the job, make a new variable (array) MAX_PLAYERS large which will track the current player checkpoint, something like "new gCurrCP[MAX_PLAYERS]" and when the player enters the first CP, detect that in OnPlayerEnterCheckpoint, check if its "Checkpoint[0]" use DisablePlayerCheckpoint to hide it and use "ShowPlayerCheckpoint(Checkpoint[ gCurrCP[playerid] ], x, y, z, size)“, that will show you whatever the next checkpoint is.
Reply
#4

Quote:
Originally Posted by Virtual1ty
View Post
He doesn't want it for races..
@OP Show the first CP wherever you start the job, make a new variable (array) MAX_PLAYERS large which will track the current player checkpoint, something like "new gCurrCP[MAX_PLAYERS]" and when the player enters the first CP, detect that in OnPlayerEnterCheckpoint, check if its "Checkpoint[0]" use DisablePlayerCheckpoint to hide it and use "ShowPlayerCheckpoint(Checkpoint[ gCurrCP[playerid] ], x, y, z, size)“, that will show you whatever the next checkpoint is.
Some people doesn't use race checkpoints just for races.
and yeah about the topic, using normal checkpoint, race checkpoint is better than dynamic ones, cuz the checkpoint radar will be up on the map from whereever your are (long distance)
Reply
#5

look not to confuse you guys, this script isnt mine but its one i found which no longer has support. the main thing is that it is simple, doesn't require many lines and is editable to make all different kinds of missions, the thing is, this script uses SetPlayerCheckpoint. Whenever i was doing a pizza mission and i passed one of my streamer checkpoints, the SetPlayerCheckpoint would disappear and never reappear.

What I was trying to do was convert the SetPlayerCheckpoint into CreateDynamicCP.
I did most of the script and I got no errors in pawno, but ingame, when I stepped into the first checkpoint, it didn't disappear and also all the other checkpoints were being streamed.

I was using TogglePlayerDynamicRaceCP(playerid, checkpointid, toggle); to toggle the previous and next checkpoint on and off after i entered the next checkpoint but i still couldnt get it to work.

anywho, here is the base script I am using, with a few Grammar tweaks of my own.

http://pastebin.com/gx2NxryM

if someone could edit this script to work with incognito's streamer, I would be very grateful.


edit: also, I don't like using race checkpoints because the mission isn't a race, it feels weird.
Reply
#6

You can show/hide a checkpoint (from streamer) by using Streamer_AppendArrayData and Streamer_RemoveArrayData functions.

An example:
pawn Code:
// you should hide any checkpoint before and then (supposing the first cp is shown) it hides the first cp and it shows the second
Streamer_RemoveArrayData(STREAMER_TYPE_CP, Checkpoint[0], E_STREAMER_PLAYER_ID, playerid);
Streamer_AppendArrayData(STREAMER_TYPE_CP, Checkpoint[1], E_STREAMER_PLAYER_ID, playerid);
Reply
#7

Quote:
Originally Posted by Konstantinos
View Post
You can show/hide a checkpoint (from streamer) by using Streamer_AppendArrayData and Streamer_RemoveArrayData functions.

An example:
pawn Code:
// you should hide any checkpoint before and then (supposing the first cp is shown) it hides the first cp and it shows the second
Streamer_RemoveArrayData(STREAMER_TYPE_CP, Checkpoint[0], E_STREAMER_PLAYER_ID, playerid);
Streamer_AppendArrayData(STREAMER_TYPE_CP, Checkpoint[1], E_STREAMER_PLAYER_ID, playerid);
haven't the slightest clue on how I could possibly implement that :/
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)