Timer Bug or what is this???
#7

Quote:
Originally Posted by Dwane
Посмотреть сообщение
It worked fine for me.

pawn Код:
// Results:
[12:49:04] [join] Dwane has joined the server (0:127.0.0.1)
[12:49:06] Teszt Runned
[12:49:12] Teszt CMD
[12:49:13] Teszt Runned
[12:49:16] [part] Dwane has left the server (0:1)
pawn Код:
#define FILTERSCRIPT

#include <a_samp>

forward Teszt(playerid);

public OnFilterScriptInit()
{
    print("Load Script");
    return 1;
}

public OnFilterScriptExit()
{
    print("Exit Script");
    return 1;
}

public OnPlayerConnect(playerid)
{
    SetTimerEx("Teszt",1000,0,"d",playerid); // 1st message
    return 1;
}

public OnPlayerCommandText(playerid,cmdtext[])
{
    if(!strcmp(cmdtext, "/timer", true))
    {
        print("Teszt CMD"); //2nd message
        SetTimerEx("Teszt",1000,0,"d",playerid); // 3rd message
        return 1;
    }
    return 0;
}

public Teszt(playerid)
{
    print("Teszt Runned"); // 1st message and 3rd message
    return 1;
}
After looking at your test results, I'm pretty sure OnPlayerConnect in his script is not even called. It is probably caused by incorrect callback hooking. Can you tell us what libraries have you included? (#include <library_name>)
If you only use a_samp, then the file may be messed up by improper optimization flag or plugin error. Show us if you have these.

Quote:
Originally Posted by MP2
Посмотреть сообщение
OnPlayerDisconnect is only called for the first fioterscript that is loaded.

There is no OnPlayerDisconnect in the script, and actually it does call for all the filterscripts and the gamemode, as I'm using the callback in multiple filterscripts and the gamemode.
Reply


Messages In This Thread
Timer Bug or what is this??? - by Kovacs_Richard - 19.03.2013, 10:06
Re: Timer Bug or what is this??? - by Konstantinos - 19.03.2013, 10:27
Re: Timer Bug or what is this??? - by Kovacs_Richard - 19.03.2013, 10:40
Re: Timer Bug or what is this??? - by Konstantinos - 19.03.2013, 10:47
Re: Timer Bug or what is this??? - by Kovacs_Richard - 19.03.2013, 11:00
Re: Timer Bug or what is this??? - by MP2 - 19.03.2013, 11:40
Re: Timer Bug or what is this??? - by leong124 - 19.03.2013, 16:02

Forum Jump:


Users browsing this thread: 1 Guest(s)