20.09.2018, 09:51
Quote:
I actually used a similar system before (i was checking if the pickup id was between the first loaded pickup of house #1 and the last loaded pickup of the last loaded house #n, and then i did something like pickupid modulus 2, since i have 2 pickups at each house, to determine whether the player is at the entrance or at the exit of the house), but i was told by someone on the forum that pickups might not always be consistent with their ids, for example when a house is purchased it must change its pickup icon (so i delete the old one and create new), and players might be purchasing houses at the same time, so houses might mess up their pickup ids. Is this still a thing with the streamer method? Can i really trust the pickup ids? And thank you for answer!
|
I also mentioned an alternative way, you can combine pickup modelid + extra id. You may keep the exterior pickup only and change to a checkpoint inside interiors to avoid complication. This way, you can easily retrieve the house index using the combination of the two.
As for the re-creation of the pickup when it is sold/bought, use the data manipulation and just alter the pickup modelid. Do not destroy and create again.
pawn Код:
Streamer_SetIntData(STREAMER_TYPE_PICKUP, House[house_index_here][Pickup], E_STREAMER_MODEL_ID, new_pickup_modelid_here);