27.10.2012, 22:42
On the "CreateRB" stock don't you need to check if the roadblock is being used? either add a extra variable to the enum and set the bool to true of false and work from that or:
Should work.
Edit: Added a 'break;'
pawn Код:
stock CreateRB(Float:x, Float:y, Float:z, Float:a)
{
for(new i = 0; i < sizeof(RoadBlock); i++)
{
if(RoadBlock[i][Xpos] == 0 && RoadBlock[i][Ypos] == 0) {
RoadBlock[i][Xpos] = x;
RoadBlock[i][Ypos] = y;
RoadBlock[i][Zpos] = z-0.7;
RoadBlock[i][object] = CreateDynamicObject(1459, x, y, z-0.9, 0, 0, a);
break;
}
}
return 1;
}
Edit: Added a 'break;'