Jump to content

Spawn System Issues.


Atton

Recommended Posts

I am not sure if I am blind dumb or just an idiot. However I have taken the time to reference other code.

The system uses a table to create markers then it will create a car where the play is located once that player walks into the marker.

Pretty much in a nutshell I went over this code however it is still fucked and I have looked at system similar to this.

No luck so far.

Any help would be appreciated.

local CarTable ={ 
  
{x=1543.765625, y=-1644.3771972656, z=4.890625, rx=1543.765625, ry=-1644.3771972656, rz=5.890625, dim=0}, 
{x=1564.3247070313, y=-1694.3146972656, z=4.890625, rx=1564.3247070313, ry=-1694.3146972656, rz=5.890625, dim=0}, 
{x=1600.1920166016, y=-1711.2330322266, z=4.890625, rx=1600.1920166016, ry=-1711.2330322266, rz=5.890625, dim=0}, 
{x=1544.1652832031, y=-1607.7492675781, z=12.3828125, rx=1544.1652832031, ry=-1607.7492675781, rz=13.3828125, dim=0}, 
  
} 
  
function CARf (hitElement)     
local elementType = getElementType(hitElement) 
local x,y,z = getElementPosition(hitElement) 
  if (exports.GroupSystem:checkCop(hitElement)) then 
  if (elementType == "player") then 
     COPC = createVehicle(603,x,y,z + 6) 
  
    end 
end 
  
for a,b in pairs(CarTable) do 
  
local CarM = createMarker(b["x"], b["y"], b["z"],"cylinder", 2.5, 0, 20, 0, 255) 
addEventHandler("onMarkerHit", CarM, CARf) 
end 
  

Error Messages:

WARNING: Loading script failed: [Atton]/BasesCode/CopBase.lua:24: 'end' expected (to close 'function' at line 10) near ''

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...