Jump to content

شو الخطا


SycroX

Recommended Posts

السلام عليكم شو الخطا فلكود انا بحاول اصلح فيه لي ساعة ما عرفت

مو عارف وش المشكلة اصلان

  
VIPCar = {} 
  
function VIPCARs ( ) 
    if isPedInVehicle ( source ) then 
        exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 Exit your car first ! ",250,128,114,true) 
        cancelEvent () 
    else 
        x,y,z = getElementPosition ( source ) 
        if isElement(VIPCar[source]) then destroyElement(VIPCar[source]) end 
            VIPCar[source] = createVehicle ( 411, x, y, z ) 
            warpPlayerIntoVehicle ( source, VIPCar[source] ) 
            local text = "VIP Car" 
            exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 You Has Got VIP Car !",80,120,200,true) 
            setVehiclePlateText ( VIPCar[source], text ) 
            setVehicleDamageProof ( VIPCar[source], true ) 
        end 
    end 
addEvent( "VC", true ) 
addEventHandler( "VC", getRootElement(), VIPCARs ) 
  
addEventHandler ( "onVehicleStartEnter", resourceRoot, function ( thePlayer ) 
 if ( source == VIPCar ) then 
  local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
   if ( isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP1" ) ) ) then 
  outputChatBox ( "Welcome To Your Vehicle ", thePlayer, 255, 255, 0, true ) 
 else 
  cancelEvent ( ) 
   outputChatBox ( "You Must Be In VIP Group ", thePlayer, 255, 255, 0, true ) 
    end 
  end 
end 
) 
  

Link to comment
  
VIPCar = {} 
  
function VIPCARs ( ) 
    if isPedInVehicle ( source ) then 
        exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 Exit your car first ! ",250,128,114,true) 
        cancelEvent () 
    else 
        x,y,z = getElementPosition ( source ) 
        if isElement(VIPCar[source]) then destroyElement(VIPCar[source]) end 
            VIPCar[source] = createVehicle ( 411, x, y, z ) 
            warpPlayerIntoVehicle ( source, VIPCar[source] ) 
            local text = "VIP Car" 
            exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 You Has Got VIP Car !",80,120,200,true) 
            setVehiclePlateText ( VIPCar[source], text ) 
            setVehicleDamageProof ( VIPCar[source], true ) 
        end 
    end 
addEvent( "VC", true ) 
addEventHandler( "VC", getRootElement(), VIPCARs ) 
  
  
addEventHandler ( "onVehicleStartEnter", getRootElement(), 
    function ( player , seat ) 
     local acc = getPlayerAccount(player) 
    if source == VIPCar[source] then 
       if( isObjectInACLGroup("user."..getAccountName(acc),aclGetGroup("VIP1"))) then 
            outputChatBox ( "Welcome To Your Vehicle ", player, 255, 255, 0 ) 
        else 
            if ( seat == 0 ) then 
                cancelEvent ( ) 
                outputChatBox ( "You Must Be In VIP Group ", player, 255, 0, 0 ) 
                end  
            end 
        end 
    end 
)  

Link to comment
VIPCar = {} 
  
function VIPCARs ( ) 
    if isPedInVehicle ( source ) then 
        exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 Exit your car first ! ",250,128,114,true) 
        cancelEvent () 
    else 
        x,y,z = getElementPosition ( source ) 
        if isElement(VIPCar[source]) then destroyElement(VIPCar[source]) end 
            VIPCar[source] = createVehicle ( 411, x, y, z ) 
            warpPlayerIntoVehicle ( source, VIPCar[source] ) 
            local text = "VIP Car" 
            exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 You Has Got VIP Car !",80,120,200,true) 
            setVehiclePlateText ( VIPCar[source], text ) 
            setVehicleDamageProof ( VIPCar[source], true ) 
        end 
    end 
addEvent( "VC", true ) 
addEventHandler( "VC", getRootElement(), VIPCARs ) 
  
addEventHandler("onVehicleStartEnter", getResourceRootElement(getThisResource()), 
function(thePlayer) 
  local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
   if ( isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP1" ) ) ) then 
  outputChatBox ( "Welcome To Your Vehicle ", thePlayer, 255, 255, 0, true ) 
 else 
  cancelEvent() 
   outputChatBox ( "You Must Be In VIP Group ", thePlayer, 255, 255, 0, true ) 
    end 
end 
) 

الكود مجرب

Edited by Guest
Link to comment

addEventHandler ( "onVehicleStartEnter", resourceRoot, function ( thePlayer ) 
 if ( source == VIPCar ) then 
  local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
   if ( isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP1" ) ) ) then 
  outputChatBox ( "Welcome To Your Vehicle ", thePlayer, 255, 255, 0, true ) 
 else 
  cancelEvent ( ) 
   outputChatBox ( "You Must Be In VIP Group ", thePlayer, 255, 255, 0, true ) 
    end 
  end 
end 
) 

الكود هذا من هنا ؟

viewtopic.php?f=160&t=94121&p=845670#p845670

المهم جرب ذة

VIPCar = { } 
  
function VIPCARs ( ) 
    if ( isPedInVehicle ( source ) ) then 
        exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 Exit your car first ! ",250,128,114,true) 
        cancelEvent (   ) 
    end 
        x,y,z = getElementPosition ( source ) 
        if ( isElement ( VIPCar [ source ] ) ) then destroyElement ( VIPCar [ source ] ) end 
            VIPCar [ source ] = createVehicle ( 411, x, y, z ) 
            warpPlayerIntoVehicle ( source, VIPCar [ source ] ) 
            local text = "VIP Car" 
            exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 You Has Got VIP Car !",80,120,200,true) 
            setVehiclePlateText ( VIPCar [ source ], text ) 
            setVehicleDamageProof ( VIPCar [ source ], true ) 
        end 
addEvent( "VC", true ) 
addEventHandler( "VC", root, VIPCARs ) 
  
addEventHandler ( "onVehicleStartEnter", resourceRoot, function ( thePlayer ) 
 if ( source == VIPCar [ source ] ) then 
  local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
   if not ( isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP1" ) ) ) then 
   cancelEvent ( ) 
   outputChatBox ( "You Must Be In VIP Group ", thePlayer, 255, 255, 0, true ) 
 else 
   outputChatBox ( "Welcome To Your Vehicle ", thePlayer, 255, 255, 0, true ) 
    end 
  end 
end ) 
Link to comment

  
VIPCar = { } 
  
function VIPCARs (  ) 
    if ( isPedInVehicle ( source ) ) then 
        exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 Exit your car first ! ",250,128,114,true) 
        cancelEvent (   ) 
    end 
    x,y,z = getElementPosition ( source ) 
    if ( isElement ( VIPCar [ source ] ) ) then destroyElement ( VIPCar [ source ] ) end 
    VIPCar [ source ] = createVehicle ( 411, x, y, z ) 
    warpPlayerIntoVehicle ( source, VIPCar [ source ] ) 
    local text = "VIP Car" 
    exports["guimessages"]:outputServer(source,"#00ff00[VIP System] :#ffff00 You Has Got VIP Car !",80,120,200,true) 
    setVehiclePlateText ( VIPCar [ source ], text ) 
    setVehicleDamageProof ( VIPCar [ source ], true ) 
end 
addEvent( "VC", true ) 
addEventHandler( "VC", getRootElement(), VIPCARs ) 
  
  
addEventHandler ( "onVehicleStartEnter", root, function ( thePlayer ) 
    if ( VIPCar [ thePlayer ] and VIPCar [ thePlayer ] == source ) then 
        if not ( aclGroupListACL(aclGetGroup("VIP1")) ) then outputChatBox ( "القروب موموجود في الاسل !", thePlayer, 255, 255, 0, true ) cancelEvent ( ) end 
        local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
        if not ( isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP1" ) ) ) then 
            cancelEvent ( ) 
            outputChatBox ( "You Must Be In VIP Group ", thePlayer, 255, 255, 0, true ) 
        else 
            outputChatBox ( "Welcome To Your Vehicle ", thePlayer, 255, 255, 0, true ) 
        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...