forward CPCheck();
public CPCheck()
{
//Creates CP
foreach(Player, i)
{
if(CPCreated[i] == 0)
{
for(new zone = 0; zone < sizeof(CPLocations); zone++)
{
if(IsPlayerInRangeOfPoint(i,50.0,CPLocations[zone][0],CPLocations[zone][1],CPLocations[zone][2]) && CPCreated[i] == 0)
{
if(InPrototypeVehicle[i] == 0)
{
if(InCP[i] == -1)
{
if(CPCreated[i] == 0)
{
SetPlayerCheckpoint(i,CPLocations[zone][0],CPLocations[zone][1],CPLocations[zone][2],3.0);
InCP[i] = zone;
CPCreated[i] = 1;
}
}
}
}
//Destroys the CP
if(!IsPlayerInRangeOfPoint(i,50.0,CPLocations[zone][0],CPLocations[zone][1],CPLocations[zone][2]) && CPCreated[i] == 1)
{
DisablePlayerCheckpoint(i);
InCP[i] = -1;
CPCreated[i] = 0;
}
}
}
}
return 1;
}
if(CPCreated[i] == 0)
Originally Posted by MadeMan
Remove the
pawn Код:
|
foreach(Player, i)
{
if(CPCreated[i] == 1)
{
for(new zone = 0; zone < sizeof(CPLocations); zone++)
{
if(InPrototypeVehicle[i] == 0)
{
if(!IsPlayerInRangeOfPoint(i,50.0,CPLocations[zone][0],CPLocations[zone][1],CPLocations[zone][2]))
{
if(InCP[i] != -1)
{
DisablePlayerCheckpoint(i);
InCP[i] = -1;
CPCreated[i] = 0;
SendClientMessage(i,_COLOR_RED,"spammtest");
}
}
}
}
}
}