Write something in variable and then read specific information.
#10

Look here:

Код:
new stats[401], stringstats[70];//those are the variables we will need in the stock
 	GetPlayerNetworkStats(playerid, stats, sizeof(stats));//this one will get the net stats
  	new len = strfind(stats, "Packetloss: ");//and this one will get the packetloss
   	new Float:packetloss = 0.0;//the float for the packetloss
    if(len != -1)
    {
    	strmid(stringstats, stats, len, strlen(stats));
     	new len2 = strfind(stringstats, "%");
      	if(len != -1)
       	{
        	strdel(stats, 0, strlen(stats));
         	strmid(stats, stringstats, len2-3, len2);
          	packetloss = floatstr(stats);
        }
    }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)