Wysłany: 2015-05-27, 15:55
P.Wiśnia
Programista LUA
Wiek: 24 Na forum: 4044 dni Posty: 568
Nick w MP: P.Wiśnia
Piwa : 376
Kod: policeCars = { [596]=true, [598]=true, [597]=true }
policeSkins = { [280]=true, [282]=true, [281]=true }
function team()
local player = getRootElement()
policeteam = createTeam ("Policja", 0, 0, 255)
setTeamFriendlyFire ( policeteam , false )
end
addEventHandler("onResourceStart", resourceRoot, team)
function addLs( player, Police, source )
setPlayerTeam ( player, policeteam )
setElementModel(player, 280)
local carLs = createVehicle (596, 1601.7983398438, -1684.4337158203, 6.890625, 0, 0, -90)
warpPedIntoVehicle( player, carLs )
outputChatBox("Dolanczas Do Policji W Ls!", player, 255, 0, 0)
end
function addLv( player, Police, source )
setPlayerTeam ( player, policeteam )
setElementModel(player, 282)
local carLv = createVehicle (598, 2256.4929199219, 2460.1003417969, 11.503442764282, 0, 0, 0)
warpPedIntoVehicle( player, carLv )
outputChatBox("Dolanczas Do Policji W Lv!", player, 255, 0, 0)
end
function addSf( player, Police, source )
setPlayerTeam ( player, policeteam )
setElementModel(player, 281)
local carSf = createVehicle (597, -1603.9359130859, 748.88757324219, -4.6161198616028, 0, 0, 0)
warpPedIntoVehicle( player, carSf )
outputChatBox("Dolanczas Do Policji W Sf!", player, 255, 0, 0)
end
function removeFromVehicle( thePlayer, seat, jacked )
if ( policeCars[getElementModel ( source )] ) and ( not policeSkins[getElementModel ( thePlayer )] ) then
removePedFromVehicle ( thePlayer )
outputChatBox ( "Tylko Policjant Moze Wejsc Do Radiowozu!", thePlayer, 255, 0, 0 )
end
end
function leavePolice(source, player, Police)
setElementModel(source, 0)
setPlayerTeam ( source, nil )
removePedFromVehicle( source )
end
addEventHandler ( "onVehicleEnter", getRootElement(), removeFromVehicle )
addCommandHandler("policels", addLs)
addCommandHandler("policelv", addLv)
addCommandHandler("policesf", addSf)
addCommandHandler("policeleave", leavePolice)
Witam Czy Mog? By Kto? Przerobi? Skrypt zeby dawal bron o id 90
Wysłany: 2015-05-27, 16:16
monio
Wiek: 30 Na forum: 4887 dni Posty: 319
Nick w MP: Monio99
Piwa : 3565
policeCars = { [ 596 ]= true , [ 598 ]= true , [ 597 ]= true }
policeSkins = { [ 280 ]= true , [ 282 ]= true , [ 281 ]= true }
function team ()
local player = getRootElement ()
policeteam = createTeam ( "Policja" , 0 , 0 , 255 )
setTeamFriendlyFire ( policeteam , false )
end
addEventHandler ( "onResourceStart" , resourceRoot , team )
function addLs ( player , Police , source )
setPlayerTeam ( player , policeteam )
giveWeapon ( player , 90 , 500 )
setElementModel ( player , 280 )
local carLs = createVehicle ( 596 , 1601.7983398438 , - 1684.4337158203 , 6.890625 , 0 , 0 , - 90 )
warpPedIntoVehicle ( player , carLs )
outputChatBox ( "Dolanczas Do Policji W Ls!" , player , 255 , 0 , 0 )
end
function addLv ( player , Police , source )
setPlayerTeam ( player , policeteam )
setElementModel ( player , 282 )
giveWeapon ( player , 90 , 500 )
local carLv = createVehicle ( 598 , 2256.4929199219 , 2460.1003417969 , 11.503442764282 , 0 , 0 , 0 )
warpPedIntoVehicle ( player , carLv )
outputChatBox ( "Dolanczas Do Policji W Lv!" , player , 255 , 0 , 0 )
end
function addSf ( player , Police , source )
setPlayerTeam ( player , policeteam )
setElementModel ( player , 281 )
giveWeapon ( player , 90 , 500 )
local carSf = createVehicle ( 597 , - 1603.9359130859 , 748.88757324219 , - 4.6161198616028 , 0 , 0 , 0 )
warpPedIntoVehicle ( player , carSf )
outputChatBox ( "Dolanczas Do Policji W Sf!" , player , 255 , 0 , 0 )
end
function removeFromVehicle ( thePlayer , seat , jacked )
if ( policeCars [ getElementModel ( source )] ) and ( not policeSkins [ getElementModel ( thePlayer )] ) then
removePedFromVehicle ( thePlayer )
outputChatBox ( "Tylko Policjant Moze Wejsc Do Radiowozu!" , thePlayer , 255 , 0 , 0 )
end
end
function leavePolice ( source , player , Police )
setElementModel ( source , 0 )
setPlayerTeam ( source , nil )
removePedFromVehicle ( source )
end
addEventHandler ( "onVehicleEnter" , getRootElement (), removeFromVehicle )
addCommandHandler ( "policels" , addLs )
addCommandHandler ( "policelv" , addLv )
addCommandHandler ( "policesf" , addSf )
addCommandHandler ( "policeleave" , leavePolice )
Trzymaj
Wysłany: 2015-05-27, 16:18
Loop
Inspektor
Wiek: 27 Na forum: 4289 dni Posty: 311
Nick w MP: Inspektor
Piwa : 201
dodajesz
giveWeapon ( element , 90 , amunicja )
Tagi: jak :: edytować
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: