player stats alive time not saving
#1

Fixed
Reply
#2

You'd have to write it to a file.
Reply
#3

Quote:
Originally Posted by austin070
Посмотреть сообщение
You'd have to write it to a file.
what u mean?
Reply
#4

https://sampforum.blast.hk/showthread.php?tid=273088
Reply
#5

PHP код:
enum CNR_user
{
    
thours,
    
tmins,
    
tsecs,
}
new 
PlayerInfo[MAX_PLAYERS][CNR_user]; 
PHP код:
        INI_WriteInt(ufile,"thours",PlayerInfo[playerid][thours]);
        
INI_WriteInt(ufile,"tmins",PlayerInfo[playerid][tmins]);
        
INI_WriteInt(ufile,"tsecs",PlayerInfo[playerid][tsecs]); 
PHP код:
PlayerInfo[playerid][thours] = 0;
        
PlayerInfo[playerid][tmins] = 0;
        
PlayerInfo[playerid][tsecs] = 0
PHP код:
INI_WriteInt(ufile,"thours",PlayerInfo[playerid][thours]);
        
INI_WriteInt(ufile,"tmins",PlayerInfo[playerid][tmins]);
        
INI_WriteInt(ufile,"tsecs",PlayerInfo[playerid][tsecs]); 
PHP код:
INI_Int("thours",PlayerInfo[playerid][thours]);
    
INI_Int("tmins",PlayerInfo[playerid][tmins]);
    
INI_Int("tsecs",PlayerInfo[playerid][tsecs]); 
and next is cmdtats

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 © 1997-2006, ITB CompuPhase


3 Errors.
[/php]

line
PHP код:
27474 :  new Float:ttemp float(GetPVarInt(targetid,"time")); 
27475:
Quote:

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

27476:
Quote:

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

27477:
Quote:

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

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)