It's been a long time...
#1

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?
Reply
#2

pawn Код:
if(GetPlayerFPS(playerid) < FPSlimite))
Reply
#3

Still getting the same error, and thanks noted that wont happen again .
Reply
#4

pawn Код:
if(GetPlayerFPS(playerid) < FPSlimite)
Reply
#5

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?
Reply
#6

Make sure you have not more than 16 filterscript.
Reply
#7

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;
}
Reply
#8

Fixed that, now the tell me about the console problem please.
Reply
#9

what console problem?
Reply
#10

Show us the server logs and server.cfg.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)