30.08.2011, 14:59
Hi, try this:
(I guess 'value' is the string name)
I hope this works, let me know if there are any problems.
Jeffry
(I guess 'value' is the string name)
pawn Код:
if(!strcmp(name, "Online_Time"))
{
new tmpx[20], which;
for(new i=0; i<strlen(value); i++)
{
if(value[i] == ':')
{
if(which == 0) PlayerInfo[playerid][pOnlineHours] = strval(tmpx);
if(which == 1) PlayerInfo[playerid][pOnlineMinutes] = strval(tmpx);
format(tmpx, sizeof(tmpx), "");
which++;
}
else format(tmpx, sizeof(tmpx), "%s%c", tmpx, value[i]);
}
PlayerInfo[playerid][pOnlineSeconds] = strval(tmpx);
}
Jeffry