03.04.2017, 16:02
Is this callback triggered when a player inside a vehicle enters in a dynamic area? If yes, I don't know why it doesn't work for me.
All works fine when the player is outside a vehicle.
Код:
//Callback public OnPlayerEnterDynamicArea(playerid, areaid) { new i; lastPlayerAreaID[playerid] = areaid; i = Streamer_GetIntData(STREAMER_TYPE_AREA, areaid, E_STREAMER_EXTRA_ID) - HOUSE_MAGIC; if(0 <= i < MAX_HOUSES) { if(HouseInfo[i][hPrice] != 0 && HouseInfo[i][hOwnerID] != -1 && !IsPlayerInCheckpoint(playerid)) SetPlayerCheckpoint(playerid, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ], 2.0); localCheckPointType[playerid] = TYPE_HOUSE; localCheckPointID[playerid] = i; return 1; } return 1; } //Creation HouseInfo[id][hEnterArea] = CreateDynamicSphere(HouseInfo[id][hEnterX], HouseInfo[id][hEnterY], HouseInfo[id][hEnterZ], 1.5, HouseInfo[id][hVW], HouseInfo[id][hEnterInt]); Streamer_SetIntData(STREAMER_TYPE_AREA, HouseInfo[id][hEnterArea], E_STREAMER_EXTRA_ID, id + HOUSE_MAGIC);