Roadblock
#3

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:

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;
}
Should work.

Edit: Added a 'break;'
Reply


Messages In This Thread
Roadblock - by thefatshizms - 27.10.2012, 21:47
Re: Roadblock - by Edward d - 27.10.2012, 22:41
Re: Roadblock - by ryansheilds - 27.10.2012, 22:42
Re: Roadblock - by thefatshizms - 27.10.2012, 22:48

Forum Jump:


Users browsing this thread: 1 Guest(s)