07.03.2012, 23:07
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]);
}
}
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]);
}
}
Код:
0 1 2