Wysłany: 2021-01-24, 14:30
filip0985
Początkujący w LUA
Wiek: 22 Na forum: 2754 dni Posty: 112
Piwa : 13
Witam mam pytanie jak zrobi? usuwanie pojazdu tylko dal jednej osoby.
Wysłany: 2021-01-24, 16:36
TheSebaPL
Mod-team
Wiek: 21 Na forum: 3098 dni Posty: 964
Piwa : 3102
filip0985 , masz w admins komend? tak?:
addCommandHandler ( "dv" , function( plr , cmd )
if getAdmin ( plr , 4 ) or getAdmin ( plr , 3 ) or getAdmin ( plr , 2 ) or getAdmin ( plr , 1 ) then
if getElementData ( plr , "player:admin" ) then
local veh = getPedOccupiedVehicle ( plr )
if not veh then
outputChatBox ( "Musisz by? w aucie!" , plr , 255 , 255 , 255 , ture )
return
end
if getElementData ( veh , "vehicle:spawn" ) then
outputChatBox ( "Nie mo?esz usun?? tego pojazdu." , plr , 255 , 255 , 255 , true )
return
end
destroyElement ( veh )
outputChatBox ( "Usun??e? pojazd." , plr , 255 , 255 , 255 , true )
end
end
end )
Mo?esz te? sobie przerobi? pod serial np.
Wysłany: 2021-01-24, 17:37
filip0985
Początkujący w LUA
Wiek: 22 Na forum: 2754 dni Posty: 112
Piwa : 13
function zakonczonapraca ( player , plr )
if ( getPlayerSkin ( player ) == 155 ) then
if getElementData ( plr , "player:admin" ) then
local veh = getPedOccupiedVehicle ( plr )
if not veh then
outputChatBox ( "Musisz by? w aucie!" , plr , 255 , 255 , 255 , ture )
return
end
if getElementData ( veh , "vehicle:spawn" ) then
outputChatBox ( "Nie mo?esz usun?? tego pojazdu." , plr , 255 , 255 , 255 , true )
return
end
destroyElement ( veh )
outputChatBox ( "Usun??e? pojazd." , plr , 255 , 255 , 255 , true )
end
end
end
addEvent ( "zakonczonapraca" , true )
addEventHandler ( "zakonczonapraca" , root , zakonczonapraca )
zrobi?em w taki spos?b ale nie dzia?a nic si? po prostu nie dzieje ani w debugu nie pokazuje,
Wysłany: 2021-01-24, 20:11
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Poka? jak triggerujesz event "zakonczonapraca"
Wysłany: 2021-01-24, 20:14
filip0985
Początkujący w LUA
Wiek: 22 Na forum: 2754 dni Posty: 112
Piwa : 13
function zakonczprace ()
guiSetVisible ( przycisk , true )
guiSetVisible ( przycisk2 , false )
guiSetVisible ( Okno , false )
showCursor ( false )
triggerServerEvent ( "skin0" , root , localPlayer )
triggerServerEvent ( "zakonczonapraca" , root , localPlayer )
removeEventHandler ( "pizza" , root , pizza )
destroyElement ( marker2 )
destroyElement ( myBlip )
end
Wysłany: 2021-01-25, 09:06
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
W funkcji zakonczonapraca masz 2 argumenty od gracza. Wiesz, ?e nie musisz ?adnego definiowa?, tylko u?y? po prostu "client" po serwerze?
Wysłany: 2021-01-25, 09:15
filip0985
Początkujący w LUA
Wiek: 22 Na forum: 2754 dni Posty: 112
Piwa : 13
a no zadzia?a?o. Dzi?kuje za pomoc
[ Dodano : 2021-01-25, 09:28 ]
tylko jest problem ?e nadal usuwa pojazd przeciwnej osobie zamiast samemu sobie
Wysłany: 2021-01-25, 09:31
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Poka? event i ten trigger po zmianach.
Wysłany: 2021-01-25, 10:02
filip0985
Początkujący w LUA
Wiek: 22 Na forum: 2754 dni Posty: 112
Piwa : 13
function zakonczonapraca ( plr )
if ( getPlayerSkin ( plr ) == 155 ) then
if getElementData ( plr , "player:admin" ) then
local veh = getPedOccupiedVehicle ( plr )
if not veh then
outputChatBox ( "Musisz by? w aucie!" , plr , 255 , 255 , 255 , ture )
return
end
if getElementData ( veh , "vehicle:spawn" ) then
outputChatBox ( "Nie mo?esz usun?? tego pojazdu." , plr , 255 , 255 , 255 , true )
return
end
destroyElement ( veh )
outputChatBox ( "Usun??e? pojazd." , plr , 255 , 255 , 255 , true )
end
end
end
addEvent ( "zakonczonapraca" , true )
addEventHandler ( "zakonczonapraca" , root , zakonczonapraca )
triggerServerEvent ( "zakonczonapraca" , root , localPlayer )
nie wiem czy o to ci chodzi?
Tagi: usuwanie :: pojazdu :: jednej :: osobie
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: