Move Multiple cars in a straight line, but + metres?
#5

you did
pawn Код:
new Float:metres = 1.0;
metres += 1.0;
in the loop and so each pickup was exactly 2.0 m away
pawn Код:
if(strcmp(cmd, "/masshousemove", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] < 20)
            return SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Your not an administrator.");
        new i, pmodel,
            Float:distance = 1.0,
            Float:metres = distance;
        for(; i < sizeof(Houses); i++, metres += distance)
        {
            GetPlayerPos(playerid, Houses[i][EnterX], Houses[i][EnterY], Houses[i][EnterZ]);
            GetPlayerFacingAngle(playerid, Houses[i][EnterAngle]);
            Houses[i][EnterX] += (metres * floatsin(-Houses[i][EnterAngle], degrees));
            Houses[i][EnterY] += (metres * floatcos(-Houses[i][EnterAngle], degrees));
            Houses[i][EnterWorld] = GetPlayerVirtualWorld(playerid);
            Houses[i][EnterInterior] = GetPlayerInterior(playerid);
            DestroyPickup(Houses[i][PickupID]);
            switch(Houses[i][Owned])
            {
                case 0: pmodel = 1273;
                case 1: pmodel = 1239;
            }
            Houses[i][PickupID] = CreatePickup(pmodel, 1, Houses[i][EnterX], Houses[i][EnterY], Houses[i][EnterZ]);
            //SaveHouses();
        }
        return 1;
    }
Reply


Messages In This Thread
Move Multiple cars in a straight line, but + metres? - by Norn - 19.02.2009, 05:07
Re: Move Multiple cars in a straight line, but + metres? - by Norn - 19.02.2009, 16:15
Re: Move Multiple cars in a straight line, but + metres? - by ICECOLDKILLAK8 - 19.02.2009, 16:17
Re: Move Multiple cars in a straight line, but + metres? - by Norn - 19.02.2009, 16:18
Re: Move Multiple cars in a straight line, but + metres? - by Nero_3D - 19.02.2009, 16:40
Re: Move Multiple cars in a straight line, but + metres? - by Norn - 19.02.2009, 16:49

Forum Jump:


Users browsing this thread: 2 Guest(s)