PDA

View Full Version : player stats alive time not saving


sscarface
18/02/2013, 04:54 PM
Fixed

austin070
18/02/2013, 04:58 PM
You'd have to write it to a file.

sscarface
18/02/2013, 05:03 PM
You'd have to write it to a file.

what u mean?

Glad2BeHere
18/02/2013, 05:08 PM
http://forum.sa-mp.com/showthread.php?t=273088

sscarface
18/02/2013, 05:23 PM
enum CNR_user
{
thours,
tmins,
tsecs,
}
new PlayerInfo[MAX_PLAYERS][CNR_user];

INI_WriteInt(ufile,"thours",PlayerInfo[playerid][thours]);
INI_WriteInt(ufile,"tmins",PlayerInfo[playerid][tmins]);
INI_WriteInt(ufile,"tsecs",PlayerInfo[playerid][tsecs]);

PlayerInfo[playerid][thours] = 0;
PlayerInfo[playerid][tmins] = 0;
PlayerInfo[playerid][tsecs] = 0;

INI_WriteInt(ufile,"thours",PlayerInfo[playerid][thours]);
INI_WriteInt(ufile,"tmins",PlayerInfo[playerid][tmins]);
INI_WriteInt(ufile,"tsecs",PlayerInfo[playerid][tsecs]);

INI_Int("thours",PlayerInfo[playerid][thours]);
INI_Int("tmins",PlayerInfo[playerid][tmins]);
INI_Int("tsecs",PlayerInfo[playerid][tsecs]);

and next is cmd:stats

but when i added this all so i get this error:

(27475) : error 001: expected token: "-identifier-", but found "["
(27476) : error 001: expected token: "-identifier-", but found "["
(27477) : error 001: expected token: "-identifier-", but found "["
(27474) : warning 204: symbol is assigned a value that is never used: "ttemp"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
[/php]

line

27474 : new Float:ttemp = float(GetPVarInt(targetid,"time"));


27475: new [thours] = floatround((ttemp/60)/60,floatround_floor);

27476: new [tmins] = floatround((((ttemp/60)/60) - thours)*60,floatround_floor);

27477: new [tsecs] = floatround((((((ttemp/60)/60) - thours)*60)-tmins) *60,floatround_floor);