GTAOnline.net

San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: Eloctro le 08 Juin 2008, 15:44:06

Titre: Checkpoint invisible carte
Posté par: Eloctro le 08 Juin 2008, 15:44:06
Salut ,
J'ai creer un checkpoint mais je voudrait qu'il soit invisible sur la carte merci .
Titre: Re : Checkpoint invisible carte
Posté par: [StAfF]MaN le 08 Juin 2008, 16:39:03
Pas possible, les chechpoint sont pas modifiables mis a part leurs taille ....
Titre: Re : Checkpoint invisible carte
Posté par: Nikko™ le 08 Juin 2008, 17:35:52
Si

Cest tout a fait possible avec un Playertopoint et un diseable checkpoint for player, je lai fait pour mon serveur.

++
nikko
Titre: Re : Checkpoint invisible carte
Posté par: Eloctro le 08 Juin 2008, 18:03:39
Vous pouvez me donnez un exemple
Titre: Re : Checkpoint invisible carte
Posté par: Nikko™ le 08 Juin 2008, 18:07:33
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
Titre: Re : Checkpoint invisible carte
Posté par: Eloctro le 11 Juin 2008, 20:05:37
Tu peut me mettre une phrase pour me repéré genre checkpoint atteint ses pour savoire ou mettre les infos
Titre: Re : Checkpoint invisible carte
Posté par: Nikko™ le 12 Juin 2008, 17:29:38
jvais pas tout te faire, apres faut faire un oneplayerentercheckpoint

++
nikko