improved points system for staying on server
you periodically get more points the longer you play
This commit is contained in:
parent
0d0ad0d41d
commit
65f270bdb2
@ -10,10 +10,10 @@ int g_iClientConnectionTime[MAXPLAYERS + 1];
|
|||||||
|
|
||||||
public Plugin myinfo =
|
public Plugin myinfo =
|
||||||
{
|
{
|
||||||
name = "Play Time Reward",
|
name = "PlaytimeReward",
|
||||||
author = "Obus",
|
author = "Obus + Dogan",
|
||||||
description = "Handle ranking rewards",
|
description = "reward players with points for playing on the server",
|
||||||
version = "0.0.1"
|
version = "1.0.0"
|
||||||
};
|
};
|
||||||
|
|
||||||
public void OnPluginStart()
|
public void OnPluginStart()
|
||||||
@ -50,12 +50,90 @@ public Action Timer_CheckConnectionTime(Handle hThis)
|
|||||||
for (int i = 1; i <= MaxClients; i++)
|
for (int i = 1; i <= MaxClients; i++)
|
||||||
{
|
{
|
||||||
if (!IsValidClient(i))
|
if (!IsValidClient(i))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((g_iClientConnectionTime[i] += 30) >= 1200)
|
g_iClientConnectionTime[i] += 30;
|
||||||
|
|
||||||
|
if (g_iClientConnectionTime[i] >= 36000)
|
||||||
{
|
{
|
||||||
LogPlayerEvent(i, "triggered", "staying_server");
|
LogPlayerEvent(i, "triggered", "staying_server_600");
|
||||||
g_iClientConnectionTime[i] -= 1200;
|
g_iClientConnectionTime[i] = 0; //start over, but i doubt someone will ever reach so far ;)
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 34200)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_570");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 32400)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_540");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 30600)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_510");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 28800)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_480");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 27000)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_450");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 25200)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_420");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 23400)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_390");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 21600)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_360");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 19800)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_330");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 18000)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_300");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 16200)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_270");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 14400)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_240");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 12600)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_210");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 10800)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_180");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 9000)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_150");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 7200)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_120");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 5400)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_90");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 3600)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_60");
|
||||||
|
}
|
||||||
|
else if (g_iClientConnectionTime[i] >= 1800)
|
||||||
|
{
|
||||||
|
LogPlayerEvent(i, "triggered", "staying_server_30");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user