10.03.2009, 13:13
- Yaheli's Checkpoint Streamer__________________________________________________ __________________________________________________ _________________________________________________
v1.1
- Description
- This .inc file adds functions which allow you to stream checkpoints. The include uses OnPlayerUpdate to stream the checkpoints and update player location.
pawn Code:SetStreamCheckpoint(Float:x, Float:y, Float:z, Float:size, Float:View_Distance);
DisableStreamCheckpoint(checkpointid);
SetPlayerStreamCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size, Float:View_Distance);
DisablePlayerStreamCheckpoint(playerid, 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);pawn Code: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.
- 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; }
http://www.zezombia.com/upload/Yaheli/YCP.inc