x[Dev-PoinT]x Posted July 17, 2011 Share Posted July 17, 2011 i Start The Script Dont work local shit = createColSphere ( 1651.1312255859,-2543.0141601563,17.234375 ) local random_spawns = { [1]={1651.1312255859,-2543.0141601563,17.234375}, [2]={1651.1312255859,-2543.0141601563,13.546875}, [3]={1651.1312255859,-2543.0141601563,17.234375}, [4]={1651.1312255859,-2543.0141601563,13.546875}, [5]={1651.1312255859,-2543.0141601563,17.234375}, [6]={1651.1312255859,-2543.0141601563,15.602038383484}, [7]={1651.1312255859,-2543.0141601563,13.546875}, [8]={1651.1312255859,-2543.0141601563,13.546875}, [9]={1651.1312255859,-2543.0141601563,13.546875}, [10]={1651.1312255859,-2543.0141601563,15.602038383484}, } function onClientColShapeHit3( theElement, matchingDimension ) if theElement == getLocalPlayer() then if source == shit then local rand_int = math.random(1,table.getn(random_spawns)) triggerServerEvent ( "super", getLocalPlayer(), getLocalPlayer()) setElementPosition(getLocalPlayer(),random_spawns[rand_int][1],random_spawns[rand_int][2],random_spawns[rand_int][3]) -- setElementInterior(getLocalPlayer(),15, random_spawns[rand_int][1],random_spawns[rand_int][2],random_spawns[rand_int][3]+5) end end end addEventHandler("onClientColShapeHit",getRootElement(),onClientColShapeHit3) function aha2( p ) setElementInterior(p,0) end addEvent ( "super", true ) addEventHandler ( "super", getRootElement(),aha2 ) Link to comment
JasperNL=D Posted July 17, 2011 Share Posted July 17, 2011 1. The sphere needs one more argument, the radius 2. is :~ a valid var? Link to comment
JR10 Posted July 17, 2011 Share Posted July 17, 2011 local myColShape = createColSphere ( 1651.1312255859,-2543.0141601563,17.234375 ) local random_spawns = { [1]={1651.1312255859,-2543.0141601563,17.234375}, [2]={1651.1312255859,-2543.0141601563,13.546875}, [3]={1651.1312255859,-2543.0141601563,17.234375}, [4]={1651.1312255859,-2543.0141601563,13.546875}, [5]={1651.1312255859,-2543.0141601563,17.234375}, [6]={1651.1312255859,-2543.0141601563,15.602038383484}, [7]={1651.1312255859,-2543.0141601563,13.546875}, [8]={1651.1312255859,-2543.0141601563,13.546875}, [9]={1651.1312255859,-2543.0141601563,13.546875}, [10]={1651.1312255859,-2543.0141601563,15.602038383484} } function onClientColShapeHit3( theElement, matchingDimension ) if theElement == getLocalPlayer() then if source == myColShape then local rand_int = math.random(1,table.getn(random_spawns)) triggerServerEvent ( "super", getLocalPlayer()) setElementPosition(getLocalPlayer(),random_spawns[rand_int][1],random_spawns[rand_int][2],random_spawns[rand_int][3]) -- setElementInterior(getLocalPlayer(),15, random_spawns[rand_int][1],random_spawns[rand_int][2],random_spawns[rand_int][3]+5) end end end addEventHandler("onClientColShapeHit",root,onClientColShapeHit3) function aha2( ) setElementInterior(source,0) end addEvent ( "super", true ) addEventHandler ( "super", getRootElement(),aha2 ) Link to comment
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