Kenix Posted April 9, 2011 Posted April 9, 2011 script works but for some reason, he entered only one col shape most down I do not understand what the problem is I just really need for a resource, I'll upload it to the community. local savePlaces = {{249, 1230, 14},{249, 1230, 12},{249, 1230, 10}} function onSavePlaceHit( hitElement, matchingDimension ) if (source == savesPlaces) then outputChatBox("enter") end end addEventHandler ( "onColShapeHit", getRootElement(), onSavePlaceHit ) function createsavePlaces( thePlayer, matchingDimension ) for k,i in ipairs( savePlaces ) do local fX3 = savePlaces[k][1] local fY3 = savePlaces[k][2] local radius3 = savePlaces[k][3] savesPlaces = createColCircle ( fX3, fY3, radius3 ) -- create col shape outputChatBox("Col number "..(savePlaces[k][1]).." created !") outputChatBox("Col number "..(savePlaces[k][2]).." created !") outputChatBox("Col number "..(savePlaces[k][3]).." created !") end end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createsavePlaces )
Moderators Citizen Posted April 9, 2011 Moderators Posted April 9, 2011 local savePlaces = {{249, 1230, 14},{249, 1230, 12},{249, 1230, 10}} function onSavePlaceHit( hitElement, matchingDimension ) outputChatBox("enter") end function createsavePlaces( thePlayer, matchingDimension ) for k,i in ipairs( savePlaces ) do local fX3 = savePlaces[k][1] local fY3 = savePlaces[k][2] local radius3 = savePlaces[k][3] savesPlacesCol = createColCircle ( fX3, fY3, radius3 ) -- create col shape outputChatBox("Col number "..k.." created !") addEventHandler ( "onColShapeHit", savesPlacesCol, onSavePlaceHit ) end end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createsavePlaces )
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now