Jump to content
×
×
  • Create New...

CMD : /clignotantgauche & /clignotantdroit


Recommended Posts

Centre de Téléchargement

Télécharger ( Interne )

Bonjour,

 

Aujourd'hui je vous présente les commandes /clignotantdroit & /clignotantgauche aussi abréger en /cd & /cg

Car cela améliore la Conduire Role Play.

 

//----------------------------------[CLIGNOTANT:GAUCHE]----------------------------------------
if(strcmp(cmd, "/clignotantgauche", true) == 0 || strcmp(cmd, "/cg", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
           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) && IsPlayerInAnyVehicle(playerid) == 0)
           { //line 124
               SendClientMessage(playerid, COLOR_GRAD2, "Vous devez être dans un véhicule pour utiliser /clignotantgauche");
               return 1;
           }
           SendClientMessage(playerid, COLOR_WHITE, "Vous mettez votre clignotant gauche !");
           GetPlayerName(playerid, sendername, sizeof(sendername));
             format(string, sizeof(string), "** %s met son clignotant gauche..", sendername);
           ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
           printf("%s", string);
           }
       return 1;
   }
//----------------------------------[CLIGNOTANT:DROITE]----------------------------------------
   if(strcmp(cmd, "/clignotantdroit", true) == 0 || strcmp(cmd, "/cd", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
       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) && IsPlayerInAnyVehicle(playerid) == 0)
           { //line 124
               SendClientMessage(playerid, COLOR_GRAD2, "Vous devez être dans un véhicule pour utiliser /clignotantdroit");
               return 1;
           }
           SendClientMessage(playerid, COLOR_WHITE, "Vous mettez votre clignotant droit !");
           GetPlayerName(playerid, sendername, sizeof(sendername));
             format(string, sizeof(string), "* %s met son clignotant droit..", sendername);
           ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
           printf("%s", string);
           }
       return 1;
   }
 
Link to comment
  • 2 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.