19.02.2009, 16:40
you did
in the loop and so each pickup was exactly 2.0 m away
pawn Код:
new Float:metres = 1.0;
metres += 1.0;
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;
}