Advertisement
Guest User

Clignotant SA:MP

a guest
Jun 30th, 2012
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.65 KB | None | 0 0
  1.     if(strcmp(cmd, "/clignotantgauche", true) == 0 || strcmp(cmd, "/cg", true) == 0)
  2.     {
  3.         if(IsPlayerConnected(playerid))
  4.         {
  5.             new length = strlen(cmdtext);
  6.             while ((idx < length) && (cmdtext[idx] <= ' '))
  7.             {
  8.                 idx++;
  9.             }
  10.             new offset = idx;
  11.             new result[64];
  12.             while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  13.             {
  14.                 result[idx - offset] = cmdtext[idx];
  15.                 idx++;
  16.             }
  17.             result[idx - offset] = EOS;
  18.             if(!strlen(result) && IsPlayerInAnyVehicle(playerid) == 0)
  19.             { //line 124
  20.                 SendClientMessage(playerid, COLOR_GRAD2, "Vous devez être dans un véhicule pour utiliser /clignotantgauche");
  21.                 return 1;
  22.             }
  23.             SendClientMessage(playerid, COLOR_WHITE, "Vous mettez votre clignotant gauche !");
  24.             GetPlayerName(playerid, sendername, sizeof(sendername));
  25.               format(string, sizeof(string), "** %s met son clignotant gauche..", sendername);
  26.             ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  27.             printf("%s", string);
  28.             }
  29.         return 1;
  30.     }
  31. //----------------------------------[CLIGNOTANT:DROITE]----------------------------------------
  32.     if(strcmp(cmd, "/clignotantdroit", true) == 0 || strcmp(cmd, "/cd", true) == 0)
  33.     {
  34.         if(IsPlayerConnected(playerid))
  35.         {
  36.         new length = strlen(cmdtext);
  37.             while ((idx < length) && (cmdtext[idx] <= ' '))
  38.             {
  39.                 idx++;
  40.             }
  41.             new offset = idx;
  42.             new result[64];
  43.             while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  44.             {
  45.                 result[idx - offset] = cmdtext[idx];
  46.                 idx++;
  47.             }
  48.             result[idx - offset] = EOS;
  49.             if(!strlen(result) && IsPlayerInAnyVehicle(playerid) == 0)
  50.             { //line 124
  51.                 SendClientMessage(playerid, COLOR_GRAD2, "Vous devez être dans un véhicule pour utiliser /clignotantdroit");
  52.                 return 1;
  53.             }
  54.             SendClientMessage(playerid, COLOR_WHITE, "Vous mettez votre clignotant droit !");
  55.             GetPlayerName(playerid, sendername, sizeof(sendername));
  56.               format(string, sizeof(string), "* %s met son clignotant droit..", sendername);
  57.             ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  58.             printf("%s", string);
  59.             }
  60.         return 1;
  61.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement