Adde Posted April 28, 2013 Share Posted April 28, 2013 Hello, in castillo´s script gang_system is the scoreboard column "Group" and then the name of the gang you are in. But how to continue this script so only players in example gang Glory can do this function below? please help. And btw, how do I set interior and dimension when I use createmarker? Or atleast dimension. marker1 = createMarker (-2639.30, 1406.47, 906.46,"cylinder",1.5,0,200,0,0) marker2 = createMarker (-2636.77, 1402.80, 906.46,"cylinder",1.5,0,200,0,0) function gangEntrence () account = getPlayerAccount(source) if is getElementData( "Glory") then setElementPosition(-2636.77, 1402.80, 906.46) end addEventHandler("onMarkerHit", marker1, gangEntrence) function gangExit () setElementPosition(-2639.30, 1406.47, 906.46) end addEventHandler("onMarkerHit", marker2, gangExit) Link to comment
iPrestege Posted April 28, 2013 Share Posted April 28, 2013 Hmm..you are getting the account ( source ) and source is the marker of this event . Link to comment
Castillo Posted April 28, 2013 Share Posted April 28, 2013 If you have the latest version of my resource, then you can use the function getPlayerGang exported fro mit. Then you can check like this on your script: marker1 = createMarker (-2639.30, 1406.47, 906.46,"cylinder",1.5,0,200,0,0) marker2 = createMarker (-2636.77, 1402.80, 906.46,"cylinder",1.5,0,200,0,0) function gangEntrence ( hitElement ) if ( getElementType ( hitElement ) == "player" ) then if ( exports [ "gang_system" ]:getPlayerGang ( hitElement ) == "Glory" ) then setElementPosition ( hitElement, -2636.77, 1402.80, 906.46 ) end end end addEventHandler ( "onMarkerHit", marker1, gangEntrence ) function gangExit ( hitElement ) if ( getElementType ( hitElement ) == "player" ) then if ( exports [ "gang_system" ]:getPlayerGang ( hitElement ) == "Glory" ) then setElementPosition ( hitElement, -2639.30, 1406.47, 906.46 ) end end end addEventHandler ( "onMarkerHit", marker2, gangExit ) Link to comment
Adde Posted April 28, 2013 Author Share Posted April 28, 2013 If you have the latest version of my resource, then you can use the function getPlayerGang exported fro mit.Then you can check like this on your script: marker1 = createMarker (-2639.30, 1406.47, 906.46,"cylinder",1.5,0,200,0,0) marker2 = createMarker (-2636.77, 1402.80, 906.46,"cylinder",1.5,0,200,0,0) function gangEntrence ( hitElement ) if ( getElementType ( hitElement ) == "player" ) then if ( exports [ "gang_system" ]:getPlayerGang ( hitElement ) == "Glory" ) then setElementPosition ( hitElement, -2636.77, 1402.80, 906.46 ) end end end addEventHandler ( "onMarkerHit", marker1, gangEntrence ) function gangExit ( hitElement ) if ( getElementType ( hitElement ) == "player" ) then if ( exports [ "gang_system" ]:getPlayerGang ( hitElement ) == "Glory" ) then setElementPosition ( hitElement, -2639.30, 1406.47, 906.46 ) end end end addEventHandler ( "onMarkerHit", marker2, gangExit ) Yes I have the latest, I will test Hmm, the markers wont show Link to comment
Castillo Posted April 28, 2013 Share Posted April 28, 2013 You have set the alpha to 0. Link to comment
Sasu Posted April 28, 2013 Share Posted April 28, 2013 If the alpha set 0 the marker will be invisible. Set 255 and will not be invisible. Link to comment
Adde Posted April 28, 2013 Author Share Posted April 28, 2013 works now. But marker 1 warps to itself. Link to comment
Sasu Posted April 28, 2013 Share Posted April 28, 2013 See the coordinates and change it. Link to comment
Castillo Posted April 28, 2013 Share Posted April 28, 2013 I did. I didn't say that you must set the alpha to 0, what I said is that you had it on 0, but had to be 255 or another value. Link to comment
Adde Posted April 28, 2013 Author Share Posted April 28, 2013 I did. I didn't say that you must set the alpha to 0, what I said is that you had it on 0, but had to be 255 or another value. Aha sorry, I misunderstood. Link to comment
Adde Posted April 28, 2013 Author Share Posted April 28, 2013 It works perfect now, thx guys. I had to use setElementInterior and setElementDimension because I used it in an other interior to. 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