Alors deja tu définie ton checkpoint.
public checkpoint(playerid)
{
if(PlayerToPoint(75.0, playerid, 1439.8232,-2504.5081,13.5547))
{
SetPlayerCheckpoint(playerid, 1439.8232,-2504.5081,13.5547, 4);
}
else
{
DisablePlayerCheckpoint(playerid);
}
}
Ensuite tu ajoute ce public, pour que ca marche:
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
Et ajoute les forward qui vont ;)
++
nikko