Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2015-05-27, 15:55


P.Wiśnia

Programista LUA






Wiek: 24
Na forum: 4045 dni
Posty: 568
Nick w MP: P.Wiśnia

Piwa: 376

Respekt: 100
Respekt: 100

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

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-27, 16:16


monio







Wiek: 30
Na forum: 4887 dni
Posty: 319
Nick w MP: Monio99

Piwa: 3565

Respekt: 120,5
Respekt: 120,5


policeCars = { [596]=true, [598]=true, [597]=true policeSkins = { [280]=true, [282]=true, [281]=true } 
function team() 
local player getRootElement() 
policeteam createTeam ("Policja"00255setTeamFriendlyFire policeteam false end 
addEventHandler("onResourceStart"resourceRootteam) 
function addLsplayerPolicesource setPlayerTeam playerpoliceteam giveWeapon (player90500)
setElementModel(player280local carLs createVehicle (5961601.7983398438, -1684.43371582036.89062500, -90warpPedIntoVehicleplayercarLs outputChatBox("Dolanczas Do Policji W Ls!"player25500end 
function addLvplayerPolicesource setPlayerTeam playerpoliceteam setElementModel(player282)
giveWeapon (player90500)
local carLv createVehicle (5982256.49291992192460.100341796911.503442764282000warpPedIntoVehicleplayercarLv outputChatBox("Dolanczas Do Policji W Lv!"player25500end 
function addSfplayerPolicesource setPlayerTeam playerpoliceteam setElementModel(player281giveWeapon (player90500)
local carSf createVehicle (597, -1603.9359130859748.88757324219, -4.6161198616028000warpPedIntoVehicleplayercarSf outputChatBox("Dolanczas Do Policji W Sf!"player25500end 
function removeFromVehiclethePlayerseatjacked ) 
if ( policeCars[getElementModel source )] ) and ( not policeSkins[getElementModel thePlayer )] ) then 
removePedFromVehicle thePlayer outputChatBox "Tylko Policjant Moze Wejsc Do Radiowozu!"thePlayer2550end 
end 
function leavePolice(sourceplayerPolicesetElementModel(source0setPlayerTeam sourcenil removePedFromVehiclesource end 
addEventHandler "onVehicleEnter"getRootElement(), removeFromVehicle addCommandHandler("policels"addLsaddCommandHandler("policelv"addLvaddCommandHandler("policesf"addSfaddCommandHandler("policeleave"leavePolice)

Trzymaj :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-27, 16:18


Loop

Inspektor






Wiek: 27
Na forum: 4289 dni
Posty: 311
Nick w MP: Inspektor

Piwa: 201

Respekt: 130
Respekt: 130

dodajesz

giveWeapon(element90amunicja)


Postaw piwo autorowi tego posta
 

 
Tagi: jak :: edytować
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku