Wysłany: 2014-07-30, 09:37
JasiuGaming
Wiek: 35 Na forum: 4407 dni Posty: 18
Piwa : 1
Witam. Robi?em sw?j pierwszy skrypt na komendy dawania aut nitra i hydrauliki, ale jak wgrywam na serwer ten skrypt i gdy pisze refresh wyskakuje mi ?e niedzia?a w debug script 3 nic mi nie wyskakuje. Chcia?bym prosi? was o pomoc.
LUA:
function alpha ( thePlayer )
createVehicle ( 602 , x , y , z )
local x , y , z - getElementPosition ( thePlayer )
outputChatBox ( "Zrespawnowano auto Alpha" , thePlayer , 255 , 0 , 0 )
end
AddCommandHandler ( "alpha" , alpha )
function banshee ( thePlayer )
createVehicle ( 429 , x , y , z )
local x , y , z - getElementPosition ( thePlayer )
outputChatBox ( "Zrespawnowano auto Banshee" , thePlayer , 255 , 0 , 0 )
end
AddCommandHandler ( "banshee" , banshee )
function dodajnitro ( thePlayer )
addVehicleUpgrade ( theVehicle , 1008 )
outputChatBox ( "Mechanik doda? do twojego pojazdu Nitro" , thePlayer , 255 , 0 , 0 )
AddCommandHandler ( "dajnitro" , dodajnitro )
function dodajhydraulike ( thePlayer )
addVehicleUpgrade ( theVehicle , 1087 )
outputChatBox ( "Mechanik doda? do twojego pojazdu hydraulike" , thePlayer , 255 , 0 , 0 )
AddCommandHandler ( "dajhydraulike" , dodajhydraulike )
Wysłany: 2014-07-30, 09:45
McDeKi
Wiek: 28 Na forum: 4844 dni Posty: 95
Nick w MP: McDeKi
Piwa : 186
Wszystkie "addCommandHandler" s? z du?ej litery + Cytat: Note: It is strongly advised that you do not use the same name for your handler function as the command name, as this can lead to confusion if multiple handler functions are used. Use a name that describes your handler's purpose more specifically.
Wysłany: 2014-07-30, 09:48
JasiuGaming
Wiek: 35 Na forum: 4407 dni Posty: 18
Piwa : 1
McDeKi , dalej nie dzia?a i jak pisze refresh to mi si? pojawia WARNING: Not loading resource 'system aut' as it contains illegal characters
Wysłany: 2014-07-30, 09:51
McDeKi
Wiek: 28 Na forum: 4844 dni Posty: 95
Nick w MP: McDeKi
Piwa : 186
Masz spacje albo znaki specjalne w nazwie zasobu.
Edit: Powinno by? SystemAut, bez spacji.
Wysłany: 2014-07-30, 09:53
JasiuGaming
Wiek: 35 Na forum: 4407 dni Posty: 18
Piwa : 1
Tylko w nazwie skryptu, nazwa lua to systemautfreeroam a folder to system aut
Wysłany: 2014-07-30, 09:54
McDeKi
Wiek: 28 Na forum: 4844 dni Posty: 95
Nick w MP: McDeKi
Piwa : 186
Tak, zmie? nazw? folderu na systemaut.
Wysłany: 2014-07-30, 09:57
JasiuGaming
Wiek: 35 Na forum: 4407 dni Posty: 18
Piwa : 1
?aduje si?, ale skrypt nie dzia?a jak pisze komendy.
Wysłany: 2014-07-30, 09:59
McDeKi
Wiek: 28 Na forum: 4844 dni Posty: 95
Nick w MP: McDeKi
Piwa : 186
function bansheeF ( thePlayer )
if getElementData ( thePlayer , "autoGracza" ) then
destroyElement ( getElementData ( thePlayer , "autoGracza" ))
end
local x , y , z = getElementPosition ( thePlayer )
local auto = createVehicle ( 602 , x , y , z )
setElementData ( thePlayer , "autoGracza" , auto )
warpPedIntoVehicle ( thePlayer , auto )
outputChatBox ( "Zrespawnowano auto Banshee" , thePlayer , 255 , 0 , 0 )
end
addCommandHandler ( "banshee" , bansheeF )
function dodajnitro ( thePlayer )
if not ( getPedOccupiedVehicle ( thePlayer ) == false ) then
addVehicleUpgrade ( getPedOccupiedVehicle ( thePlayer ), 1008 )
outputChatBox ( "Mechanik doda? do twojego pojazdu Nitro" , thePlayer , 255 , 0 , 0 )
end
end
addCommandHandler ( "dajnitro" , dodajnitro )
function dodajhydraulike ( thePlayer )
if not ( getPedOccupiedVehicle ( thePlayer ) == false ) then
addVehicleUpgrade ( getPedOccupiedVehicle ( thePlayer ), 1087 )
outputChatBox ( "Mechanik doda? do twojego pojazdu hydraulike" , thePlayer , 255 , 0 , 0 )
end
end
addCommandHandler ( "dajhydraulike" , dodajhydraulike )
Ostatnio zmieniony przez McDeKi 2014-07-30, 10:14, w całości zmieniany 2 razy
Wysłany: 2014-07-30, 10:06
JasiuGaming
Wiek: 35 Na forum: 4407 dni Posty: 18
Piwa : 1
Wysłany: 2014-07-30, 10:15
McDeKi
Wiek: 28 Na forum: 4844 dni Posty: 95
Nick w MP: McDeKi
Piwa : 186
Teraz dzia?a na pewno, sprawdzi?em na lokalnym serverze + stare auto usuwa si? po zespawnowaniu nowego.
Tagi: skrypt :: nie :: działa
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: