Jump to content

اكواد هامة لبرمجة المقرات


Recommended Posts

اليوم حبيت اطرح عليكم اكواد برمجة حق مقرات اول شي البوابة

door1 = createObject(16775,2139.3994140625,607.099609375,20.299999237061,0,0,359.98352050781) 
markerDoor1 = createMarker(2139,608.20001220703,17.39999961853,"cylinder",9,0,0,0,0) 
  
  
addEventHandler("onMarkerHit",root, 
function ( hPlayer ) 
if ( source == markerDoor1 ) then 
if getElementData( hPlayer, 'Group' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' then 
moveObject( door1, 2000,2139.3994140625,607.099609375,25 ) 
else 
outputChatBox( 'Only '..groupName..' !', hPlayer, 255, 0, 255 ) 
end 

ثاني شيئ ماركر الانتقال من مكان الى ثاني

jail = createMarker(2066,455.7998046875,16.39999961853,"corona",2,0,0,0,0) 
outJail = createMarker(2062.19921875,446.3994140625,17.39999961853,"corona",2,0,0,0,0) 
  
elseif ( source == jail ) then 
if not isPedInVehicle( hPlayer ) then 
setElementPosition( hPlayer, 2067,447,18 ) 
outputChatBox('Welcome To HDAM Jail \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />', hPlayer, 0,255,0) 
end 
elseif ( source == outJail ) then 
if getElementData( hPlayer, 'Group' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' and not isPedInVehicle( hPlayer ) then 
setElementPosition( hPlayer, 2069,463,18) 

ثالث شيئ ماركر حق الدم والدرع

health1 = createMarker(2123.8994140625,528.2998046875,16.39999961853,"cylinder",5,0,0,0,0) 
addEventHandler("onMarkerHit",root, 
function ( hPlayer ) 
if ( source == health1 )then 
if getElementData( hPlayer, 'Group' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' then 
setElementHealth( hPlayer, 100 ) 
setPedArmor( hPlayer, 100 ) 
giveWeapon( hPlayer, 46 ) 
end 
) 

رابع شيئ ماركر تصليح السيارات fix car

fix = createMarker(2065.2998046875,605.599609375,16,"cylinder",4,0,0,0,0) 
  
  
getElementData( hPlayer, 'Group' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' then 
fixVehicle( getPedOccupiedVehicle( hPlayer ) ) 
addVehicleUpgrade ( getPedOccupiedVehicle( hPlayer ), 1010 ) 
addVehicleUpgrade ( getPedOccupiedVehicle( hPlayer ), 1087 ) 
end 
) 

واخيرا والاكثر طلب ماركر حق السيارات قائمة

توضع في ملف سيرفر

ش 
TableCars = {} 
  
addEvent('gvoa', true) 
addEventHandler('gvoa', root, 
function( nameCar ) 
if isElement( TableCars[source] ) then destroyElement( TableCars[source] ) end 
local id = getVehicleModelFromName( nameCar ) 
if id == 487 or id == 548 then  
local x, y, z = unpack( AircraftIdSpawn[math.random(#AircraftIdSpawn)] ) 
TableCars[source] = createVehicle( id, x, y, z )  
if not TableCars[source] then  
return end  
warpPedIntoVehicle ( source, TableCars[source] )  
return end 
local x,y,z = getElementPosition( source ) 
TableCars[source] = createVehicle( id, x,y,z ) 
if not TableCars[source] then return end 
warpPedIntoVehicle ( source, TableCars[source] )    
addVehicleUpgrade(TableCars[source], 1147) 
addVehicleUpgrade(TableCars[source], 1041) 
addVehicleUpgrade(TableCars[source], 1035) 
addVehicleUpgrade(TableCars[source], 1010) 
addVehicleUpgrade(TableCars[source], 1171) 
addVehicleUpgrade(TableCars[source], 1149) 
setVehiclePaintjob(TableCars[source], 1) 
end 
) 
  
addEventHandler('onPlayerQuit', root, 
function() 
    if isElement( TableCars[source] ) then 
        destroyElement( TableCars[source] ) 
    end 
end 
) 
  
addEventHandler("onVehicleStartEnter", getResourceRootElement(getThisResource()), 
 function(player,seat) 
  if getElementData( player, 'Group' ) == groupName and getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'No Team' then return end 
    if seat == 0 then 
    outputChatBox("Group " .. groupName .. " Only", player, 255, 0, 0, true) 
    cancelEvent() 
  end 
end 
) 

وحق ماركر السيارات ايضا بس بملف كلينت

GUIEditor_Button = {} 
GUIEditor_Grid = {} 
GUIEditor_Marker = {} 
GUIEditor_Window = {} 
local marker = {} 
local groupName = 'هنا اسم العصابة' 
vehicleId = {510,434,548,487,522,463,556,431,535,409,562,560} 
marker = createMarker(2065.1000976563,538.40002441406,16.39999961853,"cylinder",3,0,0,0,255) 
  
  
local x,y = guiGetScreenSize() 
local x = x - 208 
local y = y - 321 
GUIEditor_Window[1] = guiCreateWindow(500,147,246,413,"Select Car",false) 
guiSetVisible(GUIEditor_Window[1],false) 
guiSetAlpha(GUIEditor_Window[1],1) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
GUIEditor_Grid[1] = guiCreateGridList(9,34,228,255,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
column = guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",0.5) 
GUIEditor_Button[2] = guiCreateButton(20,308,210,41,"Select",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(20,352,210,41,"Close",false,GUIEditor_Window[1]) 
  
  
  
for i,id in ipairs ( vehicleId ) do 
guiGridListSetItemText ( GUIEditor_Grid[1], guiGridListAddRow( GUIEditor_Grid[1] ), column, getVehicleNameFromModel( id ), false, false ) 
end 
  
addEventHandler ("onClientMarkerHit", marker,  
function( player ) 
    if getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'No Team' and not isPedInVehicle( player ) and player == localPlayer and getElementData ( player , "Group" ) == groupName then 
  
                x999,y999,z999 = getElementPosition( localPlayer )  
                setElementFrozen ( localPlayer, true ) 
                guiSetVisible(GUIEditor_Window[1],true) 
                showCursor( true ) 
                end 
                end 
                ) 
  
addEventHandler('onClientGUIClick', root, 
function() 
    if ( source == GUIEditor_Button[1] ) then 
        guiSetVisible(GUIEditor_Window[1],false) 
        showCursor( false ) 
        setElementFrozen ( localPlayer, false ) 
    elseif ( source == GUIEditor_Button[2] ) then 
        local name = guiGridListGetItemText( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) 
        triggerServerEvent('gvoa', getLocalPlayer(), name) 
        guiSetVisible(GUIEditor_Window[1],false) 
        setElementFrozen ( localPlayer, false ) 
        showCursor( false ) 
    end 
end 
) 
  
  
  

ملاحظة الاكواد كلها بملف سيرفر الا حق السيارات الاخير بكلينت

Edited by Guest
Link to comment
اليوم حبيت اطرح عليكم اكواد برمجة حق مقرات اول شي البوابة
door1 = createObject(16775,2139.3994140625,607.099609375,20.299999237061,0,0,359.98352050781) 
markerDoor1 = createMarker(2139,608.20001220703,17.39999961853,"cylinder",9,0,0,0,0) 
  
  
addEventHandler("onMarkerHit",root, 
function ( hPlayer ) 
if ( source == markerDoor1 ) then 
if getElementData( hPlayer, 'Group' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' then 
moveObject( door1, 2000,2139.3994140625,607.099609375,25 ) 
else 
outputChatBox( 'Only '..groupName..' !', hPlayer, 255, 0, 255 ) 
end 

ثاني شيئ ماركر الانتقال من مكان الى ثاني

jail = createMarker(2066,455.7998046875,16.39999961853,"corona",2,0,0,0,0) 
outJail = createMarker(2062.19921875,446.3994140625,17.39999961853,"corona",2,0,0,0,0) 
  
elseif ( source == jail ) then 
if not isPedInVehicle( hPlayer ) then 
setElementPosition( hPlayer, 2067,447,18 ) 
outputChatBox('Welcome To HDAM Jail \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />', hPlayer, 0,255,0) 
end 
elseif ( source == outJail ) then 
if getElementData( hPlayer, 'Group' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' and not isPedInVehicle( hPlayer ) then 
setElementPosition( hPlayer, 2069,463,18) 

ثالث شيئ ماركر حق الدم والدرع

health1 = createMarker(2123.8994140625,528.2998046875,16.39999961853,"cylinder",5,0,0,0,0) 
addEventHandler("onMarkerHit",root, 
function ( hPlayer ) 
if ( source == health1 )then 
if getElementData( hPlayer, 'Group' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' then 
setElementHealth( hPlayer, 100 ) 
setPedArmor( hPlayer, 100 ) 
giveWeapon( hPlayer, 46 ) 
end 
) 

رابع شيئ ماركر تصليح السيارات fix car

fix = createMarker(2065.2998046875,605.599609375,16,"cylinder",4,0,0,0,0) 
  
  
getElementData( hPlayer, 'Group' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' then 
fixVehicle( getPedOccupiedVehicle( hPlayer ) ) 
addVehicleUpgrade ( getPedOccupiedVehicle( hPlayer ), 1010 ) 
addVehicleUpgrade ( getPedOccupiedVehicle( hPlayer ), 1087 ) 
end 
) 

واخيرا والاكثر طلب ماركر حق السيارات قائمة

توضع في ملف سيرفر

ش 
TableCars = {} 
  
addEvent('gvoa', true) 
addEventHandler('gvoa', root, 
function( nameCar ) 
if isElement( TableCars[source] ) then destroyElement( TableCars[source] ) end 
local id = getVehicleModelFromName( nameCar ) 
if id == 487 or id == 548 then  
local x, y, z = unpack( AircraftIdSpawn[math.random(#AircraftIdSpawn)] ) 
TableCars[source] = createVehicle( id, x, y, z )  
if not TableCars[source] then  
return end  
warpPedIntoVehicle ( source, TableCars[source] )  
return end 
local x,y,z = getElementPosition( source ) 
TableCars[source] = createVehicle( id, x,y,z ) 
if not TableCars[source] then return end 
warpPedIntoVehicle ( source, TableCars[source] )    
addVehicleUpgrade(TableCars[source], 1147) 
addVehicleUpgrade(TableCars[source], 1041) 
addVehicleUpgrade(TableCars[source], 1035) 
addVehicleUpgrade(TableCars[source], 1010) 
addVehicleUpgrade(TableCars[source], 1171) 
addVehicleUpgrade(TableCars[source], 1149) 
setVehiclePaintjob(TableCars[source], 1) 
end 
) 
  
addEventHandler('onPlayerQuit', root, 
function() 
    if isElement( TableCars[source] ) then 
        destroyElement( TableCars[source] ) 
    end 
end 
) 
  
addEventHandler("onVehicleStartEnter", getResourceRootElement(getThisResource()), 
 function(player,seat) 
  if getElementData( player, 'Group' ) == groupName and getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'No Team' then return end 
    if seat == 0 then 
    outputChatBox("Group " .. groupName .. " Only", player, 255, 0, 0, true) 
    cancelEvent() 
  end 
end 
) 

وحق ماركر السيارات ايضا بس بملف كلينت

GUIEditor_Button = {} 
GUIEditor_Grid = {} 
GUIEditor_Marker = {} 
GUIEditor_Window = {} 
local marker = {} 
local groupName = 'HDAM' 
vehicleId = {510,434,548,487,522,463,556,431,535,409,562,560} 
marker = createMarker(2065.1000976563,538.40002441406,16.39999961853,"cylinder",3,0,0,0,255) 
  
  
local x,y = guiGetScreenSize() 
local x = x - 208 
local y = y - 321 
GUIEditor_Window[1] = guiCreateWindow(500,147,246,413,"Select Car",false) 
guiSetVisible(GUIEditor_Window[1],false) 
guiSetAlpha(GUIEditor_Window[1],1) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
GUIEditor_Grid[1] = guiCreateGridList(9,34,228,255,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
column = guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",0.5) 
GUIEditor_Button[2] = guiCreateButton(20,308,210,41,"Select",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(20,352,210,41,"Close",false,GUIEditor_Window[1]) 
  
  
  
for i,id in ipairs ( vehicleId ) do 
guiGridListSetItemText ( GUIEditor_Grid[1], guiGridListAddRow( GUIEditor_Grid[1] ), column, getVehicleNameFromModel( id ), false, false ) 
end 
  
addEventHandler ("onClientMarkerHit", marker,  
function( player ) 
    if getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'No Team' and not isPedInVehicle( player ) and player == localPlayer and getElementData ( player , "Group" ) == groupName then 
  
                x999,y999,z999 = getElementPosition( localPlayer )  
                setElementFrozen ( localPlayer, true ) 
                guiSetVisible(GUIEditor_Window[1],true) 
                showCursor( true ) 
                end 
                end 
                ) 
  
addEventHandler('onClientGUIClick', root, 
function() 
    if ( source == GUIEditor_Button[1] ) then 
        guiSetVisible(GUIEditor_Window[1],false) 
        showCursor( false ) 
        setElementFrozen ( localPlayer, false ) 
    elseif ( source == GUIEditor_Button[2] ) then 
        local name = guiGridListGetItemText( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) 
        triggerServerEvent('gvoa', getLocalPlayer(), name) 
        guiSetVisible(GUIEditor_Window[1],false) 
        setElementFrozen ( localPlayer, false ) 
        showCursor( false ) 
    end 
end 
) 
  
  
  

ملاحظة الاكواد كلها بملف سيرفر الا حق السيارات الاخير بكلينت

:bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka: :bazooka:

Link to comment
اليوم حبيت اطرح عليكم اكواد برمجة حق مقرات اول شي البوابة
door1 = createObject(16775,2139.3994140625,607.099609375,20.299999237061,0,0,359.98352050781) 
markerDoor1 = createMarker(2139,608.20001220703,17.39999961853,"cylinder",9,0,0,0,0) 
  
  
addEventHandler("onMarkerHit",root, 
function ( hPlayer ) 
if ( source == markerDoor1 ) then 
if getElementData( hPlayer, 'Group' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' then 
moveObject( door1, 2000,2139.3994140625,607.099609375,25 ) 
else 
outputChatBox( 'Only '..groupName..' !', hPlayer, 255, 0, 255 ) 
end 

ثاني شيئ ماركر الانتقال من مكان الى ثاني

jail = createMarker(2066,455.7998046875,16.39999961853,"corona",2,0,0,0,0) 
outJail = createMarker(2062.19921875,446.3994140625,17.39999961853,"corona",2,0,0,0,0) 
  
elseif ( source == jail ) then 
if not isPedInVehicle( hPlayer ) then 
setElementPosition( hPlayer, 2067,447,18 ) 
outputChatBox('Welcome To HDAM Jail \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />', hPlayer, 0,255,0) 
end 
elseif ( source == outJail ) then 
if getElementData( hPlayer, 'Group' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' and not isPedInVehicle( hPlayer ) then 
setElementPosition( hPlayer, 2069,463,18) 

ثالث شيئ ماركر حق الدم والدرع

health1 = createMarker(2123.8994140625,528.2998046875,16.39999961853,"cylinder",5,0,0,0,0) 
addEventHandler("onMarkerHit",root, 
function ( hPlayer ) 
if ( source == health1 )then 
if getElementData( hPlayer, 'Group' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' then 
setElementHealth( hPlayer, 100 ) 
setPedArmor( hPlayer, 100 ) 
giveWeapon( hPlayer, 46 ) 
end 
) 

رابع شيئ ماركر تصليح السيارات fix car

fix = createMarker(2065.2998046875,605.599609375,16,"cylinder",4,0,0,0,0) 
  
  
getElementData( hPlayer, 'Group' ) == groupName and getPlayerTeam( hPlayer ) and getTeamName( getPlayerTeam( hPlayer ) ) == 'No Team' then 
fixVehicle( getPedOccupiedVehicle( hPlayer ) ) 
addVehicleUpgrade ( getPedOccupiedVehicle( hPlayer ), 1010 ) 
addVehicleUpgrade ( getPedOccupiedVehicle( hPlayer ), 1087 ) 
end 
) 

واخيرا والاكثر طلب ماركر حق السيارات قائمة

توضع في ملف سيرفر

ش 
TableCars = {} 
  
addEvent('gvoa', true) 
addEventHandler('gvoa', root, 
function( nameCar ) 
if isElement( TableCars[source] ) then destroyElement( TableCars[source] ) end 
local id = getVehicleModelFromName( nameCar ) 
if id == 487 or id == 548 then  
local x, y, z = unpack( AircraftIdSpawn[math.random(#AircraftIdSpawn)] ) 
TableCars[source] = createVehicle( id, x, y, z )  
if not TableCars[source] then  
return end  
warpPedIntoVehicle ( source, TableCars[source] )  
return end 
local x,y,z = getElementPosition( source ) 
TableCars[source] = createVehicle( id, x,y,z ) 
if not TableCars[source] then return end 
warpPedIntoVehicle ( source, TableCars[source] )    
addVehicleUpgrade(TableCars[source], 1147) 
addVehicleUpgrade(TableCars[source], 1041) 
addVehicleUpgrade(TableCars[source], 1035) 
addVehicleUpgrade(TableCars[source], 1010) 
addVehicleUpgrade(TableCars[source], 1171) 
addVehicleUpgrade(TableCars[source], 1149) 
setVehiclePaintjob(TableCars[source], 1) 
end 
) 
  
addEventHandler('onPlayerQuit', root, 
function() 
    if isElement( TableCars[source] ) then 
        destroyElement( TableCars[source] ) 
    end 
end 
) 
  
addEventHandler("onVehicleStartEnter", getResourceRootElement(getThisResource()), 
 function(player,seat) 
  if getElementData( player, 'Group' ) == groupName and getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'No Team' then return end 
    if seat == 0 then 
    outputChatBox("Group " .. groupName .. " Only", player, 255, 0, 0, true) 
    cancelEvent() 
  end 
end 
) 

وحق ماركر السيارات ايضا بس بملف كلينت

GUIEditor_Button = {} 
GUIEditor_Grid = {} 
GUIEditor_Marker = {} 
GUIEditor_Window = {} 
local marker = {} 
local groupName = 'هنا اسم العصابة' 
vehicleId = {510,434,548,487,522,463,556,431,535,409,562,560} 
marker = createMarker(2065.1000976563,538.40002441406,16.39999961853,"cylinder",3,0,0,0,255) 
  
  
local x,y = guiGetScreenSize() 
local x = x - 208 
local y = y - 321 
GUIEditor_Window[1] = guiCreateWindow(500,147,246,413,"Select Car",false) 
guiSetVisible(GUIEditor_Window[1],false) 
guiSetAlpha(GUIEditor_Window[1],1) 
guiWindowSetSizable(GUIEditor_Window[1],false) 
GUIEditor_Grid[1] = guiCreateGridList(9,34,228,255,false,GUIEditor_Window[1]) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
column = guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",0.5) 
GUIEditor_Button[2] = guiCreateButton(20,308,210,41,"Select",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(20,352,210,41,"Close",false,GUIEditor_Window[1]) 
  
  
  
for i,id in ipairs ( vehicleId ) do 
guiGridListSetItemText ( GUIEditor_Grid[1], guiGridListAddRow( GUIEditor_Grid[1] ), column, getVehicleNameFromModel( id ), false, false ) 
end 
  
addEventHandler ("onClientMarkerHit", marker,  
function( player ) 
    if getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'No Team' and not isPedInVehicle( player ) and player == localPlayer and getElementData ( player , "Group" ) == groupName then 
  
                x999,y999,z999 = getElementPosition( localPlayer )  
                setElementFrozen ( localPlayer, true ) 
                guiSetVisible(GUIEditor_Window[1],true) 
                showCursor( true ) 
                end 
                end 
                ) 
  
addEventHandler('onClientGUIClick', root, 
function() 
    if ( source == GUIEditor_Button[1] ) then 
        guiSetVisible(GUIEditor_Window[1],false) 
        showCursor( false ) 
        setElementFrozen ( localPlayer, false ) 
    elseif ( source == GUIEditor_Button[2] ) then 
        local name = guiGridListGetItemText( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) 
        triggerServerEvent('gvoa', getLocalPlayer(), name) 
        guiSetVisible(GUIEditor_Window[1],false) 
        setElementFrozen ( localPlayer, false ) 
        showCursor( false ) 
    end 
end 
) 
  
  
  

ملاحظة الاكواد كلها بملف سيرفر الا حق السيارات الاخير بكلينت

end ياحبيبي نص الاكواد ناقص ..

وناقص قوس (

.. المهمم مشكور

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