Jump to content

Need Help With Map


Blaawee

Recommended Posts

Posted

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

Posted

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

Posted
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.

Posted
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 ??

Posted
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.

Posted
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 ) 

Posted
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) 

Posted
outputChatBox ( "Your Weapon Has Been Taken", 255, 25, 0, true, thePlayer ) 

correct

outputChatBox ( "Your Weapon Has Been Taken", thePlayer, 255, 25, 0, true ) 

Posted

thx gays it's work :D

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 ??

Posted
thx gays it's work :D

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?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...