01.09.2009, 02:01
here is a quick one I made up :P
NOT TESTED
pawn Код:
#include <a_samp>
forward GameTime(playerid);
new gtm[MAX_PLAYERS] = 0;
new gth[MAX_PLAYERS] = 0;
public OnPlayerConnect(playerid)
{
SetTimerEx("GameTime",60000,1,"i",playerid);
return 1;
}
public GameTime(playerid)
{
if(gtm[playerid]<60)
{
gtm[playerid]++;
}
if(gtm[playerid] == 60)
{
gth[playerid]++;
gtm[playerid] = 0;
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/gametime", cmdtext, true, 10) == 0)
{
new string[128];
format(string,sizeof(string),"You Have Been On This Server For %i hours and %i minutes!",gth[playerid],gtm[playerid]);
SendClientMessage(playerid,COLOR,string);
return 1;
}
return 0;
}