Y
Yaheli
Guest
- Yaheli's Checkpoint Streamer
- Description
- This .inc file adds functions which allow you to stream checkpoints. The include uses OnPlayerUpdate to stream the checkpoints and update player location.
- Included Functions
- SetStreamCheckpoint(Float:x, Float:y, Float:z, Float:size, Float:View_Distance);
- DisableStreamCheckpoint(checkpointid);
- SetStreamCheckpointPos(checkpointid, Float:x, Float:y, Float:z);
- SetStreamCheckpointSize(checkpointid, Float:radius);
- SetStreamCheckpointViewDistance(checkpointid, Float:View_Distance);
- StreamCheckpointsForPlayer(playerid);
- GetDistanceToCheckpoint(Float:X, Float:Y, Float:Z, checkpointid);
- IsPlayerInStreamCheckpoint(playerid, checkpointid);
- YCP_OnGameModeInit(); - Must be placed in OnGameModeInit for the streamer to work.
- YCP_OnPlayerConnect(playerid); - Must be placed in OnPlayerConnect for the streamer to work.
- YCP_OnPlayerUpdate(playerid); - Must be placed in OnPlayerUpdate for the streamer to work.
NOTE: It can be placed under a timer to but it must be somewhere for the streamer to work. - YCP_OnPlayerEnterCheckpoint(playerid); - Must be placed in OnPlayerEnterCheckpoint for the streamer to work.
- Callbacks
- OnPlayerEnterStreamCheckpoint(playerid, checkpointid);
- In order to compile with no errors you must add this public into the GM or FS.
You will use this as a "new" OnPlayerEnterCheckpoint and it even includes a 'checkpointid' parameter.
- In order to compile with no errors you must add this public into the GM or FS.
- OnPlayerExitStreamCheckpoint(playerid, checkpointid);
- To add this callback to your GM just add this code:
Code:
forward OnPlayerExitStreamCheckpoint(playerid, checkpointid);
public OnPlayerExitStreamCheckpoint(playerid, checkpointid)
{
return 1;
}
- Download
http://www.zezombia.com/upload/Yaheli/YCP.inc