Gad_boy Posted January 4, 2012 Share Posted January 4, 2012 Можно ли создавать чекпоинты в интерьере? Если, да то какой параметр отвечает за это? Link to comment
Gad_boy Posted January 4, 2012 Author Share Posted January 4, 2012 function enterEnforce( hitElement, matchingDimension ) spawnPlayer (source,246.60000610352,67.300003051758,1003.299987793, 251,6) fadeCamera(source,true,5) setCameraTarget (source,source) setPlayerTeam ( source, tCriminal ) end addEventHandler( "onMarkerHit", eenter, enterEnforce ) function exitEnforce( hitElement, matchingDimension ) spawnPlayer (source,1550.5999755859,-1675.5999755859,15.10000038147, 251,0) fadeCamera(source,true,5) setCameraTarget (source,source) setPlayerTeam ( source, tCriminal ) end addEventHandler( "onMarkerHit", eexit, exitEnforce ) подскажите, пожалуйста, что в этом коде не так Link to comment
StUNt71 Posted January 4, 2012 Share Posted January 4, 2012 В событии onMarkerHit источником является сам маркер. И ты пытаешь его заспавнить. onPlayerMarkerHit Link to comment
Gad_boy Posted January 4, 2012 Author Share Posted January 4, 2012 премножественно, благодарен) Link to comment
Gad_boy Posted January 4, 2012 Author Share Posted January 4, 2012 function enterEnforce( hitElement, matchingDimension ) if (matchingDimension == eenter) then spawnPlayer (source,246.60000610352,67.300003051758,1003.299987793, 251,6) fadeCamera(source,true,5) setCameraTarget (source,source) setPlayerTeam ( source, tCriminal ) elseif (matchingDimension == eexit) then spawnPlayer (source,1550.5999755859,-1675.5999755859,15.10000038147, 251,0) fadeCamera(source,true,5) setCameraTarget (source,source) setPlayerTeam ( source, tCriminal ) end end addEventHandler( "onPlayerMarkerHit", getRootElement(), enterEnforce ) не? Link to comment
StUNt71 Posted January 4, 2012 Share Posted January 4, 2012 if (hitElement == eenter) then elseif (hitElement == eexit) then Link to comment
Gad_boy Posted January 5, 2012 Author Share Posted January 5, 2012 function enterence(markerHit, matchingDimension) if (markerHit == eenter) then spawnPlayer (source,246.60000610352,67.300003051758,1003.299987793, 251,6) fadeCamera(source,true,5) setCameraTarget (source,source) setPlayerTeam ( source, tEnforce ) elseif (markerHit == eexit) then spawnPlayer (source,1550.5999755859,-1675.5999755859,15.10000038147, 251,0) fadeCamera(source,true,5) setCameraTarget (source,source) setPlayerTeam ( source, tEnforce ) end end addEventHandler( "onPlayerMarkerHit",getRootElement(),enterence ) чот не пашет, и дебагскрипт молчит Link to comment
Gad_boy Posted January 5, 2012 Author Share Posted January 5, 2012 люди, помогите пожалуйста, очень нужно! Link to comment
kashtesov Posted January 6, 2012 Share Posted January 6, 2012 не стал читать всё, но выложил обрывок своего скрипта. не знаю, может поможет marker = createMarker (x, y, z,"type",size,R,G,B,alpha) потом: setElementInterior (marker,id interior) и измерение: setElementDimension (marker,number dimension) Не уверен, но вдруг поможет, т.к не стал читать предыдущие посты... времени мало на момент написания сообщения Link to comment
Kernell Posted January 6, 2012 Share Posted January 6, 2012 setElementPosition Забыли Link to comment
kashtesov Posted January 6, 2012 Share Posted January 6, 2012 setElementPosition Забыли ты как обычно прав=) Link to comment
StUNt71 Posted January 6, 2012 Share Posted January 6, 2012 поставь перед условием outputChatBox("фывфы") и в каждые из условий и проверь выведет он текст или нет. Текст только разный сделай везде, чтобы было понятно. ---- Дебаг пишет что? Link to comment
Gad_boy Posted January 6, 2012 Author Share Posted January 6, 2012 local eexit = createMarker(246.69999694824,62.900001525879,1002.5,"cylinder",1,57,85,229,255) setElementInterior(eexit,6) function enterence(markerHit, matchingDimension) if (markerHit == eexit) then outputChatBox("фывфы") end end addEventHandler( "onPlayerMarkerHit",getRootElement(),enterence ) не реагирует, на нахождение в чекпоинте, дебаг молчит 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