Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cars = {}
- _carid = 1;
- function SpawnCar(car, x, y, rot, owner)
- if not rot then rot = 0 end;
- if not owner then owner = 0 end;
- if owner > 0 then
- if Player[owner] ~= nil then
- table.insert(Player[owner].cars, _carid);
- end
- end
- local t = {};
- t.enabled = true;
- t.x = x;
- t.y = y;
- t.type = car;
- t.gfx = image(car_types[car].gfx_path, x, y, car_types[car].top);
- imagepos(t.gfx, x, y, rot);
- t.owner = 0;
- t.players = {};
- t.cid = _carid;
- t.cowner = owner;
- t.cplayers = {};
- t.cdrivers = {};
- t.health = car_types[car].health;
- cars[_carid] = t;
- local _, i;
- _carid = _carid + 1;
- end
Advertisement
Add Comment
Please, Sign In to add comment