18.08.2015, 22:03
I just saw a problem in my server console
The problem
Code of /respawncars
command
/rac
what is the problem?
The problem
Код:
[23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (13731) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (13731) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (13731) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (13731) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (13731) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (13731) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (13731) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (13731) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (13731) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (13731) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (13731) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (31142) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (31142) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (31142) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (31142) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (31142) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (31142) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (31142) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (31142) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (31142) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (31142) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (31142) Limit: 3000/sec [23:57:17] [warning] client exceeded 'ackslimit' 127.0.0.1:49570 (31142) Limit: 3000/sec
pawn Код:
dcmd_respawncars(playerid,params[])
{
#pragma unused params
if(AccInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, green, "|- Your have Successfully Respawned all Vehicles! -|");
GameTextForAll("~n~~n~~n~~n~~n~~n~~r~Vehicles ~g~Respawned!", 3000,3);
for(new cars=0; cars<MAX_VEHICLES; cars++)
{
if(!VehicleOccupied(cars))
{
SetVehicleToRespawn(cars);
}
}
return 1;
}
else return ErrorMessages(playerid, 1);
}
/rac
pawn Код:
CMD:rac(playerid, params[])
{
if(!IsAdmin(playerid, 1)) return SendClientMessage(playerid, COLOR_RED, "You are not admin!");
new bool:vehicleused[MAX_VEHICLES];
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
vehicleused[GetPlayerVehicleID(i)] = true;
}
}
for(new i=1; i < MAX_VEHICLES; i++)
{
if(!vehicleused[i])
{
SetVehicleToRespawn(i);
}
}
new msg[128];
format(msg, sizeof(msg), "Admin %s (%d) has respawned all unused vehicles", PlayerName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, msg);
return 1;
}