Quote:
Originally Posted by Maximun
PHP код:
///When the player spawn (OnPlayerSpawn)
SetTimerEx("ShowCP", 60000, false, "i", playerid);
//New
new CheckPoint[MAX_PLAYERS] = 0;
//Forward
forward ShowCP(playerid);
//Pulibc
public ShowCP(playerid)
{
if(CheckPoint[playerid] == 0)
{
SetPlayerCheckPoint(playerid, PosX, PosY, PosZ, 3.0); //CheckPoint 1
CheckPoint[playerid] = 1;
}
else if(CheckPoint[playerid] == 1)
{
SetPlayerCheckPoint(playerid, PosX, PosY, PosZ, 3.0); //CheckPoint 2
}
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(CheckPoint[playerid] == 1) //When the player enter on checkpoint 1
{
DisablePlayerCheckpoint(playerid);
SetTimerEx("ShowCP", 120000, false, "i", playerid);
}
return 1;
}
|
hey bro it didnt helped when i tested it. It doesnt created any cp