ezt használtam és nem jelenik meg a chekpoint
new CurrentCP[MAX_PLAYERS];
forward CP_Update();
OnGameModeInit();.
SetTimer(\"CP_Update\",250,1);
#define MAX_POINTS 1
#define bank 0
new Float:Checkpoints[MAX_POINTS][4] =
{
{2001.3132,1538.6012,13.5859,4.0}
};
new Float:CheckpointCoords[MAX_POINTS][4] =
{
{2001.3132,1538.6012,13.5859,4.0}
};
new CheckpointArray[MAX_POINTS] =
{
bank
};
public CP_Update()
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
for(new j = 0; j < MAX_POINTS; j ++)
{
if(IsPlayerInCheckpointArea(i,CheckpointCoords[j]))
{
if(CurrentCP != j)
{
DisablePlayerCheckpoint(i);
SetPlayerCheckpoint(i,Checkpoints[j][0],Checkpoints[j][1],Checkpoints[j][2],Checkpoints[j][3]);
CurrentCP = j;
}
}
else
{
if(CurrentCP == j)
{
DisablePlayerCheckpoint(i);
CurrentCP = -1;
}
}
}
}
}
stock CheckpointID(playerid)
return CheckpointArray[CurrentCP[playerid]];
stock IsPlayerInCheckpointArea(playerid, Float:data[4])
{
new Float:c_x, Float:c_y, Float:c_z;
GetPlayerPos(playerid, c_x, c_y, c_z);
if(c_x >= data[0] && c_x <= data[2] && c_y >= data[1] && c_y <= data[3]) {
return 1;
}
return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
switch(CheckpointID(playerid))
{
case bank: {
SendClientMessage(playerid, COLOR_YELLOW, \"You are at an ATM. To store money use \'/bank amount\', to withdraw\");
SendClientMessage(playerid, COLOR_YELLOW, \"money use \'/withdraw amount\', and \'/balance\' to see your balance.\");
}
}
}