Blaawee Posted October 22, 2011 Share Posted October 22, 2011 Hello i'm Back again ^^ i'v just made a battle field on map editor but i need help with this map @@ all i want to make : when player go out from the filed his weapon gone Link to comment
12p Posted October 22, 2011 Share Posted October 22, 2011 createColCuboid addEventHandler ( "onColShapeLeave" ) takeWeapon Link to comment
TAPL Posted October 22, 2011 Share Posted October 22, 2011 https://wiki.multitheftauto.com/wiki/CreateMarker https://wiki.multitheftauto.com/wiki/OnMarkerLeave https://wiki.multitheftauto.com/wiki/TakeAllWeapons Example local myMarker = createMarker( -2596.6259765625, 579.3583984375, 15.626741409302, "cylinder", 2.0, 255, 0, 0, 150 ) function markerLeave( leaveElement, matchingDimension ) if getElementType( leaveElement ) == "player" then takeAllWeapons ( leaveElement ) end end addEventHandler( "onMarkerLeave", myMarker, markerLeave ) or you can use Col Sphere too Link to comment
Blaawee Posted October 22, 2011 Author Share Posted October 22, 2011 (edited) EDIT Edited November 28, 2011 by Guest Link to comment
TAPL Posted October 22, 2011 Share Posted October 22, 2011 (edited) .. Edit: lol you edit your post yeah like this Edited October 22, 2011 by Guest Link to comment
12p Posted October 22, 2011 Share Posted October 22, 2011 local filed = createColCircle ( 1024, 1024, 15 ) function filedLeave ( thePlayer ) if getElementType ( thePlayer ) == "player" then takeAllWeapons (thePlayer) outputChatBox ( "Your Weapon Has Been Taken", thePlayer ) end end addEventHandler ( "onColShapeLeave", filed, filedLeave ) Handler function must be before the addEventHandler. Link to comment
Blaawee Posted October 22, 2011 Author Share Posted October 22, 2011 local filed = createColCircle ( 1024, 1024, 15 ) function filedLeave ( thePlayer ) if getElementType ( thePlayer ) == "player" then takeAllWeapons (thePlayer) outputChatBox ( "Your Weapon Has Been Taken", thePlayer ) end end addEventHandler ( "onColShapeLeave", filed, filedLeave ) Handler function must be before the addEventHandler. sure ?? Link to comment
12p Posted October 22, 2011 Share Posted October 22, 2011 Handler function must be before the addEventHandler. sure ?? Note: You have to add the command handler AFTER you defined the handler function, else it can't find it. The order of execution matters. From https://wiki.multitheftauto.com/wiki/Scr ... d_handlers Link to comment
Blaawee Posted October 22, 2011 Author Share Posted October 22, 2011 How should I take the coordinates of the filed ?? Link to comment
12p Posted October 22, 2011 Share Posted October 22, 2011 How should I take the coordinates of the filed ?? Try to specify the center of the field, get your coordinates with admin panel, and give them to the script. Link to comment
Blaawee Posted October 22, 2011 Author Share Posted October 22, 2011 o.k done , i want make bilps how ? Link to comment
Blaawee Posted October 22, 2011 Author Share Posted October 22, 2011 (edited) EDIT Edited November 28, 2011 by Guest Link to comment
Castillo Posted October 22, 2011 Share Posted October 22, 2011 createBlip ( 6 , 0 , 0 , 37 ) local arena = createColCircle ( 1024, 1024, 15 ) function filedLeave ( thePlayer ) if getElementType ( thePlayer ) == "player" then takeAllWeapons ( thePlayer ) outputChatBox ( "Your Weapon Has Been Taken", 255, 25, 0, true, thePlayer ) end end addEventHandler ( "onColShapeLeave", arena, filedLeave ) Link to comment
Blaawee Posted October 22, 2011 Author Share Posted October 22, 2011 done another problem i can't pick the weapon :@ and how extend the Colshape Link to comment
12p Posted October 22, 2011 Share Posted October 22, 2011 createColCircle Check the required arguments it has. Link to comment
Blaawee Posted October 22, 2011 Author Share Posted October 22, 2011 (edited) EDIT Edited November 28, 2011 by Guest Link to comment
Castillo Posted October 22, 2011 Share Posted October 22, 2011 createBlip ( -2083.7319335938, -189.05606079102, 35.3203125, 6 ) local Arena = createColCircle ( -2083.7319335938, -189.05606079102, 50 ) function ArenaHit ( thePlayer ) outputChatBox ( getPlayerName ( thePlayer ) .. " Is In The Field" ) -- to everyone right? end addEventHandler ( "onColShapeHit", Arena, ArenaHit ) function ArenaLeave ( thePlayer ) if getElementType ( thePlayer ) == "player" then takeAllWeapons ( thePlayer ) outputChatBox ( "Your Weapon Has Been Taken", 255, 25, 0, true, thePlayer ) end end addEventHandler ( "onColShapeLeave", Arena, ArenaLeave) Link to comment
TAPL Posted October 22, 2011 Share Posted October 22, 2011 outputChatBox ( "Your Weapon Has Been Taken", 255, 25, 0, true, thePlayer ) correct outputChatBox ( "Your Weapon Has Been Taken", thePlayer, 255, 25, 0, true ) Link to comment
Blaawee Posted October 22, 2011 Author Share Posted October 22, 2011 thx gays it's work is there any way to check is there any weapon then if getElementType ( thePlayer ) == "player" then takeAllWeapons ( thePlayer ) outputChatBox ( "Your Weapon Has Been Taken", thePlayer, 255, 25, 0, true ) end and other how to make pickup ?? Link to comment
Castillo Posted October 23, 2011 Share Posted October 23, 2011 thx gays it's work is there any way to check is there any weapon then if getElementType ( thePlayer ) == "player" then takeAllWeapons ( thePlayer ) outputChatBox ( "Your Weapon Has Been Taken", thePlayer, 255, 25, 0, true ) end and other how to make pickup ?? First, we're not GAYS! Second, what do you mean? Link to comment
Blaawee Posted October 23, 2011 Author Share Posted October 23, 2011 OMG Realy soooory i mean guys plzzz forgive me , my Bad :@ [solved] Thx Guys Link to comment
Blaawee Posted October 23, 2011 Author Share Posted October 23, 2011 i have a problem i can't pickup the weapon why ? [solved] 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