Jump to content

x[استفسار]xابي كود


Recommended Posts

السلام عليكم ورحمة الله وبركاته للجميع,,

اريد ان تصنعولي كود في جيم مود الريس

وهو  ماركر اذا لمسته يعطيني اقدر اضرب صاروخ في الديربي (فقط صاروخ واحد)ء

مثال::

انا في سيرفر ديربي ,اذا لمست ماركر  يعطيني صاروخ في السيارة ,,

وشكرا لتعاونكم معي:x

Link to comment
server

marker createMarker ( 955,45,654 [, string theType = "corona", float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255, visibleTo = getRootElement( ) ] )

function MarkerHit ( hitPlayer, matchingDimension )
    outputChatBox ( getPlayerName(hitPlayer) .. " entered a marker" )
end
addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit )

function onPlayerTarget ( targetElem )
    -- if the targeted object is a haystack (an object with model ID 3374) remove it from the game
    if getElementType ( targetElem ) == "object" and getElementModel ( targetElem ) == 3374 then
        destroyElement ( targetElem )
    end
end
addEventHandler ( "onPlayerTarget", root, onPlayerTarget )    -- add above function as handler for targeting event

function showVehicleName ( thePlayer )
   local theVehicle = getPedOccupiedVehicle ( thePlayer )
   if theVehicle then
      outputChatBox ( "Name of the Vehicle: " .. getVehicleName ( theVehicle ), thePlayer )
   else
      outputChatBox ( "You do not have a Vehicle!", thePlayer, 255, 0, 0, true )
   end
end
addCommandHandler ( "getcarname", showVehicleName )

bool setElementData ( element theElement, string key, var value [, bool synchronize = true ] )

bool bindKey ( player thePlayer, string key, string keyState, function handlerFunction,  [ var arguments, ... ] )  -- وين اكتب ال bind key  الي اريده .

var getElementData ( element theElement, string key [, inherit = true] )


function shootProjectile()
    local vehicle = getPedOccupiedVehicle(localPlayer)
    -- Only create projectile if we are inside a vehicle
    if(vehicle)then
        local x, y, z = getElementPosition(vehicle)
        createProjectile(vehicle, 19, x, y, z)
    end
end

bindKey("vehicle_fire", "down", shootProjectile)

bool setElementData ( element theElement, string key, var value [, bool synchronize = true ] )

لو سمحتم صلحو .

end حطو له 

وكملو الاخطاء وكذا يا احبائي انا جربت اكواد الي طرحهن default.

ورح اجرب اكواد #Bross

هلأ صلحولي هذا فضلا وليس امراً

Edited by mohameeda
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...