25.01.2015, 16:52
PHP код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(cpenterable[playerid])
{
SetTimeEx("CPResetTimer", 3000, "i", playerid);
cpenterable[playerid]=false;
if(checkpointid == h[1])//Enter
{
SetPlayerPos(playerid, 238.727615, 138.634033, 1003.023437);
SetPlayerFacingAngle(playerid, 0);
SetPlayerInterior(playerid, 3);
}
if(checkpointid == h[2]) //Exit
{
SetPlayerPos(playerid, 2287.032958, 2432.367187, 10.820312);
SetPlayerFacingAngle(playerid, 0);
SetPlayerInterior(playerid, 0);
}
}
return 1;
}
forward CPReset(playerid);
public CPReset(playerid)
{
cpenterable[playerid]=true;
}