Removing roadblocks.
#2

pawn Код:
DestroyDynamicObject(Roadblock[i][rObject]);
            return 1;
If you were no so return happy this wouldn't happen

pawn Код:
stock RemoveAllRoadblock(playerid)
{
    new blocksremoved;
    for(new i = 0; i < sizeof(Roadblock); i++)
    {
        if(Roadblock[i][rCreated] == 1)
        {
            Roadblock[i][rCreated] = 0;
            Roadblock[i][rX] = 0.0;
            Roadblock[i][rY] = 0.0;
            Roadblock[i][rZ] = 0.0;
            DestroyDynamicObject(Roadblock[i][rObject]);
            blocksremoved++;
        }
    }
    if(blocksremoved)
    {
        new line[128];
        format(line, sizeof(line), "Removed %i roadblocks", blocksremoved);
        SendClientMessage(playerid, COLOR_LIGHTRED, line);
    }
    else SendClientMessage(playerid, COLOR_LIGHTRED, "No road blocks were removed!");
   
    return 1;
}
Reply


Messages In This Thread
Removing roadblocks. - by Josh Greening - 29.10.2013, 05:48
Re: Removing roadblocks. - by Pottus - 29.10.2013, 05:51
Re: Removing roadblocks. - by Josh Greening - 29.10.2013, 06:05

Forum Jump:


Users browsing this thread: 1 Guest(s)