It's been a long time... -
Strier - 12.04.2013
I don't script, so i got stuck in this line.
pawn Код:
CMD:fpslimit(playerid, params[])
{
new FPSlimite = strval(params);
new str[256];
if(sscanf(params,"d",FPSlimite)) return SendClientMessage(playerid,0xFF0000,"ERROR: Usage /fpslimit [fps]");
format(str, sizeof(str), "Administrator %s has set the fps limit to %d!", pAdmin(playerid), FPSlimite);
SendClientMessageToAll(-1, str);
/*if(FPSlimite > 100 || < 10) return SendClientMessage(playerid, 0xFF0000, "Maximum fps: 100 Minimum FPS: 10");*/
if(GetPlayerFPS(playerid) < FPSlimite));
{
SendClientMessage(playerid, 0xFF0000, "Your fps is too low you may get kicked!");
SetTimer("FpsKicker", 5000, false);
}
return 1;
}
Errors
pawn Код:
C:\Users\Guille\Desktop\samp scripting 3x\filterscripts\StrierKicker.pwn(35) : error 029: invalid expression, assumed zero
C:\Users\Guille\Desktop\samp scripting 3x\filterscripts\StrierKicker.pwn(35) : warning 215: expression has no effect
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Line:
pawn Код:
if(GetPlayerFPS(playerid) < FPSlimite));
Isn't it supposed to be working?
Re: It's been a long time... -
SilverKiller - 12.04.2013
pawn Код:
if(GetPlayerFPS(playerid) < FPSlimite))
Respuesta: It's been a long time... -
Strier - 12.04.2013
Still getting the same error, and thanks noted that wont happen again

.
Re: It's been a long time... -
Faisal_khan - 12.04.2013
pawn Код:
if(GetPlayerFPS(playerid) < FPSlimite)
Respuesta: It's been a long time... -
Strier - 12.04.2013
Later on, i've been experiencing some problems with loading this filterscript, any idea of why? it says it's loaded but the "print's" aren't sent to the console.. anyone could give me a reason maybe?
Re: It's been a long time... -
Faisal_khan - 12.04.2013
Make sure you have not more than 16 filterscript.
Re: It's been a long time... -
XStormiest - 12.04.2013
pawn Код:
new FPSlimite = strval(params);
serious? you transform an intergrer into integrer , why you do this?
strval is for transforming strings into integrer
you may use
new FPSlimite;
also a new problem playerid is the player who have that fps, so the command won't kick player who have low fps , will kick the player who type the command if he have low ping
you should loop
like
pawn Код:
///also this should be in the callback timer not into the command.
for(new i = 0; i < MAX_PLAYERS;i++)
{
if(GetPlayerFPS(i) < FPSlimite)
{
SetTimerEx("FPSKicker",5000, 1, "u", i); //customize this to your time ...., 1 is for reapeting this one
}
return 1;
}
Respuesta: It's been a long time... -
Strier - 12.04.2013
Fixed that, now the tell me about the console problem please.
Re: It's been a long time... -
XStormiest - 12.04.2013
what console problem?
Re: It's been a long time... -
Faisal_khan - 12.04.2013
Show us the server logs and server.cfg.