GTAOnline.net

San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: Nicolasmarosa le 25 Août 2011, 11:31:00

Titre: Probleme de script /ooc [URGENT]
Posté par: Nicolasmarosa le 25 Août 2011, 11:31:00
Bonjour a Tous ! Voila j'ai mis se code sur mon script mais dès que je fais compile/run |Pawn Compiler Library a césser de fonctionner| Voici mon code :

   if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
           if(gPlayerLogged[playerid] == 0)
           {
               SendClientMessage(playerid, COLOR_GREY, "   Vous n'etes pas encore connecter, /loggin !");
               return 1;
           }
         if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
         {
            SendClientMessage(playerid, COLOR_GRAD2, "  Le chat ooc a été desactivé par un admin !");
            return 1;
         }
         if(PlayerInfo[playerid][pMuted] == 1)
         {
            SendClientMessage(playerid, TEAM_CYAN_COLOR, "   Vous ne pouvez pas parlez, vous avez étais mutée !");
            return 1;
         }
         GetPlayerName(playerid, sendername, sizeof(sendername));
         new length = strlen(cmdtext);
         while ((idx < length) && (cmdtext[idx] <= ' '))
         {
            idx++;
         }
         new offset = idx;
         new result[64];
         while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
         {
            result[idx - offset] = cmdtext[idx];
            idx++;
         }
         result[idx - offset] = EOS;
         if(!strlen(result))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/o)oc [ooc chat]");
            return 1;
         }
         format(string, sizeof(string), "[OOC] %s: %s " , sendername, result);
         OOCOff(COLOR_OOC,string);
         printf("%s", string);
      }
      return 1;
   }
   if(strcmp(cmd, "/noooc", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
         if (PlayerInfo[playerid][pAdmin] >= 2 && (!noooc))
         {
            noooc = 1;
            BroadCast(COLOR_GRAD2, "   Le chat ooc a été desactivé par un Admin !");
         }
         else if (PlayerInfo[playerid][pAdmin] >= 2 && (noooc))
         {
            noooc = 0;
            BroadCast(COLOR_GRAD2, "   Le chat ooc a été desactivé par un Admin !");
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "   Vous n'êtes pas autoriser a utiliser cet commande !");
         }
      }
      return 1;
   }


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Et pouvez vous me passer le script /b et /r ? Je vous serais extremement reconnaisans !

Merci a tous !
Titre: Re : Probleme de script /ooc [URGENT]
Posté par: Ssk le 25 Août 2011, 12:00:32
http://www.gtaonline.fr/forums/index.php/topic,2.msg242595.html#new (http://www.gtaonline.fr/forums/index.php/topic,2.msg242595.html#new)
http://www.gtaonline.fr/forums/index.php?action=search;advanced (http://www.gtaonline.fr/forums/index.php?action=search;advanced)
http://forum.sa-mp.com/search.php (http://forum.sa-mp.com/search.php)


 :lock

Hum il manque un lien mais je trouve plus le règlement de la section pawn :s

EDIT: Le voila http://www.gtaonline.fr/forums/index.php/topic,12060.0.html (http://www.gtaonline.fr/forums/index.php/topic,12060.0.html)