Help plese:system ...Recor for online players...
#1

Hello samp.com
Please, can you show how I could make a system to "record for online players: player number, time was ...
Ask for help from the greatest scripters.
Thanks.
------------------------------------------------------------------------------------------------------------------
I saw he had a system on The Eclipse (Zh3r0's server)
But how do you do?
------------------------------------------------------------------------------------------------------------------Thanks.
Reply
#2

Well first you keep track of how many people are currently in the server, this can be done using a variable in OnPlayerConnect and OnPlayerDisconnect. Then you can simply have another variable which records the highest amount of players online at the same time.

This is quite basic stuff, you should read the PAWN documentation available at CompuPhase's website.
Reply
#3

Is it pretty easy.
but are not so skilled in scripting
you can not help me
I make a script to
Reply
#4

Okay well here is a simple example for you to work off of.

pawn Code:
new iMostOnline, iCurrentlyOnline;

public OnPlayerConnect(playerid)
{
    iCurrentlyOnline++;
    if(iCurrentlyOnline > iMostOnline) SendClientMessageToAll(playerid, 0xFFFFFF, "A new server record was reached!");
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    iCurrentlyOnline--;
    return 1;
}
Now use that example and adapt it to your needs. You would need some sort of persistant saving method to make it stick after a server restart too.
Reply
#5

I want to do something like this

Can you help me?
please!
show me a script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)