take this as example
PHP код:
#include <streamer>
new Checkpoint1; //at top of script
//Then
public OnGameModeInit()
{
Checkpoint1 = CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0); // Set Your x,y,z coords and size of checkpoint and interior if cp is in any interior
return 1;
}
//After this
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == Checkpoint1)
{
//Here put your code
SendClientMessage(playerid, -1, "Info: You are on checkpoint Checkpoint1!");
}
return 1;
}
//Then
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
if(checkpointid == Checkpoint1)
{
SendClientMessage(playerid, 0xFF0000FF, "Info: You have left the checkpoint mission failed!");
}
return 1;
}