05.05.2012, 23:23
You have to set the player's interior and then change it back:
NOTE: Not tested.
pawn Код:
stock FixInvisibleObjects(playerid, interval=500)
{
new int = GetPlayerInterior(playerid);
SetPlayerInterior(playerid, int+1);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), int+1);
SetTimerEx("TIMER_FixInvisibleObjects", interval, 0, "ii", playerid, int);
return 1;
}
forward TIMER_FixInvisibleObjects(playerid, int);
public TIMER_FixInvisibleObjects(playerid, int)
{
SetPlayerInterior(playerid, int);
if(GetPlayerState(playerid) == 2) LinkVehicleToInterior(GetPlayerVehicleID(playerid), int);
return 1;
}