• 07 Juin 2026, 11:26:27


Auteur Sujet: Problème  (Lu 1983 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne Paradize

  • Scripteur
  • *
  • Tueur
  • Scripteur de Paradize Rôle Play
  • Messages: 67
    • Voir le profil
    • Paradize Rôle Play
Problème
« le: 24 Décembre 2009, 06:40:13 »
Euh.......... ::)

J'ai un petit soucis...où que j'aille, je peux retirer de l'argent...

Sa me met :

"Vous n'êtes pas à la banque"
"Vous avez retiré 10$ de votre compte bancaire"



Et je peux retirer partout..

Est-ce que sa vient de mes positions des distributeur ? Les voici :

Citer
public IsAtATM(playerid)
{
    if(IsPlayerConnected(playerid))
   {
      if(PlayerToPoint(4.0,playerid,2054.6145,-1898.2306,13.5538) || PlayerToPoint(4.0,playerid,2061.0833,-1898.6965,13.5538))
      {
          return 1;
      }
      else if(PlayerToPoint(4.0,playerid,1843.9344,-1861.1429,13.3828) || PlayerToPoint(10.0,playerid,1739.2867,-1862.8655,13.5758))
      {
          return 1;
      }
   }
   return 0;
}
Scripteur de Paradize Rôle Play !

Hors ligne cristab

  • *
  • Messages: 8379
    • Voir le profil
Re : Problème
« Réponse #1 le: 24 Décembre 2009, 07:54:05 »
public IsAtATM(playerid)
{
  if(IsPlayerConnected(playerid))
   {
      if(PlayerToPoint(4.0,playerid,2054.6145,-1898.2306,13.5538) || PlayerToPoint(4.0,playerid,2061.0833,-1898.6965,13.5538)||PlayerToPoint(4.0,playerid,1843.9344,-1861.1429,13.3828) || PlayerToPoint(10.0,playerid,1739.2867,-1862.8655,13.5758))
      {
        return 1;
      }
      else
      {
        return 0;
      }
   }
}
pas d'aide en PM, vous êtes sur un forum est il me semble que vous êtes la pour avoir de l'aide donc pourquoi MP une seul personne qui ne vous répondra pas alors qu'il y a plein de membre ici

Hors ligne Paradize

  • Scripteur
  • *
  • Tueur
  • Scripteur de Paradize Rôle Play
  • Messages: 67
    • Voir le profil
    • Paradize Rôle Play
Re : Problème
« Réponse #2 le: 24 Décembre 2009, 10:14:26 »
Citer
D:\_FR__G~1\GAMEMO~1\Paradize.pwn(1967) : warning 209: function "IsAtATM" should return a value
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase

Header size:           6096 bytes
Code size:          1108820 bytes
Data size:          4472896 bytes
Stack/heap size:      16384 bytes; estimated max. usage=5103 cells (20412 bytes)
Total requirements: 5604196 bytes

1 Warning.

 :-[
Scripteur de Paradize Rôle Play !

Hors ligne cristab

  • *
  • Messages: 8379
    • Voir le profil
Re : Problème
« Réponse #3 le: 24 Décembre 2009, 10:28:38 »
public IsAtATM(playerid)
{
  if(IsPlayerConnected(playerid))
   {
      if(PlayerToPoint(4.0,playerid,2054.6145,-1898.2306,13.5538) || PlayerToPoint(4.0,playerid,2061.0833,-1898.6965,13.5538)||PlayerToPoint(4.0,playerid,1843.9344,-1861.1429,13.3828) || PlayerToPoint(10.0,playerid,1739.2867,-1862.8655,13.5758))
      {
        return 1;
      }
      else
      {
        return 0;
      }
   }
   return 1;
}
pas d'aide en PM, vous êtes sur un forum est il me semble que vous êtes la pour avoir de l'aide donc pourquoi MP une seul personne qui ne vous répondra pas alors qu'il y a plein de membre ici

Hors ligne Paradize

  • Scripteur
  • *
  • Tueur
  • Scripteur de Paradize Rôle Play
  • Messages: 67
    • Voir le profil
    • Paradize Rôle Play
Re : Problème
« Réponse #4 le: 24 Décembre 2009, 11:16:52 »
Sa marche toujours pas

Je peux retirer de l'argent mais sa m'affiche toujours çà :

"Vous n'êtes pas à la banque"
"Vous avez retiré 10$ de votre compte bancaire"

Je vous montre mon /retirer :

Citer
//----------------------------------[Banque Système]-----------------------------------------------
    if(strcmp(cmd, "/retirer", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (!PlayerToPoint(100, playerid,2308.9287,-13.2520,26.7422))
            {
                SendClientMessage(playerid, COLOR_GREY, " Tu n'es pas à la banque !");
            }
            else if(!IsAtATM(playerid))
            {
                SendClientMessage(playerid, COLOR_YELLOW," Vous n'êtes prés d'un distributeur !");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
           {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /retirer [montant]");
            format(string, sizeof(string), "  Vous avez $%d sur votre compte.", PlayerInfo[playerid][pAccount]);
            SendClientMessage(playerid, COLOR_GRAD3, string);
            return 1;
         }
          new cashdeposit = strval(tmp);
          if(!strlen(tmp))
          {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /retirer [montant]");
            format(string, sizeof(string), "  Vous avez $%d sur votre compte.", PlayerInfo[playerid][pAccount]);
            SendClientMessage(playerid, COLOR_GRAD3, string);
            return 1;
         }
         if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
         {
            SendClientMessage(playerid, COLOR_GRAD2, " Vous n'avez pas tant d'argent !");
            return 1;
         }
          ConsumingMoney[playerid] = 1;
         GivePlayerMoney(playerid,cashdeposit);
         PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
         format(string, sizeof(string), "  Vous avez retirer $%d de votre compte, Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
         SendClientMessage(playerid, COLOR_YELLOW, string);
         return 1;
      }
      return 1;
   }

Position distributeurs :

Citer
public IsAtATM(playerid)
{
  if(IsPlayerConnected(playerid))
   {
      if(PlayerToPoint(4.0,playerid,2054.6145,-1898.2306,13.5538) || PlayerToPoint(4.0,playerid,2061.0833,-1898.6965,13.5538)||PlayerToPoint(4.0,playerid,1843.9344,-1861.1429,13.3828) || PlayerToPoint(10.0,playerid,1739.2867,-1862.8655,13.5758))
      {
        return 1;
      }
      else
      {
        return 0;
      }
   }
  return 1;
}
Scripteur de Paradize Rôle Play !

Hors ligne Lychaos

  • *
  • Tueur en série
  • Messages: 165
    • Voir le profil
Re : Problème
« Réponse #5 le: 24 Décembre 2009, 12:42:14 »
Voila, avec le code que je t'ai envoyer par MSN, normalemetn sa devrait aller, il te suffit de changer les coordonner des coordonné de tes ATM, et normalement tout iras bien ;)

Hors ligne Ssk

  • *
  • Lulu's Stunt - Le serveur stunt de Lulu !
  • Messages: 8154
    • Voir le profil
Re : Problème
« Réponse #6 le: 24 Décembre 2009, 13:11:40 »
ca :

            if (!PlayerToPoint(100, playerid,2308.9287,-13.2520,26.7422))
            {
                SendClientMessage(playerid, COLOR_GREY, " Tu n'es pas à la banque !");
            }

remplace par ca:

            if (!PlayerToPoint(100, playerid,2308.9287,-13.2520,26.7422))
            {
                return SendClientMessage(playerid, COLOR_GREY, " Tu n'es pas à la banque !");

            }



Derrière tout programme se cache un programmeur, je considère le monde comme un programme.
Mon blog

Hors ligne Paradize

  • Scripteur
  • *
  • Tueur
  • Scripteur de Paradize Rôle Play
  • Messages: 67
    • Voir le profil
    • Paradize Rôle Play
Re : Problème
« Réponse #7 le: 24 Décembre 2009, 13:27:58 »
D'accord, je testerais ce que vous me dites après..car j'ai essayé avec une autre méthode :

Citer
//-------------------------------[Distributeurs]------------------------------------
    if(strcmp(cmd, "/retireratm", true) == 0 || strcmp(cmd, "/ratm", true) == 0)
    {
          if(IsPlayerConnected(playerid))
          {
              if(!PlayerToPoint(3, playerid, 2054.6145,-1898.2306,13.5538) && !PlayerToPoint(3, playerid, 2061.0833,-1898.6965,13.5538))
              {
                  SendClientMessage(playerid, COLOR_GREY, "Vous n'êtes pas au Mistercash!");
                  return 1;
              }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
               SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /retireratm [montant]");
               format(string, sizeof(string), "Vous avez $%d sur votre compte bancaire.", PlayerInfo[playerid][pAccount]);
               SendClientMessage(playerid, COLOR_GRAD3, string);
               return 1;
            }
            new cashdeposit = strval(tmp);
            if(!strlen(tmp))
            {
               SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /retireratm [montant]");
               format(string, sizeof(string), "  Vous avez $%d sur votre compte bancaire.", PlayerInfo[playerid][pAccount]);
               SendClientMessage(playerid, COLOR_GRAD3, string);
               return 1;
            }
            if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
            {
               SendClientMessage(playerid, COLOR_GRAD2, "Vous n'avez pas cette somme sur votre compte bancaire!");
               return 1;
            }


            if (cashdeposit > 5000)
            {
               SendClientMessage(playerid, COLOR_GRAD2, "Vous ne pouvez pas retirer plus de $5000!");
               return 1;
            }

             ConsumingMoney[playerid] = 1;
            SafeGivePlayerMoney(playerid,-cashdeposit);
            PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
            format(string, sizeof(string), "Vous avez retiré $%d de votre compte, Il vous reste: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
            SendClientMessage(playerid, COLOR_YELLOW, string);
            //PlayerInfo[playerid][pJobTimer] = 12;

               GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
             format(string, sizeof(string), "  ID(%d) -%s a retiré %d de son compte bancaire.", playerid,giveplayer,cashdeposit);
            ABroadCast(COLOR_YELLOW,string,1);
            PayLog(string);
            return 1;
         }
         return 1;
      }

   if(strcmp(cmd, "/deposeratm", true) == 0 || strcmp(cmd, "/datm", true) == 0)
      {
         if(IsPlayerConnected(playerid))
           {
              if(!PlayerToPoint(3, playerid, -32.276363,-57.995586,1003.139953) && !PlayerToPoint(3, playerid, 374.718902,167.128982,1007.987304))
              {
                  SendClientMessage(playerid, COLOR_GREY, "Vous n'êtes pas au Mistercash!");
                  return 1;
              }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
               SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /deposeratm [montant]");
               format(string, sizeof(string), "Vous avez $%d sur votre compte bancaire.", PlayerInfo[playerid][pAccount]);
               SendClientMessage(playerid, COLOR_GRAD3, string);
               return 1;
            }
            new cashdeposit = strval(tmp);
            if(!strlen(tmp))
            {
               SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /deposeratm [montant]");
               format(string, sizeof(string), "Vous avez $%d sur votre compte bancaire.", PlayerInfo[playerid][pAccount]);
               SendClientMessage(playerid, COLOR_GRAD3, string);
               return 1;
            }
            if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
            {
               SendClientMessage(playerid, COLOR_GRAD2, "Vous n'avez pas cette somme sur vous");
               return 1;
            }

            if (cashdeposit > 100000)
            {
               SendClientMessage(playerid, COLOR_GRAD2, "Vous ne pouvez pas deposer plus de $100000!");
               return 1;
            }

            SafeGivePlayerMoney(playerid,-cashdeposit);
            new curfunds = PlayerInfo[playerid][pAccount];
            PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount];
            SendClientMessage(playerid, COLOR_WHITE, "|___________ Extrait de Compte ___________|");
            format(string, sizeof(string), "  Argent sur le compte avant depôt: $%d", curfunds);
            SendClientMessage(playerid, COLOR_GRAD2, string);
            format(string, sizeof(string), "  Somme déposée: $%d",cashdeposit);
            SendClientMessage(playerid, COLOR_GRAD4, string);
            SendClientMessage(playerid, COLOR_GRAD6, "|------------------------------------------|");
            format(string, sizeof(string), "  Argent sur le compte après dépôt: $%d", PlayerInfo[playerid][pAccount]);
            SendClientMessage(playerid, COLOR_WHITE, string);
            //PlayerInfo[playerid][pJobTimer] = 12;

               GetPlayerName(playerid, giveplayer, sizeof(giveplayer));

             format(string, sizeof(string), "  ID(%d) -%s à déposé %d sur son compte bancaire.", playerid,giveplayer,cashdeposit);
            ABroadCast(COLOR_YELLOW,string,1);
            PayLog(string);

            return 1;
         }
         return 1;
      }

Mais j'ai deux erreurs à la compilation :

Citer
D:\_FR__G~1\GAMEMO~1\Paradize.pwn(8145) : error 017: undefined symbol "SafeGivePlayerMoney"
D:\_FR__G~1\GAMEMO~1\Paradize.pwn(8197) : error 017: undefined symbol "SafeGivePlayerMoney"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

 :-[
Scripteur de Paradize Rôle Play !

Hors ligne The Bird

  • *
  • Tueur en série
  • Messages: 110
    • Voir le profil
Re : Problème
« Réponse #8 le: 24 Décembre 2009, 13:30:46 »
Il s'agit du GivePlayerMoney de l'anti cheat de Seif ( SA-MP Forum )

Remplace

SeifGivePlayerMoney
par

GivePlayerMoney

Hors ligne Paradize

  • Scripteur
  • *
  • Tueur
  • Scripteur de Paradize Rôle Play
  • Messages: 67
    • Voir le profil
    • Paradize Rôle Play
Re : Problème
« Réponse #9 le: 24 Décembre 2009, 13:41:29 »
Niquel merci  :), plus qu'à régler le PlayerToPoint et sa sera parfait..

Par contre, vous pensez que c'est mieux d'opter pour le /retirer ou d'opter pour /retireratm ?

A vos avis... :-[
Scripteur de Paradize Rôle Play !

Hors ligne ghm94

  • *
  • Grand Banditisme
  • Messages: 886
    • Voir le profil
Re : Problème
« Réponse #10 le: 24 Décembre 2009, 13:51:13 »
Bah le plus logique serait de mettre /retirer.

Hors ligne Paradize

  • Scripteur
  • *
  • Tueur
  • Scripteur de Paradize Rôle Play
  • Messages: 67
    • Voir le profil
    • Paradize Rôle Play
Re : Problème
« Réponse #11 le: 24 Décembre 2009, 14:10:47 »
J'essaye avec le /retirer mais j'ai deux erreurs  :-[ :

Citer
//----------------------------------[Banque Système]-----------------------------------------------
    if(strcmp(cmd, "/retirer", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (!PlayerToPoint(100, playerid,2308.9287,-13.2520,26.7422))
            {
               return SendClientMessage(playerid, COLOR_GREY, " Tu n'es pas à la banque !");

             }
             else if(!IsAtATM(playerid))
             {
                SendClientMessage(playerid, COLOR_YELLOW," Vous n'êtes prés d'un distributeur !");
                return 1;
             }
             tmp = strtok(cmdtext, idx);
             if(!strlen(tmp))
             {
               SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /retirer [montant]");
               format(string, sizeof(string), "  Vous avez $%d sur votre compte.", PlayerInfo[playerid][pAccount]);
               SendClientMessage(playerid, COLOR_GRAD3, string);
               return 1;
            }
            new cashdeposit = strval(tmp);
            if(!strlen(tmp))
            {
               SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /retirer [montant]");
               format(string, sizeof(string), "  Vous avez $%d sur votre compte.", PlayerInfo[playerid][pAccount]);
               SendClientMessage(playerid, COLOR_GRAD3, string);
               return 1;
            }
            if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
            {
               SendClientMessage(playerid, COLOR_GRAD2, " Vous n'avez pas tant d'argent !");
               return 1;
            }
            ConsumingMoney[playerid] = 1;
            GivePlayerMoney(playerid,cashdeposit);
            PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
            format(string, sizeof(string), "  Vous avez retirer $%d de votre compte, Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
            SendClientMessage(playerid, COLOR_YELLOW, string);
            return 1;
         }
        return 1;
    }
Scripteur de Paradize Rôle Play !

Hors ligne ghm94

  • *
  • Grand Banditisme
  • Messages: 886
    • Voir le profil
Re : Problème
« Réponse #12 le: 24 Décembre 2009, 14:11:51 »
C'est quoi les erreurs ?

Hors ligne Paradize

  • Scripteur
  • *
  • Tueur
  • Scripteur de Paradize Rôle Play
  • Messages: 67
    • Voir le profil
    • Paradize Rôle Play
Re : Problème
« Réponse #13 le: 24 Décembre 2009, 14:21:14 »
Merde, j'ai oublié les erreurs  ;D; désolé :

Citer
D:\_FR__G~1\GAMEMO~1\Paradize.pwn(10406) : warning 217: loose indentation
D:\_FR__G~1\GAMEMO~1\Paradize.pwn(10414) : warning 217: loose indentation
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase

Header size:           6096 bytes
Code size:          1108676 bytes
Data size:          4472896 bytes
Stack/heap size:      16384 bytes; estimated max. usage=5103 cells (20412 bytes)
Total requirements: 5604052 bytes

2 Warnings.
Scripteur de Paradize Rôle Play !

Hors ligne ghm94

  • *
  • Grand Banditisme
  • Messages: 886
    • Voir le profil
Re : Problème
« Réponse #14 le: 24 Décembre 2009, 14:35:03 »
Ah sa se ne sont pas des erreurs mais warning. La sa te prévient juste qu'une partie de ton code est mal indenter (ou mal aligner ) mais sa ne change rien une fois le serveur lancer.