ذا الكود عملت منه اكثر من مود و اسم مارك غير و احداث غير و غيرت اسم زر لكنه يعطي على قد عدد مودات عملتها مثله
yazan1 = createMarker( 1556, -1608.4000244141, 13.39999961853, "cylinder", 2, 255, 25, 90, 250)
GUIEditor_Window = {}
GUIEditor_Button = {}
GUIEditor_Label = {}
GUIEditor_Window[1] = guiCreateWindow(258,129,228,368,"By yaZan",false)
guiSetVisible(GUIEditor_Window[1],false)
GUIEditor_Button[1] = guiCreateButton(32,66,173,70,"LS",false,GUIEditor_Window[1])
GUIEditor_Label[1] = guiCreateLabel(17,25,197,36,"police car",false,GUIEditor_Window[1])
GUIEditor_Button[6] = guiCreateButton(34,138,173,70,"HPv1000",false,GUIEditor_Window[1])
GUIEditor_Button[3] = guiCreateButton(34,209,173,70,"Enforcer",false,GUIEditor_Window[1])
GUIEditor_Button[4] = guiCreateButton(34,280,173,70,"ranger",false,GUIEditor_Window[1])
function open(hitPlayer)
if hitPlayer == localPlayer then
local team = getPlayerTeam(hitPlayer)
if team and getTeamName(team) == "police" then
guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1]))
showCursor(guiGetVisible(GUIEditor_Window[1]))
guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1]))
end
end
end
addEventHandler("onClientMarkerHit",yazan1,open)
function givecar(id)
triggerServerEvent("givecar",localPlayer,id)
guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1]))
showCursor(guiGetVisible(GUIEditor_Window[1]))
guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1]))
end
addEventHandler( "onClientGUIClick", root,
function ()
if ( source == GUIEditor_Button[1] ) then
givecar(596)
elseif ( source == GUIEditor_Button[6] ) then
givecar(523)
elseif ( source == GUIEditor_Button[3] ) then
givecar(427)
elseif ( source == GUIEditor_Button[4] ) then
givecar(599)
end
end
)
Vehicles = {}
addEvent ( "givecar", true )
addEventHandler ( "givecar", root,
function ( id )
if Vehicles [ source ] then
destroyElement ( Vehicles [ source ] )
end
if tonumber( id ) then
local x, y, z = getElementPosition ( source )
Vehicles [ source ] = createVehicle ( tonumber( id ), x, y, z )
if Vehicles [ source ] then
warpPedIntoVehicle ( source, Vehicles [ source ] )
end
end
end
)