[S.K] Posted October 31, 2012 Share Posted October 31, 2012 what is wrong at this function CreateMarker () createmarker = -1645.7694091797, 433.41793823242, 7.1796875 fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome to My Server", source) end addEventHandler("marker", getRootElement(), Marker) Link to comment
TAPL Posted October 31, 2012 Share Posted October 31, 2012 (edited) This make no sense. Start learning and stop putting random code. https://wiki.multitheftauto.com/wiki/Scripting_Introduction Edited October 31, 2012 by Guest Link to comment
AhmadQTR Posted October 31, 2012 Share Posted October 31, 2012 This make no sense. Start learning and stop putting random code.https://wiki.multitheftauto.com/wiki/Scr ... troduction Then viewtopic.php?f=91&t=47897 Link to comment
[S.K] Posted October 31, 2012 Author Share Posted October 31, 2012 how can i createmarker. Link to comment
TAPL Posted October 31, 2012 Share Posted October 31, 2012 how can i createmarker. https://wiki.multitheftauto.com/wiki/CreateMarker Link to comment
AhmadQTR Posted October 31, 2012 Share Posted October 31, 2012 how can i createmarker. https://wiki.multitheftauto.com/wiki/CreateMarker Link to comment
Baseplate Posted October 31, 2012 Share Posted October 31, 2012 function createaMarker () createMarker (-1645.7694091797, 433.41793823242, 7.1796875) end addEventHandler("onResourceStart", root, createaMarker) use [lua] tags and don't put random codes Link to comment
[S.K] Posted October 31, 2012 Author Share Posted October 31, 2012 it work and it is easy ty but can i make from this a Job or give cars Link to comment
Baseplate Posted October 31, 2012 Share Posted October 31, 2012 Yes...use onMarkerHit Link to comment
Baseplate Posted October 31, 2012 Share Posted October 31, 2012 if you wanna make a GUI of the job then function createaMarker () createMarker (-1645.7694091797, 433.41793823242, 7.1796875) end addEventHandler("onClientResourceStart", root, createaMarker) function guiSetOn () guiSetVisible(youWindowVariableHere, true) showCursor(true) end addEventHandler("onClientMarkerHit", root, guiSetOn) Link to comment
Baseplate Posted October 31, 2012 Share Posted October 31, 2012 have you changed this guiSetVisible(youWindowVariableHere, true) ? Link to comment
DakiLLa Posted October 31, 2012 Share Posted October 31, 2012 Don't forget to use 'resourceRoot' instead of 'root' in on(Client)ResourceStart as it will fire the function the event attached to every time when any resource starts. Link to comment
Baseplate Posted October 31, 2012 Share Posted October 31, 2012 Thanks DakiLLa I forgot mate EDIT: Show us the script if you did then Link to comment
TAPL Posted October 31, 2012 Share Posted October 31, 2012 where i post it In the hell maybe or what do you think? Link to comment
[S.K] Posted October 31, 2012 Author Share Posted October 31, 2012 plz tell me where to post it Link to comment
TAPL Posted October 31, 2012 Share Posted October 31, 2012 plz tell me where to post it is this a joke? Post it here dude! Link to comment
[S.K] Posted October 31, 2012 Author Share Posted October 31, 2012 ok as you want function createTheGate () gate1 = createObject ( 980, 96.638481140137, 1919.9578857422, 18.146516799927, 0, 0, 90 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( ) moveObject ( gate1, 980, 2237.6000976563, 2784.8999023438, 12.60000038147 ) setTimer ( movingMyGateBack, 5000, 1 ) end addCommandHandler("salman",openMyGate) function movingMyGateBack () moveObject ( gate1, 980, 96.638481140137, 1919.9578857422, 18.146516799927 ) end Link to comment
AhmadQTR Posted October 31, 2012 Share Posted October 31, 2012 ok as you want function createTheGate () gate1 = createObject ( 980, 96.638481140137, 1919.9578857422, 18.146516799927, 0, 0, 90 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( ) moveObject ( gate1, 980, 2237.6000976563, 2784.8999023438, 12.60000038147 ) setTimer ( movingMyGateBack, 5000, 1 ) end addCommandHandler("salman",openMyGate) function movingMyGateBack () moveObject ( gate1, 980, 96.638481140137, 1919.9578857422, 18.146516799927 ) end Please use [lua] [ /lua] again Link to comment
[S.K] Posted October 31, 2012 Author Share Posted October 31, 2012 i ask about this resourceRoot' where to post it in my script Link to comment
[S.K] Posted October 31, 2012 Author Share Posted October 31, 2012 (edited) ok how can i add more Turf to it local pArea = createRadarArea( 2130, 630, 200, 100, 0, 255, 0, 175 ) local pArea2 = createRadarArea( 2488.8793945313, 680.78289794922, 250, 130, 0, 255, 0, 175 ) local pCuboid = createColCuboid( 2133.1950683594, 633.66455078125, 10, 197.5, 92, 30 ) local pCuboid2 = createColCuboid( 2486.5935058594, 678.20172119141, 9.5689830780029, 245, 133, 30 ) local pArea3 = createRadarArea( 1858, 623, 140, 165, 0, 255, 0, 175 ) local pCuboid3 = createColCuboid( 1856.2864990234, 627.07629394531, 9, 138.25, 152.75, 30 ) local pArea4 = createRadarArea( 1577, 663, 180, 130, 0, 255, 0, 175 ) local pCuboid4 = createColCuboid( 1576.8956298828, 662.84362792969, 9.671875, 181, 120.5, 30 ) local pArea4 = createRadarArea( 2778, 834, 110, 190, 0, 255, 0, 175 ) local pCuboid4 = createColCuboid( 2777.4248046875, 833.88018798828, 9.6484375, 113.5, 188, 30 ) addEventHandler("onResourceStart",resourceRoot,function() outputDebugString("Turf system by Enjoy ( manve ) |~| Has been turned on!") -- Please don't remove this =) end ) function info() ---- dont remove this please outputChatBox("------||~ INFO ~||------",source,0,255,0) outputChatBox("Made by: Salman",source,255,255,0) outputChatBox("Helpers: Salman Community ",source,255,255,0) outputChatBox("Testers: Enjoy ",source,255,255,0) outputChatBox("Have Fun turfing",source,255,255,0) outputChatBox("------||~ END ~||------",source,255,0,0) end addEventHandler("onPlayerJoin", root, info) addEventHandler( 'onColShapeHit', root, function( p ) -- you should have added player param here if (getPlayerTeam( p )) then if( source == pCuboid ) then outputChatBox("------||~ INFO ~||------", p, 0,255,0) outputChatBox("Turf owners: coming soon!", p, 255,255,0) outputChatBox("Taken time: 10minutes.", p, 255,255,0) outputChatBox("Wait 10min to take turf.", p, 255,255,0) outputChatBox("------||~ END ~||------", p, 255,0,0) setRadarAreaFlashing( pArea, true ) local pTeam = getPlayerTeam( p ) -- source is the col shape, you should use 'p', the player arg local iR, iG, iB = getTeamColor( pTeam ) setTimer( function() setRadarAreaColor (pArea, iR, iG, iB, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea, false ) end, 600000, 1 ) end else outputChatBox("Get in a group first!",p, 255, 0, 0) end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) end end ) ----------------------------- addEventHandler( 'onColShapeHit', root, function( p ) -- you should have added player param here if (getPlayerTeam( p )) then if( source == pCuboid2 ) then outputChatBox("------||~ INFO ~||------", p, 0,255,0) outputChatBox("Turf owners: coming soon!", p, 255,255,0) outputChatBox("Taken time: 10minutes.", p, 255,255,0) outputChatBox("Wait 10min to take turf.", p, 255,255,0) outputChatBox("------||~ END ~||------", p, 255,0,0) setRadarAreaFlashing( pArea2, true ) local pTeam2 = getPlayerTeam( p ) -- source is the col shape, you should use 'p', the player arg local iR2, iG2, iB2 = getTeamColor( pTeam2 ) setTimer( function() setRadarAreaColor (pArea2, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea2, false ) end, 600000, 1 ) end else outputChatBox("Get in a group first!",p, 255, 0, 0) end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid2 ) then setRadarAreaFlashing( pArea2, false ) end end ) ------------------------------------ addEventHandler( 'onColShapeHit', root, function( p ) -- you should have added player param here if (getPlayerTeam( p )) then if( source == pCuboid3 ) then outputChatBox("------||~ INFO ~||------", p, 0,255,0) outputChatBox("Turf owners: coming soon!", p, 255,255,0) outputChatBox("Taken time: 10minutes.", p, 255,255,0) outputChatBox("Wait 10min to take turf.", p, 255,255,0) outputChatBox("------||~ END ~||------", p, 255,0,0) setRadarAreaFlashing( pArea3, true ) local pTeam3 = getPlayerTeam( p ) -- source is the col shape, you should use 'p', the player arg local iR2, iG2, iB2 = getTeamColor( pTeam3 ) setTimer( function() setRadarAreaColor (pArea3, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea3, false ) end, 600000, 1 ) end else outputChatBox("Get in a group first!",p, 255, 0, 0) end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid3 ) then setRadarAreaFlashing( pArea3, false ) end end ) ------------------------------------- addEventHandler( 'onColShapeHit', root, function( p ) -- you should have added player param here if (getPlayerTeam( p )) then if( source == pCuboid4 ) then outputChatBox("------||~ INFO ~||------", p, 0,255,0) outputChatBox("Turf owners: coming soon!", p, 255,255,0) outputChatBox("Taken time: 10minutes.", p, 255,255,0) outputChatBox("Wait 10min to take turf.", p, 255,255,0) outputChatBox("------||~ END ~||------", p, 255,0,0) setRadarAreaFlashing( pArea4, true ) local pTeam4 = getPlayerTeam( p ) -- source is the col shape, you should use 'p', the player arg local iR2, iG2, iB2 = getTeamColor( pTeam4 ) setTimer( function() setRadarAreaColor (pArea4, iR2, iG2, iB2, 100); givePlayerMoney( p, 4000 ); outputChatBox( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ); setRadarAreaFlashing( pArea4, false ) end, 600000, 1 ) end else outputChatBox("Get in a group first!",p, 255, 0, 0) end end ) addEventHandler( 'onColShapeLeave', root, function( ) if( source == pCuboid4 ) then setRadarAreaFlashing( pArea4, false ) end end ) Edited October 31, 2012 by Guest Link to comment
Baseplate Posted October 31, 2012 Share Posted October 31, 2012 Huh? wtf? I'mma just get out of this topic learn SCRIPTING FIRST Link to comment
Recommended Posts