timer stats
#1

how do i make message like 'it takes you 80 miliseconds to load your stats'every player spawn?
Reply
#2

Why 80 miliseconds ?
Under the callback OnPlayerSpawn, add a message "it takes you 80 miliseconds to load your stats" with SendClientMessage and load player's stats.
Reply
#3

uh man,you don't know what i'm talking about
Reply
#4

Well I also don't understand exactly what you need, could you explain more detailed please?
Reply
#5

I'm not sure why you would ever want this... but this is how you would do it.

PHP код:
public OnPlayerSpawn(playerid)
{
    new
        
fstr[50], // This will be used to format the string being sent to the player
        
LoadTime GetTickCount() // We will use this variable to store the loading times.
    
;
    
// Load user stats here... (I can't imagine why you would do this every time the player spawns... but oh well...
    
format(fstrsizeof(fstr), "It took %d milliseconds to load your stats."GetTickCount() - LoadTime);
    
SendClientMessage(playerid, -1fstr);
    
// Rest of OnPlayerSpawn...
    
return 1;

https://sampwiki.blast.hk/wiki/GetTickCount
Reply
#6

PHP код:
SendClientMessage(playerid, -1"It takes you 80 miliseconds to load your stats"); 
I'm sure if you explained a little more we can make better suggestions.
Reply


Forum Jump:


Users browsing this thread: