Jump to content

createObject


Mr.Mostafa

Recommended Posts

سلام عليكم

لما احاول اسوي اوبجكت بالايدي دا

يطلع ديبق خطا ان الايدي خطا

مع اني جايبه من الموقع , وش الحل

p_989kuo9p1.jpg

function consoleCreateObject ( thePlayer, commandName )
   if ( thePlayer ) then
      local x, y, z = getElementPosition ( thePlayer ) -- get the player's position
      -- create a Object next to the player:
      local theObject = createObject ( 19799, x + 2, y + 2, z, 0, 0, 0 )
      if ( theObject ) then -- check if the Obeject was created successfully
         outputConsole ( "Object created successfully", thePlayer )
      else
         outputConsole ( "Failed to create Object2", thePlayer )
      end
   end
end
addCommandHandler ( "createObject", consoleCreateObject )

 

Link to comment
1 hour ago, Mr.Mostafa said:

سلام عليكم

لما احاول اسوي اوبجكت بالايدي دا

يطلع ديبق خطا ان الايدي خطا

مع اني جايبه من الموقع , وش الحل

p_989kuo9p1.jpg


function consoleCreateObject ( thePlayer, commandName )
   if ( thePlayer ) then
      local x, y, z = getElementPosition ( thePlayer ) -- get the player's position
      -- create a Object next to the player:
      local theObject = createObject ( 19799, x + 2, y + 2, z, 0, 0, 0 )
      if ( theObject ) then -- check if the Obeject was created successfully
         outputConsole ( "Object created successfully", thePlayer )
      else
         outputConsole ( "Failed to create Object2", thePlayer )
      end
   end
end
addCommandHandler ( "createObject", consoleCreateObject )


 

server.lua

Link to comment

شكرا روك + 

المود كان شغال عادي , لكن حطيته في مود تاني صاير يجيب ديبق كدا

7 :  local theObject = createObject ( 22, x + 2, y + 2, z, 0, 0, 0 )

server.lua:7 : unexpected symbol near '

function consoleCreateObject ( thePlayer, commandName )
   if ( thePlayer ) then
      local x, y, z = getElementPosition ( thePlayer ) -- get the player's position
      -- create a Object next to the player:
      local theObject = createObject ( 22, x + 2, y + 2, z, 0, 0, 0 )
      if ( theObject ) then -- check if the Obeject was created successfully
         outputConsole ( "Object created successfully", thePlayer )
      else
         outputConsole ( "Failed to create Object2", thePlayer )
      end
   end
end
addCommandHandler ( "createObject2", consoleCreateObject )

 

Link to comment
3 minutes ago, Mr.Mostafa said:

اسحب علي الاوبجكت , بس كدا كدا ما يبي يشتغل ويطلع الخطا حق الديبق , مدري ليه ,

تيجي لما اغير المود بس

 صراحة صار معي نفس الشئ

بس لما مسحت السطر اللي بيجيني في الديبوق وكتبتوا نفس الشئ بيظبط خخ 

function consoleCreateObject ( thePlayer, commandName )
   if ( thePlayer ) then
      local x, y, z = getElementPosition ( thePlayer ) -- get the player's position
      -- create a Object next to the player:
	  local theObject = createObject ( 2634 , x + 2 , y + 2 , z , 0 , 0 , 0 )
      if ( theObject ) then -- check if the Obeject was created successfully
         outputChatBox ( "Object created successfully", thePlayer )
      else
         outputChatBox ( "Failed to create Object2", thePlayer )
      end
   end
end
addCommandHandler( 'createObject2' , consoleCreateObject )

 

Link to comment
4 minutes ago, KillerX said:

 صراحة صار معي نفس الشئ

بس لما مسحت السطر اللي بيجيني في الديبوق وكتبتوا نفس الشئ بيظبط خخ 


function consoleCreateObject ( thePlayer, commandName )
   if ( thePlayer ) then
      local x, y, z = getElementPosition ( thePlayer ) -- get the player's position
      -- create a Object next to the player:
	  local theObject = createObject ( 2634 , x + 2 , y + 2 , z , 0 , 0 , 0 )
      if ( theObject ) then -- check if the Obeject was created successfully
         outputChatBox ( "Object created successfully", thePlayer )
      else
         outputChatBox ( "Failed to create Object2", thePlayer )
      end
   end
end
addCommandHandler( 'createObject2' , consoleCreateObject )

 

اتوقع لانه نسخ من المنتدي

يمكن المنتدي لما تنسخ منه , يحصل للكود شي , الله اعلم

 

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