Jump to content

طلب مساعدة


MOMO3011

Recommended Posts

الويكي يعطيك امثلة

marker createMarker ( float x, float y, float z [, string theType = "checkpoint", float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255 ] ) 

ذا يقولك حق سيرفر : مرات يجي كذا ومرات غير

اوكك

تالي يقول

x: A floating point number representing the X coordinate on the map.  
y: A floating point number representing the Y coordinate on the map.  
z: A floating point number representing the Z coordinate on the map.  

روح جيب الاحداثيات وحطها

وضبط الباقي

ذا يقولك اوو !,, يشرح لكك الي استخدمته في الكود

theType: The visual type of the marker to be created. Possible values: "checkpoint": A race checkpoint. These are very tall, but not infinite, light pillars. Checkpoints snap to ground and become invisible after going over a certain Z height.

"ring": Doughnut shaped ring, normally used for aircraft.

"cylinder": Small glowing ground ring. These are the glow markers you walk into to activate missions or events in single player.

"arrow": Arrow pointing down. These are the arrows on the doors you can enter in single player, except MTA's are not animated by default.

"corona": A glowing ball of light.

size: The diameter of the marker to be created, in meters.

r: An integer number representing the amount of red to use in the colouring of the marker (0 - 255).

g: An integer number representing the amount of green to use in the colouring of the marker (0 - 255).

b: An integer number representing the amount of blue to use in the colouring of the marker (0 - 255).

a: An integer number representing the amount of alpha to use in the colouring of the marker (0 - 255 where 0 is transparent and 255 is opaque).

visibleTo: Every element that is a child of this element can see the marker. See visibility.

------

marker createMarker ( float x, float y, float z [, string theType = "checkpoint", float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255 ] ) 
  

ذا يقولكك كلنت

لازم تعرف وش كلنت ووش سيرفر !..

الحين يقولكك

نفس الي فوق !..

Required Arguments 
x: A floating point number representing the X coordinate on the map.  
y: A floating point number representing the Y coordinate on the map.  
z: A floating point number representing the Z coordinate on the map.  
  
Optional arguments 
  
NOTE: When using optional arguments, you must supply all arguments before the one you wish to use. For more information on optional arguments, see Optional Arguments.  
theType: The visual type of the marker to be created. Possible values: "checkpoint": A race checkpoint. These are very tall, but not infinite, light pillars. Checkpoints snap to ground and become invisible after going over a certain Z height.  
"ring": Doughnut shaped ring, normally used for aircraft.  
"cylinder": Small glowing ground ring. These are the glow markers you walk into to activate missions or events in single player.  
"arrow": Arrow pointing down. These are the arrows on the doors you can enter in single player, except MTA's are not animated by default.  
"corona": A glowing ball of light.  
  
size: The diameter of the marker to be created, in meters.  
r: An integer number representing the amount of red to use in the colouring of the marker (0 - 255).  
g: An integer number representing the amount of green to use in the colouring of the marker (0 - 255).  
b: An integer number representing the amount of blue to use in the colouring of the marker (0 - 255).  
a: An integer number representing the amount of alpha to use in the colouring of the marker (0 - 255 where 0 is transparent and 255 is opaque).  
  

يفهمكك ^_^

********************

يجيك مثال كامل

Example 1

-- this function is called whenever someone types 'createmarker' in the console: 
function consoleCreateMarker ( thePlayer, commandName ) 
   if ( thePlayer ) then 
      local x, y, z = getElementPosition ( thePlayer ) -- get the player's position 
      -- create a cylindrical marker next to the player: 
      local theMarker = createMarker ( x + 2, y + 2, z, "cylinder", 1.5, 255, 255, 0, 170 ) 
      if ( theMarker ) then -- check if the marker was created successfully 
         outputConsole ( "Marker created successfully", thePlayer ) 
      else 
         outputConsole ( "Failed to create marker", thePlayer ) 
      end 
   end 
end 
addCommandHandler ( "createmarker", consoleCreateMarker ) 
  

مثال ثاني

addCommandHandler("marker", -- Type In Console 'marker' To Create The Marker 
function ( player, commandName ) 
local x,y,z = getElementPosition ( player ) -- Get The Player's Position 
local Marker = createMarker(x,y,z-1, "cylinder", 2, 255, 0, 0) -- Create Marker To The Position Of Player 
end 
) 
  

هذا للماركر

!...

تقدر تسوي ماركر من دون كل ذول

createMarker(0,0,0-1, "cylinder", 2, 255, 0, 0) 

الاكواد من الويكي

------

انا جاي اقولك مثال على فنكشن

طبقه على باقي الفنكشات

Link to comment

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