destroy all
#2

Try this:
pawn Код:
CMD:cade(playerid, params[])
{
    for(new i = 0; i < MAX_BARRICADES; i++)
    {
        if(!IsValidObject(cade[i])
        {
            new Float:x, Float:y, Float:z, Float:a;
            GetPlayerPos(playerid, x, y, z);
            GetPlayerFacingAngle(playerid, a);
            cade[i] = CreateObject(981, x, y, z, 0.0, 0.0, a);
            SetPlayerPos(playerid, x, y-1, z);
            break;
        }
        continue;
    }
    return 1;
}

CMD:destroycades(playerid, params[])
{
    for(new i = 0; i < MAX_BARRICADES; i++)
    {
        if(IsValidObject(cade[i])
        {
            DestroyObject(cade[i]);
        }
        continue;
    }
    return 1;
}
Reply


Messages In This Thread
destroy all - by Why - 23.09.2012, 13:18
Re: destroy all - by clarencecuzz - 23.09.2012, 13:24
Re: destroy all - by Why - 23.09.2012, 13:25

Forum Jump:


Users browsing this thread: 1 Guest(s)