Za???my ?e mamy skrypt na zamykanie aut, teraz gdy wy?wietli nam si? jaki? error to pisze on na CHACIE, a ja chc? ustawi? tak, by te oknienko wyskakiwa?o i pisa?o ?e np.. "Nie jeste? w poje?dzie". Nie wiem czy zrozumieli?cie..
function lockenterVehicle ( player, seat, jacked )
if ( lockVehicles[getElementModel ( source )] ) and ( not lockSkins[getElementModel ( player )] ) and ( seat == 0 ) then
cancelEvent()
outputChatBox ( "Samoch?d nie nale?y do Ciebie.", player , 255, 00, 00)
exports.notifications:showBox ("error","To nie jest twoj samochod")
end
end
function lockenterVehicle ( player, seat, jacked )
if ( lockVehicles[getElementModel ( source )] ) and ( not lockSkins[getElementModel ( player )] ) and ( seat == 0 ) then
cancelEvent()
outputChatBox ( "Samoch?d nie nale?y do Ciebie.", player , 255, 00, 00)
exports.notifications:showBox ("error","To nie jest twoj samochod")
end
end
to daj tak:
function lockenterVehicle ( player, seat, jacked )
if ( lockVehicles[getElementModel ( source )] ) and ( not lockSkins[getElementModel ( player )] ) and ( seat == 0 ) then
cancelEvent()
exports.notifications:showBox ("error","To nie jest twoj samochod")
end
end
Kolego, z takim zapa?em to ?adnego skryptu nie napiszesz. 80% czasu kt?rego sp?dzasz skryptuj?c to debugowanie.
function lockenterVehicle ( player, seat, jacked )
if ( lockVehicles[getElementModel ( source )] ) and ( not lockSkins[getElementModel ( player )] ) and ( seat == 0 ) then
cancelEvent()
outputChatBox ( "Samoch?d nie nale?y do Ciebie.", player , 255, 00, 00)
exports.notifications:showBox ("error","To nie jest twoj samochod")
end
end
Po stronie serwera pierwszym argumentem w funkcji showBox jest gracz, wi?c:
function lockenterVehicle ( player, seat, jacked )
if ( lockVehicles[getElementModel ( source )] ) and ( not lockSkins[getElementModel ( player )] ) and ( seat == 0 ) then
cancelEvent()
outputChatBox ( "Samoch?d nie nale?y do Ciebie.", player , 255, 00, 00)
exports.notifications:showBox (player, "error","To nie jest twoj samochod")
end
end
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