Moi je dépose un petit script pour l'ouverture de barrières avec une commande
gatea = createObject ( 969, 1397.1, 2701.6, 9.8, 0, 0, 270 )
gateb = createObject ( 969, 1397.1, 2693.6, 9.8, 0, 0, 270 )
gatec = createObject ( 987, 2294.6, 2503.2, 2.3, 0, 0, 274 )
gated = createObject ( 987, 2319.8, 2440.5, 2.3, 0, 0, 90 )
gateea = createObject ( 987, 2245.6, 2481.5, 14, 0, 0, 270 )
gateeb = createObject ( 987, 2245.6, 2469.5, 14, 0, 0, 270 )
gateec = createObject ( 987, 2245.6, 2457.5, 14, 0, 0, 270 )
gateed = createObject ( 987, 2245.6, 2445.5, 14, 0, 0, 270 )
arene = createObject ( 17018, -1417, 363, 25, 0, 0, 270 )
airport = createObject ( 987, -1549.8, -426, 5, 0, 0, 316 )
arene2 = createObject ( 3277, -1426.8, 368.4, 26.1, 0, 0, 0 )
-- create the function the command handler calls, with the arguments: thePlayer, command, vehicleModel
function ouvrirdepot(commandName, posX, posY, posZ)
moveObject ( gatea, 15000, 1397.1, 2689, 9.8 )
moveObject ( gateb, 15000, 1397.1, 2689, 9.8 )
end
addCommandHandler("od", ouvrirdepot)
-- create the function the command handler calls, with the arguments: thePlayer, command, vehicleModel
function fermerdepot(commandName, posX, posY, posZ)
moveObject ( gatea, 15000, 1397.1, 2701.6, 9.8 )
moveObject ( gateb, 15000, 1397.1, 2693.6, 9.8 )
end
addCommandHandler("fd", fermerdepot)
function ouvrirairport(commandName, posX, posY, posZ)
moveObject ( airport, 15000, -1557.5, -418, 5 )
end
addCommandHandler("oa", ouvrirairport)
-- create the function the command handler calls, with the arguments: thePlayer, command, vehicleModel
function fermerairport(commandName, posX, posY, posZ)
moveObject ( airport, 15000, -1549.8, -426, 5 )
end
addCommandHandler("fa", fermerairport)
function op(commandName, posX, posY, posZ)
moveObject ( gatec, 10000, 2294.6, 2503.2, 7 )
moveObject ( gated, 10000, 2319.8, 2440.5, 8 )
end
addCommandHandler("op", op)
-- create the function the command handler calls, with the arguments: thePlayer, command, vehicleModel
function fp(commandName, posX, posY, posZ)
moveObject ( gatec, 10000, 2294.6, 2503.2, 2.3 )
moveObject ( gated, 10000, 2319.8, 2440.5, 2.3 )
end
addCommandHandler("fp", fp)
function secure(commandName, posX, posY, posZ)
moveObject ( gateea, 10000, 2245.6, 2481.5, 9.8 )
moveObject ( gateeb, 10000, 2245.6, 2469.5, 9.8 )
moveObject ( gateec, 10000, 2245.6, 2457.5, 9.8 )
moveObject ( gateed, 10000, 2245.6, 2445.5, 9.8 )
end
addCommandHandler("secure", secure)
function unsecure(commandName, posX, posY, posZ)
moveObject ( gateea, 10000, 2245.6, 2481.5, 14 )
moveObject ( gateeb, 10000, 2245.6, 2469.5, 14 )
moveObject ( gateec, 10000, 2245.6, 2457.5, 14 )
moveObject ( gateed, 10000, 2245.6, 2445.5, 14 )
end
addCommandHandler("unsecure", unsecure)
function up(commandName, posX, posY, posZ)
moveObject ( arene, 30000, -1417, 363, 32 )
moveObject ( arene2, 30000, -1426.8, 368.4, 36.8 )
end
addCommandHandler("up", up)
function down(commandName, posX, posY, posZ)
moveObject ( arene, 30000, -1417, 363, 25 )
moveObject ( arene2, 30000, -1426.8, 368.4, 26.1 )
end
addCommandHandler("down", down)
Bonne soirée