new CP_Train;
CP_Train = CreateDynamicCP(-1972.4688,117.8655,27.6940,2,-1,-1,-1,30.0);
public OnPlayerLeaveDynamicCP(playerid , checkpointid)
{
if(checkpointid == CP_Train)
{
SendClientMessage(playerid,COLOR_ERROR,"Test");
if(RobbingTrain[playerid] >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"Failed.");
RobbingTrain[playerid] =0;
return 1;
}
return 1;
}
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 15.0,-1972.4688,117.8655,27.6940)) {
blahblah
}
Is OnPlayerLeaveCheckpoint (SAMP Callback) called when you exit it/any other CP?
If yes, it should be a streamer problem (eventually a return 0 in some other script?) |
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
%How to fix it?
if(checkpointid == CheckPoint1 || CheckPoint2)
{
SendClientMessage(playerid,0xF5551FFF,"Test");
return 1;
}
if(checkpointid == CheckPoint1)
{
SendClientMessage(playerid,0xF5551FFF,"Test");
return 1;
}
if(checkpointid == CheckPoint2)
{
SendClientMessage(playerid,0xF5551FFF,"Test");
return 1;
}
% OR
if(checkpointid == CheckPoint1 || checkpointid == CheckPoint2)
{
SendClientMessage(playerid,0xF5551FFF,"Test");
return 1;
}