Posts: 534
Threads: 265
Joined: Jul 2014
Hi,
If i have written in variable that value:
YourName: Name5 | YourXP: 522
How can i load from that variable what is yourname value after :, and how much xp is written after: . And i can to for ex: setplayerscore
Posts: 534
Threads: 265
Joined: Jul 2014
You don't understand...
Imaginage i have a variable HELLO[ MAX_PLAYERS ][ 50 ];
format( HELLO[ playerid ], 49,"YourName: Name5 | YourXP: 522");
Then how get from this variable HELLO[ playerid ] a value of name and XP? that name is Name5 And XP is 522
Posts: 534
Threads: 265
Joined: Jul 2014
I don't ask how to format it right, i ask how get now from HELLO[ playerid ] variable a value of YourName And YourXP
Posts: 534
Threads: 265
Joined: Jul 2014
Posts: 534
Threads: 265
Joined: Jul 2014
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);
}
}