Jump to content
  • 0

Am o problema cam mare..


Question

Posted

Aceasta este comanda :

[pawn] if(strcmp(cmd, "/etilotest", true) == 0

    {

        if(IsPlayerConnected(playerid))

        {

            if (IsACop(playerid))

            {

            tmp = strtok(cmdtext, idx);

            if(!strlen(tmp))

                  {

              SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /etilotest [playerid/PartOfName]");

              return 1;

                  }

                    giveplayerid = ReturnUser(tmp);

                    new level = GetPlayerDrunkLevel(giveplayerid);

                    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

                    if(IsPlayerConnected(giveplayerid))

                      {

                        if(giveplayerid != INVALID_PLAYER_ID)

                        {

                      if(GetDistanceBetweenPlayers(playerid,giveplayerid) < 3)

                          {

                            if(level > 600)

                                {

                            format(string, sizeof(string), "* %s grabs their breathalyzer and puts the tube into %s's mouth.", sendername ,giveplayer);

                            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

                              SendClientMessage(playerid, COLOR_LIGHTBLUE, "** Breathalyzer Result: Intoxicated **");

                              GameTextForPlayer(playerid,"~w~Acest player este~n~~r~beat!", 8000, 1);

      return 1;

                                }

                              else

                                    {

                                format(string, sizeof(string), "* %s grabs their breathalyzer and puts the tube into %s's mouth.", sendername ,giveplayer);

                              ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

                              SendClientMessage(playerid, COLOR_LIGHTBLUE, "** Breathalyzer Result: Not Intoxicated **");

                              GameTextForPlayer(playerid,"~w~Acest player nu este~n~~r~beat!", 8000, 1);

                              return 1;

                                }

                                }

                            }

                            }

                          else

                    {

                      SendClientMessage(playerid, COLOR_GRAD1, "  Acest player este offline !");

                          }

                        }

                      else

                            {

                    SendClientMessage(playerid, COLOR_GRAD1, "  Trebuie sa fii politist pentru a folosi comanda! (Cops Only)");

                        }

                      }

                    return 1;

                    }[/pawn]

Si imi da eroarea asta :

[pawn]D:\GM\gamemodes\GFACTOR.pwn(31403) : error 029: invalid expression, assumed zero[/pawn]

Si linia 31403 este acest semn :

[pawn]{[/pawn]

Reply : [Rezolvat]

1 answer to this question

Recommended Posts

Posted

Incearca asta:

    if(strcmp(cmd, "/etilotest", true) == 0
    {
         if(IsPlayerConnected(playerid))
         {
             if (IsACop(playerid))
             {
		 tmp = strtok(cmdtext, idx);
                 if(!strlen(tmp))
             {
                 SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /etilotest [playerid/PartOfName]");
                 return 1;
             }
             giveplayerid = ReturnUser(tmp);
             new level = GetPlayerDrunkLevel(giveplayerid);
             GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
             if(IsPlayerConnected(giveplayerid))
             {
                 if(giveplayerid != INVALID_PLAYER_ID)
                 {
                     if(GetDistanceBetweenPlayers(playerid,giveplayerid) < 3)
                     {
                         if(level > 600)
                         {
                             format(string, sizeof(string), "* %s grabs their breathalyzer and puts the tube into %s's mouth.", sendername ,giveplayer);
                             ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                             SendClientMessage(playerid, COLOR_LIGHTBLUE, "** Breathalyzer Result: Intoxicated **");
                             GameTextForPlayer(playerid,"~w~Acest player este~n~~r~beat!", 8000, 1);
                             return 1;
                         }
                         else
                         {
                             format(string, sizeof(string), "* %s grabs their breathalyzer and puts the tube into %s's mouth.", sendername ,giveplayer);
                             ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                             SendClientMessage(playerid, COLOR_LIGHTBLUE, "** Breathalyzer Result: Not Intoxicated **");
                             GameTextForPlayer(playerid,"~w~Acest player nu este~n~~r~beat!", 8000, 1);
                             return 1;
                             }
                         }
                     }
                 }
                 else
                 {
                     SendClientMessage(playerid, COLOR_GRAD1, "   Acest player este offline !");
                 }
             }
             else
             {
                 SendClientMessage(playerid, COLOR_GRAD1, "   Trebuie sa fii politist pentru a folosi comanda! (Cops Only)");
             }
         }
         return 1;
     }

LISTA - GAMEMODE-URI SA-MP - Le gasiti pe toate aici: http://twiriock.com/3MGP

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

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. For more details you can also review our Terms of Use and Privacy Policy.