Mam b??d ze skryptem "notices" oraz z kodem kt?ry powoduje pokazanie si? informacji (chyba wiecie o co chodzi)
Wyskakuje taki b??d:
[img]http://i.imgur.com/MESxwSN.png[/img]
Oto kod na "notices":
[lua]
local displayWidth, displayHeight = guiGetScreenSize();
local notificationData = {};
local notificationFont = dxCreateFont('files/fonts/roboto.ttf', 12 * 2, false);
local iconsFont = dxCreateFont('files/fonts/icons.ttf', 12 * 2, false);
addEventHandler('onClientRender', root,
function()
for k, v in pairs(notificationData) do
if (v.State == 'fadeIn') then
local alphaProgress = (getTickCount() - v.AlphaTick) / 650;
local alphaAnimation = interpolateBetween(0, 0, 0, 255, 0, 0, alphaProgress, 'Linear');
if (alphaAnimation) then
v.Alpha = alphaAnimation;
else
v.Alpha = 255;
end
if (alphaProgress > 1) then
v.Tick = getTickCount();
v.State = 'openTile';
end
elseif (v.State == 'fadeOut') then
local alphaProgress = (getTickCount() - v.AlphaTick) / 650;
local alphaAnimation = interpolateBetween(255, 0, 0, 0, 0, 0, alphaProgress, 'Linear');
if (alphaAnimation) then
v.Alpha = alphaAnimation;
else
v.Alpha = 0;
end
if (alphaProgress > 1) then
notificationData = {};
end
elseif (v.State == 'openTile') then
local tileProgress = (getTickCount() - v.Tick) / 350;
local tilePosition = ...
function enterVehicle ( player, seat, jacked )
if seat == 0 then
if ( policeVehicles[getElementModel(source)] ) and ( not policeSkins[getElementModel(player)] ) then
cancelEvent()
outputChatBox ( "Niepracujesz w tej pracy niemozesz jezdzic tym pojazdem!!" )
end
end
end
addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle )
function otworz (player)
if isElementWithinMarker(player, bramaMarker) then --sprawdza czy gracz jest w markerze
moveObject ( brama, 3200, -2554.3999, 616.90002, 25.9 ) -- otwiera brame
showBox ("info","Trwa otwieranie bramy pogotowia") end
end
addEventHandler ("onMarkerHit", bramaMarker, otworz)
function zamknij (leaveElement, matchingDimension)
if getElementType( leaveElement ) == "player" then
moveObject ( brama, 3200, -2554.3999, 616.90002, 17.4 ) showBox ("info","Trwa zamykanie bramy pogotowia") end
end
addEventHandler ("onMarkerLeave", bramaMarker, zamknij)
Cze??, ot?? mam problem. Mam gamemode, ale... No w?a?nie te wiadomo?ci w czacie znudzi?y si?, wi?c znalaz?em skrypt w internecie Notifications. Co? jednak mi nie chce dzia?a?, dajmy naprzyk?ad skrawek tego kodu:
function info(tekst) exports.notifications:showBox("info",tekst) end
function autopPark ( source, cmd)
if(isPedInVehicle(source)) then
local autop = getPedOccupiedVehicle ( source )
if (getElementData (source, "hisCar")) and (getElementData (source, "hisCar") ~= nil) and (getElementType(getElementData (source, "hisCar")) == "vehicle") then
local x, y, z = getElementPosition ( source ) local xa,ya,a = getElementRotation ( autop ) setElementData (autop,"xpos",x) setElementData (autop,"ypos",y) setElementData (autop,"zpos",z) setElementData (autop,"angle",a) showBox ("info","Zaparkowa?e? auto.") saveCars()
else showBox ("info","To nie jest twoje auto.") end else showBox ("info","Nie jeste? w pojezdzie.") end
end
addCommandHandler ("zaparkuj",autopPark)
To mi nic nie wyskakuje, skrypt nazywa si? notifications. Nie wiem co mam ?le zrobionego. Za pomoc =
Witam od kilku godzin bawie si? z skryptem notifications
link:http://community.multitheftauto.com/index.php?p=resources&s=details&id=5812
robie tak jak jest opisane czyli tworze nowy folder wrucam tam pliki oraz w moim 2 skrypcie na prywatne auta gdzie informacja wcze?niej pokazywa?a si? na czacie zast?pi?em t? linijka lecz nie dzia?a prosze o pomoc
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..
[center]--------------------------------[/center]
W opisie skryptu na comminity pisz?, ?e mam u?y?
[lua]showBox ("info","Just some information")[/lua]
ale nie wiem jak tego u?y? np. w tym kodzie
[lua]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)
end
end[/lua]
u?y? to w taki spos?b ?
[lua]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)
showBox ("error","To nie jest twoj samochod")
end
end[/lua]