• 18 Avril 2025, 10:30:52


Auteur Sujet: Soucis sur une animation  (Lu 1743 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne Necromancer

  • *
  • Nouveau
  • Messages: 11
    • Voir le profil
Soucis sur une animation
« le: 25 Avril 2014, 13:46:06 »
Salut,

j'ai un petit soucis, sur un système de /chercher, j'ai mis l'animation " ApplyAnimation(playerid, "BOMBER","BOM_Plant",4.1,0,1,1,1,1); " pour qui se baisse au moment du /chercher, mais elle ne se déclenche pas.

bon je vous met pas toute la commande /chercher sinon ça sera trop long, je vous en met une partit.

Citer
   if(strcmp(cmd,"/chercher", true) == 0)
   {
      if(IsPlayerConnected(playerid))
      {
         if(PlayerInfo[playerid][pHumain] == 0)
         {
             if(PlayerInfo[playerid][pForce] != PlayerInfo[playerid][pMforce])
             {
               if(restric[playerid] == 0)
               {
                   if(PlayerToPoint(50.0, playerid, -1936.7203,648.8932,46.5625))
                   {
                          new rand;
                          rand = random(10);
                          switch(rand)
                          {
                              case 0,1:
                              {
                                 format(string, sizeof(string),"%s Ramasse un antidote",Name);
                                 PlayerInfo[playerid][pForce] += 1;
                                 ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                                 PlayerInfo[playerid][pAntidote] += 1;
                                 restric[playerid] = 1;
                                 ApplyAnimation(playerid, "BOMBER","BOM_Plant",4.1,0,1,1,1,1);
                                 SetTimerEx("restrit", 20000, 0, "d", playerid);
                                 return 1;
                              }
                              case 2,3,4,5,6,7,8,9:
                              {
                                 format(string, sizeof(string),"%s Cherche partout en panique mais ne trouve rien",Name);
                                 ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                                 SetTimerEx("restrit", 20000, 0, "d", playerid);
                                 restric[playerid] = 1;
                                 ApplyAnimation(playerid, "BOMBER","BOM_Plant",4.1,0,1,1,1,1);
                                 return 1;
                              }
                          }
                   }
                   else if(PlayerToPoint(20.0, playerid, -2183.5596,991.7842,80.0000))
                   {
                       new rand;
                       rand = random(6);
                       switch(rand)
                       {
                           case 0, 1:
                           {
                              format(string, sizeof(string),"%s Ramasse une Radio",Name);
                              PlayerInfo[playerid][pForce] += 1;
                              ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                              PlayerInfo[playerid][Radio] += 1;
                              restric[playerid] = 1;
                              ApplyAnimation(playerid, "BOMBER","BOM_Plant",4.1,0,1,1,1,1);
                              SetTimerEx("restrit", 20000, 0, "d", playerid);
                              return 1;
                           }
                           case 2,3,4,5:
                           {
                              format(string, sizeof(string),"%s Cherche partout en panique mais ne trouve rien",Name);
                              ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                              SetTimerEx("restrit", 20000, 0, "d", playerid);
                              restric[playerid] = 1;
                              ApplyAnimation(playerid, "BOMBER","BOM_Plant",4.1,0,1,1,1,1);
                              return 1;
                           }
                       }
                   }
« Modifié: 01 Mai 2014, 13:48:47 par Ssk »

Hors ligne Ssk

  • *
  • Lulu's Stunt - Le serveur stunt de Lulu !
  • Messages: 8154
    • Voir le profil
Re : Soucis sur une animation
« Réponse #1 le: 25 Avril 2014, 13:59:48 »
Il faut que tu précharge les animations, met ce code dans ton OnPlayerSpawn

Code: (pawn) [Sélectionner]
ApplyAnimation(playerid, "BOMBER", "null", 0.0, 0, 0, 0, 0, 0);



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

Hors ligne Necromancer

  • *
  • Nouveau
  • Messages: 11
    • Voir le profil
Re : Soucis sur une animation
« Réponse #2 le: 25 Avril 2014, 14:07:07 »
Salut,

merci pour ta réponse,
effectivement c'était tout con en faite, ça fonctionne merci :)