Jump to content

كود مهم


RLP[Farouk]

Recommended Posts

السلام عليكم

شباب بدي كود يظهر الكلام في الشاشه مش بالشات

مثلا, انا حرامي وبدي اركب سيارة شرطة وبكتب

You can not enter the vehicle

الكلام ده بدي يطلع في الشاشة في اي مكان تحت او فوق مش بالشات

:cry:

Link to comment

شباب هيك صح ؟؟؟

function lockenterVehicle ( player, seat, jacked ) 
    if ( lockVehicles[getElementModel ( source )] ) and ( not lockSkins[getElementModel ( player )] ) and ( seat == 0 ) then 
            cancelEvent() 
          dxDrawText ( "*You can't get in this vehicle.", player , 255, 00, 00) 
    end 
end 

Link to comment

طيب هيك مظبوط؟؟؟

function lockenterVehicle ( player, seat, jacked ) 
    if ( lockVehicles[getElementModel ( source )] ) and ( not lockSkins[getElementModel ( player )] ) and ( seat == 0 ) then 
            cancelEvent() 
          GUIEditor_Label[1] = guiCreateLabel(328,549,157,19,"You can't enter this vehicle.",false) 
    end 
end 

شباب رجاءً تحملوني شوي :oops:

Link to comment

Client Side

  
theLabel = guiCreateLabel(328,549,157,19,"",false) 
  
addEvent("EnterNote",true) 
addEventHandler("EnterNote",root, 
    function() 
        guiSetText(theLabel,"You can't enter this vehicle.") 
    end 
)    
  
addEvent("ExitNote",true) 
addEventHandler("ExitNote",root, 
    function() 
        guiSetText(theLabel,"")      
    end 
) 
  

Server Side

  
function lockenterVehicle ( thePlayer ) 
    local ID = getElementModel(getPedOccupiedVehicle(thePlayer)) 
    if ( ID == 596 or ID == 597 or ID == 598 or ID == 599 ) then 
        cancelEvent() 
        triggerClientEvent(thePlayer,"EnterNote",thePlayer) 
    end 
end 
addEventHandler("onVehicleEnter",root,lockenterVehicle) 
  
function ExitVehicle ( thePlayer ) 
    triggerClientEvent(thePlayer,"ExitNote",thePlayer) 
end 
addEventHandler("onVehicleExit",root,ExitVehicle) 
  

Link to comment

مش ظابطه معي :x

بعطيكم الكود كامل

انا ما عدلت عليه شي

سيرفر

lockVehicles = { [470]=true } --sets the lock vehicles 
lockSkins = { [287] =true } -- sets the lock skins 
lockMedicVeiculos = {  
[416] = true ; 
}  -- sets the lock skins 
lockMedicSkin = { 
[274] = true ; 
[275] = true ; 
[276] = true ; 
} -- sets the lock skins 
lockBomberVehicle = { 
[277] = true ;  
[407] = true ; 
[544] = true ; 
} -- sets the lock skins 
lockBomberSkin = { 
[277] = true ;  
[278] = true ; 
[279] = true ; 
}  -- sets the lock skins 
lockPoliceVeiculos = {  
[598] = true ; 
[523] = true ;  
[427] = true ;  
[596] = true ;  
[597] = true ;  
[599] = true ;  
[428] = true ;  
[601] = true ; 
} -- sets the lock skins 
lockPoliceSkin = {  
[280] = true ;  
[281] = true ;  
[282] = true ;  
[283] = true ;  
[284] = true ;  
[285] = true ;  
[286] = true ;  
[287] = true ;  
[288] = true ; 
} -- sets the lock skins 
  
function lockenterVehicle ( player, seat, jacked ) 
    if ( lockVehicles[getElementModel ( source )] ) and ( not lockSkins[getElementModel ( player )] ) and ( seat == 0 ) then 
            cancelEvent() 
        outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) 
    end 
end 
  
addEventHandler ( "onVehicleStartEnter", getRootElement(), lockenterVehicle ) 
  
function lockPolice ( player, seat, jacked ) 
    if ( lockPoliceVeiculos[getElementModel ( source )] ) and ( not lockPoliceSkin[getElementModel ( player )] ) and ( seat == 0 ) then 
            cancelEvent() 
        outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPolice ) 
  
function lockMedic ( player, seat, jacked ) 
    if ( lockMedicVeiculos[getElementModel ( source )] ) and ( not lockMedicSkin[getElementModel ( player )] ) and ( seat == 0 ) then 
            cancelEvent() 
        outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), lockMedic ) 
  
function lockBomber ( player, seat, jacked ) 
    if ( lockBomberVehicle[getElementModel ( source )] ) and ( not lockBomberSkin[getElementModel ( player )] ) and ( seat == 0 ) then 
            cancelEvent() 
        outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), lockBomber ) 

Link to comment

هذا الكود شغال بدله بدل كودك

وبعدين مايحتاج انك كل مره تكرر نفس الحدث

onVehicleStartEnter

  
  
lockVehicles = { [470]=true } --sets the lock vehicles 
  
lockSkins = { [287] =true } -- sets the lock skins 
  
lockMedicVeiculos = { 
[416] = true ; 
}  -- sets the lock skins 
lockMedicSkin = { 
[274] = true ; 
[275] = true ; 
[276] = true ; 
} -- sets the lock skins 
lockBomberVehicle = { 
[277] = true ; 
[407] = true ; 
[544] = true ; 
} -- sets the lock skins 
lockBomberSkin = { 
[277] = true ; 
[278] = true ; 
[279] = true ; 
}  -- sets the lock skins 
lockPoliceVeiculos = { 
[598] = true ; 
[523] = true ; 
[427] = true ; 
[596] = true ; 
[597] = true ; 
[599] = true ; 
[428] = true ; 
[601] = true ; 
} -- sets the lock skins 
lockPoliceSkin = { 
[280] = true ; 
[281] = true ; 
[282] = true ; 
[283] = true ; 
[284] = true ; 
[285] = true ; 
[286] = true ; 
[287] = true ; 
[288] = true ; 
} -- sets the lock skins 
  
function lockenterVehicle ( player, seat, jacked ) 
  
    if ( lockVehicles [ getElementModel ( source ) ] ) and ( not lockSkins [ getElementModel ( player ) ] ) then 
            cancelEvent() 
        outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) 
         
    elseif ( lockPoliceVeiculos [ getElementModel ( source ) ] ) and ( not lockPoliceSkin [ getElementModel ( player ) ] ) then 
            cancelEvent() 
        outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) 
         
    elseif ( lockMedicVeiculos [ getElementModel ( source ) ] ) and ( not lockMedicSkin [ getElementModel ( player ) ] ) then 
            cancelEvent() 
        outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00) 
         
    elseif ( lockBomberVehicle [ getElementModel ( source ) ] ) and ( not lockBomberSkin [ getElementModel ( player ) ] ) then 
            cancelEvent() 
            outputChatBox ( "*You can't get in this vehicle.", player , 255, 00, 00)     
             
    end  
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), lockenterVehicle ) 
  
  
  

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