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
هلأ صلحولي هذا فضلا وليس امراً