SetTimerEx pushing wrong values?
#10

pawn Код:
#include <a_samp>



public OnPlayerRequestClass(playerid, classid)
{
    if(IsPlayerNPC(playerid)) return 1;
    PlayerInfo[playerid][pSelection] = 0;
    SetTimerEx("SpawnPlayerEx", 75, false, "i", playerid);
    new Preloading[3];//preload objects
    Preloading[0] = CreatePlayerObject(playerid, Machine_Gun,               TM_SELECTION_X, TM_SELECTION_Y + 5, TM_SELECTION_Z, 0.0, 0.0, 0.0, 300.0);
    Preloading[1] = CreatePlayerObject(playerid, Missile_Default_Object,    TM_SELECTION_X, TM_SELECTION_Y + 5, TM_SELECTION_Z, 0.0, 0.0, 0.0, 300.0);
    Preloading[2] = CreatePlayerObject(playerid, Missile_Napalm_Object,     TM_SELECTION_X, TM_SELECTION_Y + 5, TM_SELECTION_Z, 0.0, 0.0, 0.0, 300.0);
    SendClientMessageFormatted(playerid, -1, "0: %d - 1: %d - 2: %d", Preloading[0], Preloading[1], Preloading[2]);
    SetTimerEx("FinishPreloading", 2000, false, "iiii", playerid, Preloading);
    return 1;
}


forward FinishPreloading(playerid,received[3]);
public FinishPreloading(playerid,received[3])
{
    for(new i,d=numargs();i != d;i++)
    {
        SendClientMessageFormatted(playerid, -1, "player objectid: %d - arg: received[%d]",received[i], i);
            DestroyPlayerObject(playerid,received[i]);
    }

}
I tested a similar code and it worked

pawn Код:
#include <a_samp>

public OnFilterScriptInit()
{
new integers[3] = {0,1,2};
SetTimerEx("test",2000,false,"iiii",9,integers);

}

forward test(playerid,received[3]);
public test(playerid,received[3])
{
    for(new i,d=numargs();i != d;i++)
    {
        printf("%d",received[i]);
    }

}
Console:
Код:
0
1
2
Reply


Messages In This Thread
SetTimerEx pushing wrong values? - by Kar - 07.03.2012, 22:08
Re: SetTimerEx pushing wrong values? - by Mike_Peterson - 07.03.2012, 22:19
Re: SetTimerEx pushing wrong values? - by Kar - 07.03.2012, 22:34
Re: SetTimerEx pushing wrong values? - by Mike_Peterson - 07.03.2012, 22:40
Re: SetTimerEx pushing wrong values? - by Kar - 07.03.2012, 22:42
Re: SetTimerEx pushing wrong values? - by Mauzen - 07.03.2012, 22:54
Re: SetTimerEx pushing wrong values? - by Mike_Peterson - 07.03.2012, 22:55
Re: SetTimerEx pushing wrong values? - by Kar - 07.03.2012, 22:56
Re: SetTimerEx pushing wrong values? - by Mike_Peterson - 07.03.2012, 23:06
Respuesta: SetTimerEx pushing wrong values? - by Jovanny - 07.03.2012, 23:07

Forum Jump:


Users browsing this thread: 1 Guest(s)