15.04.2013, 01:30
use this plugin/include : https://sampforum.blast.hk/showthread.php?tid=102865
and make a cp like this
[/pawn]
and dont forget the callbacks
edit : you got it now ?
and make a cp like this
pawn Код:
new CP1;
new CP2;
new CP3;
public OnGameModeInit()
{
CP1 = CreateDynamicCP(220.5612,1423.4796,10.5859,3, -1,-1,-1,100.0);
CP2 = CreateDynamicCP(599.6351,1247.6184,11.7188,3, -1,-1,-1,100.0);
CP3 = CreateDynamicCP(14.6718,1549.8481,12.7672,3,-1,-1,-1,100.0);
}
and dont forget the callbacks
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == CP1)
{
SendClientMessage(playerid,-1," CP1");
}
if(checkpointid == CP2)
{
SendClientMessage(playerid,-1,"CP2");
}
if(checkpointid == CP3)
{
SendClientMessage(playerid,-1,"CP3");
}
}
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
if(checkpointid == CP1)
{
SendClientMessage(playerid,-1,"you left checkpoint CP1");
}
if(checkpointid == CP2)
{
SendClientMessage(playerid,-1,"you left checkpoint CP2");
}
if(checkpointid == CP3)
{
SendClientMessage(playerid,-1,"you left checkpoint CP3");
}
}