Problem:
Console is reporting Invalid ID when Streamer_Set/GetIntData are used
Code:
The Debug I've placed before Streamer_SetIntData here is working, which means the area is a valid dynamic area. Why is Streamer_SetIntData moaning about an invalid ID though? Am I completely missing something here?
Console is reporting Invalid ID when Streamer_Set/GetIntData are used
Code:
Code:
stock VS_SpawnVehicle(playerid)
{
new Float: VS_Distance = GetPlayerDistanceFromPoint(playerid, VS_SpawnX[playerid], VS_SpawnY[playerid], VS_SpawnZ[playerid]);
if(VS_Distance < 5.0)
{
Info(playerid, "Move slightly away from the vehicles spawn position");
return 1;
}
else
{
Info(playerid, "Vehicle spawned");
VS_PlayerSpawningVehicle[playerid] = 0;
HK_AreaUpdateAllowed[playerid] = 0;
HK_Update(playerid, VS_VEHICLE_SPAWNED);
DisablePlayerCheckpoint(playerid);
DestroyVehicle(VS_Vehicle[playerid]);
VS_Vehicle[playerid] = AddStaticVehicleEx(VS_Model[playerid], VS_SpawnX[playerid], VS_SpawnY[playerid], VS_SpawnZ[playerid], VS_FacingAngle[playerid], 001, 001, 0, 0);
DestroyDynamicArea(VS_VehicleArea[playerid]);
VS_VehicleArea[playerid] = CreateDynamicSphere(VS_SpawnX[playerid], VS_SpawnY[playerid], VS_SpawnZ[playerid], 5.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1);
AttachDynamicAreaToVehicle(VS_VehicleArea[playerid], VS_Vehicle[playerid], 0.0, 0.0, 0.0);
if(IsValidDynamicArea(VS_VehicleArea[playerid]))
{
Debug(playerid, "Area is valid [SPAWNING VEHICLE]");
Streamer_SetIntData(STREAMER_AREA_TYPE_SPHERE, VS_VehicleArea[playerid], E_STREAMER_EXTRA_ID, playerid);
}
HK_AreaUpdateAllowed[playerid] = 1;
HK_AreaUpdate(playerid);
return 1;
}
}