Wysłany: 2020-05-16, 19:05
Fabian111
Wiek: 26 Na forum: 2716 dni Posty: 14
Nick w MP: FaBiaN
Piwa : 7
Dzie? dobry, chcia?bym zrobi? skrypt na /wariant czyli np wpisuje /wariant i przyk?adowo burrito zmienia wariant na ten ze "spoilerem" i ?wiat?ami a jak znowu to to znika (je?eli kto? ma link/skrypt to je?eli mo?e podes?a? to niech pode?le).
ZA UWAG? DZI?KUJE!
Wysłany: 2020-05-16, 20:07
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
Wysłany: 2020-05-16, 23:09
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4395 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Wystarczy troche poszuka? na wiki, zaj??o mi to minut?, przyk?ad z wiki :
function setMyVehiclesVariant ( theUser , command , var1 , var2 )
local var1 , var2 = tonumber ( var1 ), tonumber ( var2 ) -- If anything was passed make sure its number or nil
local myVeh = getPedOccupiedVehicle ( theUser ) -- Get the vehicle that they 're in
if (myVeh and getVehicleController(myVeh) == theUser) then -- Make sure they' re in control
local wasSet = setVehicleVariant ( myVeh , var1 , var2 ) -- Set what they wanted
if ( wasSet ) then
outputChatBox ( "Vehicle variant successfully set!" , theUser , 0 , 255 , 0 )
else
outputChatBox ( "Vehicle variant unsuccessfully set." , theUser , 255 , 255 , 0 )
end
end
end
addCommandHandler ( "setvehvar" , setMyVehiclesVariant ) -- Add the command
Wysłany: 2020-05-17, 22:31
Matikmontana
Modern Stories
Wiek: 22 Na forum: 2473 dni Posty: 423
Nick w MP: Mazeusz*
Piwa : 1015
Tutaj masz z pysa
function wariant ( plr , cmd , var1 , var2 )
local veh = getPedOccupiedVehicle ( plr )
if not veh then return end
local var1 , var2 = getVehicleVariant ( veh )
if ( veh and getVehicleController ( veh ) ~= plr ) then return end
local speedx , speedy , speedz = getElementVelocity ( veh )
if not speedx then speedx = 0 end
if not speedy then speedy = 0 end
if not speedz then speedz = 0 end
speedx = tonumber ( speedx ); speedy = tonumber ( speedy ); speedz = tonumber ( speedz )
local speed = ( speedx ^ 2 + speedy ^ 2 + speedz ^ 2 )^( 0.5 ) * 180
if speed > 2 then outputChatBox ( "St?j w miejscu!" , plr , 255 , 255 , 255 ) return end
if getElementData ( plr , "wariant:blokada" , true ) then outputChatBox ( "* Tej komendy mo?esz u?ywa? co 30 sekund!" , plr , 255 , 0 , 0 ) return end
setElementData ( plr , "wariant:blokada" , true )
setTimer ( setElementData , 30000 , 1 , plr , "wariant:blokada" , false )
local panel = {}
for i = 0 , 6 do
panel [ i ] = getVehiclePanelState ( veh , i )
end
setVehicleVariant ( veh , tonumber ( not var1 ), tonumber ( not var1 ))
for i = 0 , 6 do
setVehiclePanelState ( veh , i , panel [ i ])
end
end
addCommandHandler ( "wariant" , wariant )
Tagi: warianty :: pojazdu.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: