• 19 Avril 2025, 10:22:33


Auteur Sujet: [Résolu]Comment loader des position pour un [FS]Race  (Lu 1320 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne Street

  • The retour
  • *
  • Bandit
  • M Power <3
  • Messages: 273
    • Voir le profil
Salut a tous  :lmao

Je suis actuellement entrain de crée un [Fs]Race mon soucis c'est que je ne c'est absolument pas comment utiliser les donner enregistrer dans mon fichier pour mes checkpoint

Exemple je tape ma commande qui save Position X Y Z

est je voudrais que cette position ce load sur cette fonction

Citer
SetPlayerRaceCheckpoint(playerid,2, ici X, ici Y, ici Z, x+5, y+5, z, 5);

Merci d'avance a tous de m'aider a trouver la fonction adéquate

quelque bout de code pour voir ce que j'ai commencer

{
{
    new string[128];
    new Float:X, Float:Z, Float:Y, Float:Rotation; // Floats to save the pos in
    if (strcmp(cmdtext, "/test", true)==0)
    {
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, Rotation);
    new File:pos=fopen("positions.txt", io_append);
    format(string, 256, "X = %f\r\nY = %f\r\nZ = %f\r\n", X, Y, Z);
fwrite(pos, string);
    fclose(pos);

    return 1;
    }
}
if (strcmp(cmdtext, "/te", true)==0)
    {
    
    new string[128]; // Create the string to store the read text in
    new File:example = fopen("positions.txt", io_read); // Open the file
    fread(example, string);
    fclose(example);
    //SetPlayerRaceCheckpoint(playerid,2, %s, %s, %s, x+5, y+5, z, 5);
printf("%s",string); // Print what was read
return 1;
}
return 0;
}

A bientôt !  :cheers
« Modifié: 27 Mai 2012, 18:20:55 par Street »
Serveur en cour de création Crée Votre Monde
~~3n1 Stunt drift kill mode game En Cour~~
___________________________________________________________________
          
           [S k D ]P r o S T R E E T

Hors ligne Street

  • The retour
  • *
  • Bandit
  • M Power <3
  • Messages: 273
    • Voir le profil
Re : Comment loader des position pour un [FS]Race
« Réponse #1 le: 21 Mai 2012, 09:32:20 »
Up Please :(
Serveur en cour de création Crée Votre Monde
~~3n1 Stunt drift kill mode game En Cour~~
___________________________________________________________________
          
           [S k D ]P r o S T R E E T

Hors ligne Street

  • The retour
  • *
  • Bandit
  • M Power <3
  • Messages: 273
    • Voir le profil
Re : Comment loader des position pour un [FS]Race
« Réponse #2 le: 24 Mai 2012, 19:42:06 »
Up  :-[
Serveur en cour de création Crée Votre Monde
~~3n1 Stunt drift kill mode game En Cour~~
___________________________________________________________________
          
           [S k D ]P r o S T R E E T

Hors ligne Street

  • The retour
  • *
  • Bandit
  • M Power <3
  • Messages: 273
    • Voir le profil
Re : Comment loader des position pour un [FS]Race
« Réponse #3 le: 26 Mai 2012, 18:22:04 »
up :wall
Serveur en cour de création Crée Votre Monde
~~3n1 Stunt drift kill mode game En Cour~~
___________________________________________________________________
          
           [S k D ]P r o S T R E E T