Posts: 2,938
Threads: 162
Joined: May 2010
anyone kknow this color's id?
Uploaded with
ImageShack.us
SetTimer("PingCheck",1000*10,1);
whats timer for 30 seconds?
Posts: 2,938
Threads: 162
Joined: May 2010
thx but now i got a another prob
format(string,sizeof(string),"%s Has Been Kicked From The Server. (Reason: High Ping)");
this doesn't send the person's name.. weird... it just leavwes a blank space and says Has Been kicked from the server etc..
[edit]
Код:
SetTimer("PingCheck", 1000 * 30, true);
30 means 30 seconds? 10 means 10 secs?
Posts: 209
Threads: 31
Joined: Mar 2010
Reputation:
0
For the timer guestion: 1000 * 30 means 30 multiplied by 1000, SetTimer uses milliseconds, so, 30 * 1000 is the same as 30000. ( 1000 milliseconds = 1 second. )
Posts: 2,938
Threads: 162
Joined: May 2010
Quote:
Originally Posted by Joe_
|
ya i can use it correctly heres the code..
Код:
public PingCheck()
{
for(new i=0; i<GetMaxPlayers();i++)
{
if(IsPlayerConnected(i))
{
if(GetPVarInt(i,"IsSpawned") == 1)
{
if(GetPlayerPing(i) >= 1000)
{
new name[MAX_PLAYER_NAME],string[71];
GetPlayerName(i,name,sizeof(name));
format(string,sizeof(string),"%s Has Been Kicked From The Server. (Reason: High Ping)");
SendClientMessageToAll(PINK,string);
Kick(i);
}}}}
return 1;
}
Posts: 2,938
Threads: 162
Joined: May 2010
thx all btw its fixed now