[Pomoc] /w


Započeo [Bp]jovan, Januar 30, 2011, 01:47:39 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

kako da stavim kad neko oce da sapuce da mora da bude lvl 3 ??

------------------------------------------------------------------------------
Zahvaljujem Se Snich_Wolf-u Zato sto Mi je mnogo Pomogo oko Skriptanja...Snich Hvala brt <3 xD

cristiane


   if(strcmp(cmd, "/whisper", true) == 0 || strcmp(cmd, "/w", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
           if(gPlayerLogged[playerid] == 0)
           {
               SendClientMessage(playerid, COLOR_GREY, "   Niste se prijavili!");
               return 1;
           }
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: (/w)hisper [ID Igraca/Dio Imena] [whisper text]");
            return 1;
         }
         giveplayerid = ReturnUser(tmp);
         if (IsPlayerConnected(giveplayerid))
         {
             if(giveplayerid != INVALID_PLAYER_ID)
             {
                 new Float:x, Float:y, Float:z;
                    GetPlayerPos(giveplayerid,x,y,z);
                 if(PlayerToPoint(5, playerid, x, y, z))
                 {
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                  if(giveplayerid == playerid)
                  {
                     format(string, sizeof(string), "* %s brblja nesto sebi.", sendername);
                     ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  }
                  else
                  {
                      format(string, sizeof(string), "* %s sapce nesto %s-u", sendername, giveplayer);
                     ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  }
                  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, "Koriscenje: (/w)isper [ID Igraca/Dio Imena] [whisper text]");
                     return 1;
                  }
                  format(string, sizeof(string), "%s sapce: %s", sendername, (result));
                  SendClientMessage(giveplayerid, COLOR_YELLOW, string);
                  format(string, sizeof(string), "%s sapce: %s", sendername, (result));
                  SendClientMessage(playerid,  COLOR_YELLOW, string);
                  return 1;
               }
               else
               {
                   SendClientMessage(playerid,  COLOR_GREY, "    Igrac nije blizu vas !");
                   return 1;
               }
            }
         }
         else
         {
               format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
               SendClientMessage(playerid, COLOR_GRAD1, string);
         }
      }
      return 1;
   }

------------------------------------------------------------------------------
Zahvaljujem Se Snich_Wolf-u Zato sto Mi je mnogo Pomogo oko Skriptanja...Snich Hvala brt <3 xD

cristiane

Kod: c
  if(strcmp(cmd, "/whisper", true) == 0 || strcmp(cmd, "/w", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
           if(gPlayerLogged[playerid] == 0)
           {
               SendClientMessage(playerid, COLOR_GREY, "   Niste se prijavili!");
               return 1;
            }
            if(PlayerInfo[playerid][pLevel] >= 3)
	    {
		   SendClientMessage(playerid, COLOR_GREY, "Morate biti level 3 ili vise");
		    return 1;
	    }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
              SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: (/w)hisper [ID Igraca/Dio Imena] [whisper text]");
              return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if (IsPlayerConnected(giveplayerid))
            {
             if(giveplayerid != INVALID_PLAYER_ID)
             {
                 new Float:x, Float:y, Float:z;
                    GetPlayerPos(giveplayerid,x,y,z);
                 if(PlayerToPoint(5, playerid, x, y, z))
                 {
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                  if(giveplayerid == playerid)
                  {
                     format(string, sizeof(string), "* %s brblja nesto sebi.", sendername);
                     ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  }
                  else
                  {
                      format(string, sizeof(string), "* %s sapce nesto %s-u", sendername, giveplayer);
                     ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                  }
                  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, "Koriscenje: (/w)isper [ID Igraca/Dio Imena] [whisper text]");
                     return 1;
                  }
                  format(string, sizeof(string), "%s sapce: %s", sendername, (result));
                  SendClientMessage(giveplayerid, COLOR_YELLOW, string);
                  format(string, sizeof(string), "%s sapce: %s", sendername, (result));
                  SendClientMessage(playerid,  COLOR_YELLOW, string);
                  return 1;
               }
               else
               {
                   SendClientMessage(playerid,  COLOR_GREY, "    Igrac nije blizu vas !");
                   return 1;
               }
            }
         }
         else
         {
               format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
               SendClientMessage(playerid, COLOR_GRAD1, string);
         }
      }
      return 1;
   }

Stavio sam ti da mora da bude level 3 ili vise.
EDIT:Malo je slozi u skripti
Poslednja Izmena: Januar 30, 2011, 01:59:38 PRE PODNE od cristiane

Brate Radi Hvala puno.Ovako slicno i ja probo al imao error sad vidim de sam pogresio.hvala jos jednom

------------------------------------------------------------------------------
Zahvaljujem Se Snich_Wolf-u Zato sto Mi je mnogo Pomogo oko Skriptanja...Snich Hvala brt <3 xD