[pomoc] govornica

Započeo sampzone, April 20, 2011, 13:49:50 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

mod koji ja koristim: ravens edit

problem: imam ja jedan cod za govornice i sad me zanima kako da napravim da kada zovjek zove sa govornice samo da vide lideri.....mozel pomoc pls

cod:
if(strcmp(cmd, "/govhelp", true) == 0)
    {
       if(PlayerToPoint(3.0,playerid,1087.8751,-1619.1050,13.6676) || PlayerToPoint(3.0,playerid,1734.7181,-1431.9506,13.5469) || PlayerToPoint(3.0,playerid,2080.3523,-1179.6931,23.8287) || PlayerToPoint(3.0,playerid,1961.3953,-1038.7916,24.3230) || PlayerToPoint(3.0,playerid,1537.9130,-1638.7678,13.5469) || PlayerToPoint(3.0,playerid,1181.7426,-1314.8357,13.5713) || PlayerToPoint(3.0,playerid,1170.5254,-933.3824,43.2795))
      {
          OnePlayAnim(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,0);
          SendClientMessage(playerid, COLOR_GREEN, "***** Govornica Pomoc ****");
            SendClientMessage(playerid, COLOR_GRAD2, " /broj [igracev ID]");
         SendClientMessage(playerid, COLOR_GRAD2, " /govservice");
          SendClientMessage(playerid, COLOR_GRAD2, " /call 911");
          SendClientMessage(playerid, COLOR_GREEN, "******************************");
      }
      else
      {
            SendClientMessage(playerid, COLOR_GRAD2, " *Nisi na govornici.");
      }
      return 1;
   }
   if(strcmp(cmd, "/govservice", true) == 0)
   {
        if(PlayerToPoint(3.0,playerid,1087.8751,-1619.1050,13.6676) || PlayerToPoint(3.0,playerid,1734.7181,-1431.9506,13.5469) || PlayerToPoint(3.0,playerid,2080.3523,-1179.6931,23.8287) || PlayerToPoint(3.0,playerid,1961.3953,-1038.7916,24.3230) || PlayerToPoint(3.0,playerid,1537.9130,-1638.7678,13.5469) || PlayerToPoint(3.0,playerid,1181.7426,-1314.8357,13.5713) || PlayerToPoint(3.0,playerid,1170.5254,-933.3824,43.2795))
      {
         new x_nr[256];
         x_nr = strtok(cmdtext, idx);
         if(!strlen(x_nr)) {
            SendClientMessage(playerid, COLOR_WHITE, "|__________________ Service Imena __________________|");
            SendClientMessage(playerid, COLOR_WHITE, "KORISTI: /govservice [ime]");
              SendClientMessage(playerid, COLOR_GREY, "Moguca imena: Taxi, Medic, Mechanic");
            SendClientMessage(playerid, COLOR_WHITE, "|________________________________________________|");
            return 1;
         }
          if(strcmp(x_nr,"taxi",true) == 0)
         {
             if(TaxiDrivers < 1)
              {
                  SendClientMessage(playerid, COLOR_GREY, "   Nema taxista na duznosti, pokusaj kasnije !");
                  return 1;
              }
              if(TransportDuty[playerid] > 0)
              {
                  SendClientMessage(playerid, COLOR_GREY, "   Nemozes nazvat taxistu sada !");
                  return 1;
              }
              GetPlayerName(playerid, sendername, sizeof(sendername));
             format(string, sizeof(string), "** %s treba taxi. (koristi /accept taxi za prihvatiti poziv)", sendername);
             SendFamilyMessage(10, TEAM_AZTECAS_COLOR, string);
             SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Nazvali ste taxistu, pricekajte.");
             TaxiCall = playerid;
             GivePlayerMoney(playerid, -10);
             PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
             return 1;
         }
         else if(strcmp(x_nr,"medic",true) == 0)
         {
             if(Medics < 1)
              {
                  SendClientMessage(playerid, COLOR_GREY, "   Nema bolnicara na duznosti, pokusaj kasnije !");
                  return 1;
              }
              GetPlayerName(playerid, sendername, sizeof(sendername));
             format(string, sizeof(string), "** %s treba Bolnicara. (koristi /accept medic za prihvatit poziv)", sendername);
             SendRadioMessage(4, TEAM_AZTECAS_COLOR, string);
             SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Nazvali ste bolnicara, pricekajte.");
             MedicCall = playerid;
             GivePlayerMoney(playerid, -10);
             PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
             return 1;
         }
         else if(strcmp(x_nr,"mechanic",true) == 0)
         {
             if(Mechanics < 1)
              {
                  SendClientMessage(playerid, COLOR_GREY, "   Nema mehanicara na duznosti, pokusaj kasnije !");
                  return 1;
              }
              GetPlayerName(playerid, sendername, sizeof(sendername));
             format(string, sizeof(string), "** %s treba Mehanicara. (koristenje /accept mechanic za prihvatiti poziv)", sendername);
             SendJobMessage(7, TEAM_AZTECAS_COLOR, string);
             SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Nazvali ste mehanicara. molimo pricekajte.");
             MechanicCall = playerid;
             GivePlayerMoney(playerid, -10);
             PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
             return 1;
         }
         else
         {
             SendClientMessage(playerid, COLOR_GREY, "   Nepoznato ime/nisi na govornici !");
             return 1;
         }
      }
      return 1;
   }
   if(strcmp(cmd, "/service", true) == 0)
   {
        if(IsPlayerConnected(playerid))
      {
         new x_nr[256];
         x_nr = strtok(cmdtext, idx);
         if(!strlen(x_nr)) {
            SendClientMessage(playerid, COLOR_WHITE, "|__________________ Service Imena __________________|");
            SendClientMessage(playerid, COLOR_WHITE, "KORISTI: /govservice [ime]");
              SendClientMessage(playerid, COLOR_GREY, "Moguca imena: Taxi, Medic, Mechanic");
            SendClientMessage(playerid, COLOR_WHITE, "|________________________________________________|");
            return 1;
         }
          if(strcmp(x_nr,"taxi",true) == 0)
         {
             if(TaxiDrivers < 1)
              {
                  SendClientMessage(playerid, COLOR_GREY, "   Nema taxista na duznosti, pokusaj kasnije !");
                  return 1;
              }
              if(TransportDuty[playerid] > 0)
              {
                  SendClientMessage(playerid, COLOR_GREY, "   Nemozes nazvat taxistu sada !");
                  return 1;
              }
              GetPlayerName(playerid, sendername, sizeof(sendername));
             format(string, sizeof(string), "** %s treba Taxi vozaca. (koristi /accept taxi za prihvatiti)", sendername);
             SendFamilyMessage(10, TEAM_AZTECAS_COLOR, string);
             SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Nazvali ste Taxi Driver, pricekajte.");
             TaxiCall = playerid;
             GivePlayerMoney(playerid, -10);
             PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
             return 1;
         }
         else if(strcmp(x_nr,"medic",true) == 0)
         {
             if(Medics < 1)
              {
                  SendClientMessage(playerid, COLOR_GREY, "   Nema bolnicara na duznosti, pokusaj kasnije !");
                  return 1;
              }
              GetPlayerName(playerid, sendername, sizeof(sendername));
             format(string, sizeof(string), "** %s potrebna mu je Medicina. (koristi /accept medic za prihvatit)", sendername);
             SendRadioMessage(4, TEAM_AZTECAS_COLOR, string);
             SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Nazvali ste Medic, pricekajte.");
             MedicCall = playerid;
             GivePlayerMoney(playerid, -10);
             PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
             return 1;
         }
         else if(strcmp(x_nr,"mechanic",true) == 0)
         {
             if(Mechanics < 1)
              {
                  SendClientMessage(playerid, COLOR_GREY, "   Nema mehanicara na duznosti, pokusaj kasnije !");
                  return 1;
              }
              GetPlayerName(playerid, sendername, sizeof(sendername));
             format(string, sizeof(string), "** %s treba Auto Mechanicara. (koristi /accept mechanic za prihvatiti)", sendername);
             SendJobMessage(7, TEAM_AZTECAS_COLOR, string);
             SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Nazvali ste Car Mechanic, pricekajte.");
             MechanicCall = playerid;
             GivePlayerMoney(playerid, -10);
             PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
             return 1;
         }
         else
         {
             SendClientMessage(playerid, COLOR_GREY, "   Nepoznato ime/nisi na govornici !");
             return 1;
         }
      }
      return 1;
   }
   if (strcmp(cmd, "/broj", true) == 0)
   {
      if(PlayerToPoint(3.0,playerid,1087.8751,-1619.1050,13.6676) || PlayerToPoint(3.0,playerid,1734.7181,-1431.9506,13.5469) || PlayerToPoint(3.0,playerid,2080.3523,-1179.6931,23.8287) || PlayerToPoint(3.0,playerid,1961.3953,-1038.7916,24.3230) || PlayerToPoint(3.0,playerid,1537.9130,-1638.7678,13.5469) || PlayerToPoint(3.0,playerid,1181.7426,-1314.8357,13.5713) || PlayerToPoint(3.0,playerid,1170.5254,-933.3824,43.2795))
       {
         if (PlayerInfo[playerid][pPhoneBook] == 0)
         {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
               SendClientMessage(playerid, COLOR_GRAD1, "KORISTI: /broj [igracev ID]");
               return 1;
            }
            //giveplayerid = strval(tmp);
            giveplayerid = ReturnUser(tmp);
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                  GetPlayerName(giveplayerid, sendername, sizeof(sendername));
                  format(string, 256, "Ime: %s, Ph: %d",sendername,PlayerInfo[giveplayerid][pPnumber]);
                  SendClientMessage(playerid, COLOR_GRAD1, string);
                  GivePlayerMoney(playerid, -10);
                  PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
               }
            }
            else
            {
               SendClientMessage(playerid, COLOR_GRAD1, "   Nema toga igraca !");
            }
         }
      }
      else
      {
            SendClientMessage(playerid, COLOR_GRAD1, "   Nisi na govornici !");
      }
      return 1;
   }

Ovo slobodno zvanje medical i ostalo mozete izbrisati samo da ostane da lideri vide pozive


Hvala za pomoc unaprijed