Callbacks aren't being called!
#7

I think it had something to do with fsdebug being loaded. I may need to double-check that I'm not colliding with other functions or something. Anyways, it's working now. Thanks for the help though!

For anyone who wants/needs the code, here you go:

pawn Код:
#include <a_samp>
#include <a_zones>
#include <foreach>
#include <YSI\y_timers>

new
    Text:GPSTD[MAX_PLAYERS];

public OnFilterScriptInit()
{
    print("OFSI called");
    foreach(Player, i)
    {
        GPSTD[i] = TextDrawCreate(530.000000, 434.000000, " ");
        TextDrawBackgroundColor(GPSTD[i], 80);
        TextDrawFont(GPSTD[i], 3);
        TextDrawLetterSize(GPSTD[i], 0.179999, 0.799999);
        TextDrawColor(GPSTD[i], -1);
        TextDrawSetOutline(GPSTD[i], 1);
        TextDrawSetProportional(GPSTD[i], 1);
    }
    return 1;
}

public OnFilterScriptExit()
{
    print("OFSE called");
    foreach(Player, i) TextDrawHideForAll(GPSTD[i]);
    return 1;
}

task UpdateGPS[500]()
{
    print("UGPS timer called");
    foreach(Player, i)
    {
        new szZone[MAX_ZONE_NAME];
        GetPlayer2DZone(i, szZone, MAX_ZONE_NAME);
        TextDrawSetString(GPSTD[i], szZone);
    }
}

public OnPlayerConnect(playerid)
{
    print("OPC called");
    GPSTD[playerid] = TextDrawCreate(530.000000, 434.000000, " ");
    TextDrawBackgroundColor(GPSTD[playerid], 80);
    TextDrawFont(GPSTD[playerid], 3);
    TextDrawLetterSize(GPSTD[playerid], 0.179999, 0.799999);
    TextDrawColor(GPSTD[playerid], -1);
    TextDrawSetOutline(GPSTD[playerid], 1);
    TextDrawSetProportional(GPSTD[playerid], 1);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    print("OPDC called");
    return 1;
}

public OnPlayerSpawn(playerid)
{
    print("OPS called");
    TextDrawShowForPlayer(playerid, GPSTD[playerid]);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    print("OPD called");
    TextDrawHideForPlayer(playerid, GPSTD[playerid]);
    return 1;
}
Reply


Messages In This Thread
Callbacks aren't being called! - by Scenario - 14.01.2012, 18:25
Re: Callbacks aren't being called! - by Mean - 14.01.2012, 18:38
Re: Callbacks aren't being called! - by Scenario - 14.01.2012, 18:40
Re: Callbacks aren't being called! - by Mean - 14.01.2012, 18:41
Re: Callbacks aren't being called! - by Scenario - 14.01.2012, 18:43
Re: Callbacks aren't being called! - by Mean - 14.01.2012, 18:49
Re: Callbacks aren't being called! - by Scenario - 14.01.2012, 19:12

Forum Jump:


Users browsing this thread: 1 Guest(s)