Wysłany: 2018-12-03, 22:09
Wrobel16
Wiek: 22 Na forum: 2909 dni Posty: 4
Nick w MP: ./.
Witam chcialbym was zapytac jak stworzyc komende na respienie auta a chcialbym aby ta komenda wygladala tak /p i model auta
lecz nie wiem gdzie i jak to zrobic.
Wysłany: 2018-12-05, 13:30
SOURCE12
Skrypter
Wiek: 24 Na forum: 3262 dni Posty: 34
Nick w MP: NitroGame888
Piwa : 125
Napisz Priv na gg, lub discord to ci pomog? to zrobi?
Discord: PredatorV2
GG: 65794578
Więcej szczegółów
Wystawiono 1 piw(a):Kobar19
Wysłany: 2018-12-05, 13:31
rresz
Wiek: 25 Na forum: 3028 dni Posty: 16
Nick w MP: Domiinoo
Ehh wr?belku wr?belku Masakra Z Tob?
addCommandHandler ( "p" , function( plr , cmd , ...)
local name = getPlayerName ( plr ): gsub ( "#%x%x%x%x%x%x" , "" )
if getAdmin ( plr , 1 ) or getAdmin ( plr , 2 ) or getAdmin ( plr , 3 ) or getAdmin ( plr , 4 ) then
if ( not ...) then
triggerClientEvent ( plr , 'onClientCaseShowingsse' , root , 1 , 'U?yj Komendy: /P [Model]' )
return
end
local model = table . concat ( { ... }, " " )
if tonumber ( model ) ~= nil then
triggerClientEvent ( plr , 'onClientCaseShowing' , root , 1 , 'Musisz Poda? Nazwe A Nie ID Pojazdu' )
return end
if model == "rhino" or model == "hydra" or model == "seasparrow" or model == "hunter" or model == "police ls" or model == "police lv" or model == "police sf" or model == "Rhino" or model == "Hunter" or model == "Hydra" or model == "Police LS" or model == "Police LV" or model == "Police SF" then
triggerClientEvent ( plr , 'onClientCaseShowing' , root , 1 , 'Pojazd Kt?ry Pr?bujesz Zrespi? Jest Zablokowany' )
return end
local dim = getElementDimension ( plr )
local x , y , z = getElementPosition ( plr )
local r1 , r2 , r3 = getElementRotation ( plr )
local model = getVehicleModelFromName ( model )
local vehicle = getPedOccupiedVehicle ( plr )
if getPedOccupiedVehicle ( plr ) then
triggerClientEvent ( plr , 'onClientCaseShowing' , root , 1 , 'Nie Mo?esz Podmieni? Tego Pojazdu' )
else
pojazd = createVehicle ( model , x , y , z , r1 , r2 , r3 )
triggerClientEvent ( plr , 'onClientCaseShowingss' , root , 1 , 'Podany Przez Ciebie Pojazd Zosta? Stworzony' )
setElementDimension ( pojazd , dim )
setElementPosition ( plr , x , y , z + 1.5 )
setVehiclePlateText ( pojazd , "RESPIONY" )
setElementData ( pojazd , "vehicle:fuel" , 100 )
setElementData ( pojazd , "vehUsunTAK" , true )
addEventHandler ( "onVehicleExit" , pojazd , function( plr , seat )
if seat ~= 0 then return end
destroyElement ( source )
end )
end
else
triggerClientEvent ( plr , 'onClientCaseShowing' , root , 1 , 'Nie Posiadasz Uprawnie? Do Tej Komendy' )
end
end )
Zamiast TriggerClientEvent zmie? na wiadomo?ci chatowe bo ja mam system notyfikacji
Wysłany: 2018-12-07, 18:05
kuba43
Wiek: 45 Na forum: 3225 dni Posty: 166
Nick w MP: definitly
Piwa : 17
Zrobie ci gotowy kod, poniewa? nie chce mi si? tobie tego t?umaczy?, kod rresz mo?e Ci nie dzia?a? bo tam s? tzw "ukryte opisy" kt?re sprawdzaj? czy gracz jest adminem i te? s? notyfikacje.
addCommandHandler ( "p" , function( plr , cmd , ...)
if ( not ...) then
outputChatBox ( "U?yj Komendy: /P [Model]" , plr )
return
end
local model = table . concat ( { ... }, " " )
if tonumber ( model ) ~= nil then
outputChatBox ( "Musisz Poda? Nazwe A Nie ID Pojazdu" , plr )
return end
if model == "rhino" or model == "hydra" or model == "seasparrow" or model == "hunter" or model == "police ls" or model == "police lv" or model == "police sf" or model == "Rhino" or model == "Hunter" or model == "Hydra" or model == "Police LS" or model == "Police LV" or model == "Police SF" then
outputChatBox ( "Pojazd nie prawid?owy" , plr )
return end
local dim = getElementDimension ( plr )
local x , y , z = getElementPosition ( plr )
local r1 , r2 , r3 = getElementRotation ( plr )
local model = getVehicleModelFromName ( model )
local vehicle = getPedOccupiedVehicle ( plr )
if getPedOccupiedVehicle ( plr ) then
outputChatBox ( "Nie mo?esz by? w poje?dzie!" , plr )
pojazd = createVehicle ( model , x , y , z , r1 , r2 , r3 )
outputChatBox ( "Podany Przez Ciebie Pojazd Zosta? Stworzony" , plr )
setElementDimension ( pojazd , dim )
setElementPosition ( plr , x , y , z + 1.5 )
setVehiclePlateText ( pojazd , "RESPIONY" )
setElementData ( pojazd , "vehicle:fuel" , 100 )
setElementData ( pojazd , "vehUsunTAK" , true )
addEventHandler ( "onVehicleExit" , pojazd , function( plr , seat )
if seat ~= 0 then return end
destroyElement ( source )
end )
end )
Podpis
„(…) wystarczy, że odpowiesz sobie na jedno zajebiście, ale to zajebiście, ważne pytanie: co lubię w życiu robić. A potem zacznij to robić.”.
Ostatnio zmieniony przez kuba43 2018-12-08, 19:14, w całości zmieniany 1 raz
Więcej szczegółów
Wystawiono 1 piw(a):mangizu
Wysłany: 2018-12-07, 18:26
Kalizman
Wiek: 23 Na forum: 3651 dni Posty: 1394
Piwa : 4619
kuba43 , po co ci to? local name = getPlayerName ( plr ): gsub ( "#%x%x%x%x%x%x" , "" )
Wysłany: 2018-12-08, 19:13
kuba43
Wiek: 45 Na forum: 3225 dni Posty: 166
Nick w MP: definitly
Piwa : 17
Kalizman , W sumie masz racje nie jest tu do niczego potrzebne
Podpis
„(…) wystarczy, że odpowiesz sobie na jedno zajebiście, ale to zajebiście, ważne pytanie: co lubię w życiu robić. A potem zacznij to robić.”.
Tagi: komenda :: respienie :: auta
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: