08.04.2013, 14:34
My array looks like this
playerVehicles[vehicleid][vModelId]
playerVehicles[vehicleid][vOwnerId] //internal DB autoindex key
playerVehicles[vehicleid][vTmpPlayerId] // The playerid of the charater given at login
So I only need to loop through vehicles that belong to vTmpPlayerId. But I can't search an array so I would have to loop all spawned vehicles to find if vTmpPlayerId == playerid. This seems very inefficient.
playerVehicles[vehicleid][vModelId]
playerVehicles[vehicleid][vOwnerId] //internal DB autoindex key
playerVehicles[vehicleid][vTmpPlayerId] // The playerid of the charater given at login
So I only need to loop through vehicles that belong to vTmpPlayerId. But I can't search an array so I would have to loop all spawned vehicles to find if vTmpPlayerId == playerid. This seems very inefficient.