Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: zrespieniu
1. Wyświetlenie waluty po zrespieniu
Jak doda? ,?e po zrespieniu si? dopiero wida? walute[size=18][/size]

[player:spawn]



[lua]local czcionka = dxCreateFont("a/cz.ttf", 24)

if not czcionka then czcionka = "default" end

local screenW, screenH = guiGetScreenSize()

addEventHandler("onClientRender", root, function()
local hajs = string.format("%08d", getPlayerMoney(getLocalPlayer()))
showPlayerHudComponent("money", false)
dxDrawText("PLN "..hajs, (screenW * 0.7758) - 2, (screenH * 0.2070) - 2, (screenW * 0.9531) - 2, (screenH * 0.2904) - 2, tocolor(0, 0, 0, 255), 1.00, czcionka, "center", "center", false, false, false, false, false)
dxDrawText("PLN "..hajs, (screenW * 0.7758) + 2, (screenH * 0.2070) - 2, (screenW * 0.9531) + 2, (screenH * 0.2904) - 2, tocolor(0, 0, 0, 255), 1.00, czcionka, "center", "center", false, false, false, false, false)
dxDrawText("PLN "..hajs, (screenW * 0.7758) - 2, (screenH * 0.2070) + 2, (screenW * 0.9531) - 2, (screenH * 0.2904) + 2, tocolor(0, 0, 0, 255), 1.00, czcionka, "center", "center", false, false, false, false, false)
dxDrawText("PLN "..hajs, (screenW * 0.7758) + 2, (screenH * 0.2070) + 2, (screenW * 0.9531) + 2, (screenH * 0.2904) + 2, tocolor(0, 0, 0, 255), 1.00, czcionka, "center", "center", false, false, false, false, false)
dxDrawText...
2. blip po zrespieniu w pojezdzie
Siemka, mam skrypcik na prace.. Ale Ale nwm jak zrobi? po stronie servera aby po zrespieniu w poje?dzie pojawi? mi si? blip.. i abym widzia? go tylko ja. Oczywi?cie za pomoc daje zimne piwerko :piwo: i respekcik R*

Tu cz??? kodu odpowiadaj?ca za resp auta w pracy.. Nie jestem pewien czy to odpowiedni fragment kodu.

function nielegalna (theplayer)
        if 
getElementData (theplayer, "oddalall") == true then
            local pojazd 
= createVehicle (482, -1723.16,-85.07,3.68,359.2,0.2,132.6)
            
warpPedIntoVehicle (theplayer, pojazd)
            
setVehiclePlateText (pojazd, "DOSTAWCA")
            
setVehicleColor (pojazd, 0, 0, 0)
            
setElementData (pojazd, "vehicle:desc", "Praca NIE LEGALNA")
            
addVehicleUpgrade (pojazd, 1025)
            
setElementData (theplayer, "oddalall", false)
            
setElementData (theplayer, "dojazdnielegalna", true)
            
outputChatBox ("* Wybra?es prace nie legaln?! Udaj sie do pistoletu na mapie!", theplayer, 255, 255, 255)
    
end
end
3. Auto nie ma paliwa po zrespieniu
Moj problem wyglada nastepujaca. Majac skrypt na prace tzw. Maszynisty. W pociagu nie ma paliwa, po mimo iz w kodzie wystepuje 100l paliwa. Dodam iz ten blad wystepuje tylko wtedy gdy wgram panel interakcji.
A oto moj kod



[code]createBlip(-2275.43, 532.59, 35.10,46, 2, 255,0,0,255,0,400)

local m1 = createMarker(-2275.43, 532.59, 35.10, "cylinder", 1.5, 255, 0, 0)
vehs = {}


function removePreviousVehicles(plr)
for i,v in ipairs(getElementsByType("vehicle", resourceRoot)) do
local sby = getElementData(v, "zrespilGracz")
if sby and sby == plr and getPedOccupiedVehicle(plr) ~= v then
destroyElement(v)
end
end
end

addEventHandler("onMarkerHit", m1, function(el, md)
if getElementData(el, "zrespilGracz") then
outputChatBox("praca w trakcie poprawek", el)
return
end

if not md or getElementType(el) ~= "player" or getPedOccupiedVehicle(el) then return end

local x,y,z = getElementPosition(el)
local bus = createVehicle(449, -2264.72, 526.35, 35.26)
setVehicleHandling(bus, "maxVelocity", 50.0)
setElementData(bus, "zrespilGracz", el)
setElementData(bus, "pojazd_paliwo", 100)
setElementData(bus, "pojazd_przebieg", 100)

warpPedIntoVehicle(el, bus)
removePreviousVehicles(el)
triggerClientEvent(el, "STARTJobBus"...
4. [INNE] Błedne potwierdzenie o zrespieniu
Kod:


CMD:stworzpojazd(playerid, params[])
{
if(IsPlayerAdmin(playerid) == 1 || PlayerAdmin[playerid] >= 2)
{
new kolor1, kolor2;
if(sscanf(params, "ddd", player, kolor1, kolor2))
return SendClientMessage(playerid, JCZERWONY, "/stworzpojazd [model] [kolor 1] [kolor 2]");
{
new Float:X, Float:Y,Float:Z,Float:A;
GetPlayerFacingAngle(playerid, A);
pojazdow++;
GetPlayerPos(playerid, X, Y, Z);
Pojazd[pojazdow] = AddStaticVehicleEx(player, X, Y, Z+1, A, kolor1, kolor2, 120);
SetPlayerPos(playerid, X, Y, Z+5);
format(String128, sizeof(String128), "Stworzy?e? pojazd %s, o id: %d i o numerze: %d", GetVehicleName(player), player, pojazdow);
SendClientMessage(playerid, ZIELONY, String128);
}
}
else
{
SendClientMessage(playerid, JCZERWONY, "Nie jeste? adminem!");
}
return 1;
}


nie wyswietla mi prawid?owo nazwy zrespawnionego pojazdu np respie infernusa pokazuje info o banshee