21.02.2010, 21:30
I am having a problem were when theres 25 or more players on my server uses 3%cpu and no memory but for some reason when theres 10-20 players online CPU Usage: 22.1 % Memory usage:28.33mb Space in use:48 mb and my server crashes any ideas .... the only thing on onplayerupdate is this could it be the problem ..?
public OnPlayerUpdate(playerid)
{
if(GetPlayerMoney(playerid) == 999999999)
{
new pName[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "[AntiCheat]: %s has been kicked for MAX MONEY.", pName);
SendClientMessageToAll(orange, string);
Kick(playerid);
print(string);
}
new Float:health;
GetPlayerHealth(playerid,health);
if(health > 101)
{
if(level[playerid] == 0)
{
new pName[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "[AntiCheat]: %s has been kicked for Health Hacks.", pName);
SendClientMessageToAll(orange, string);
Kick(playerid);
print(string);
}
}
return 1;
}
public OnPlayerUpdate(playerid)
{
if(GetPlayerMoney(playerid) == 999999999)
{
new pName[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "[AntiCheat]: %s has been kicked for MAX MONEY.", pName);
SendClientMessageToAll(orange, string);
Kick(playerid);
print(string);
}
new Float:health;
GetPlayerHealth(playerid,health);
if(health > 101)
{
if(level[playerid] == 0)
{
new pName[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "[AntiCheat]: %s has been kicked for Health Hacks.", pName);
SendClientMessageToAll(orange, string);
Kick(playerid);
print(string);
}
}
return 1;
}