siema
robi? skrypt na kr?tkofal?wk? kt?ry polega na setPlayerVoiceBroadcastTo i osoby na tym samym kanale, ale pojawia si? problem bo nie mam poj?cia jak zrobi? ?eby gracza po wcisnieciu lewego alta wracali do domyslnych ustawien (kr?tkofal?wka jest wy??czona tak jakby i gracz m?wi, odbiera voice od os?b wok?? tylko).
function getVehicleLicense(plr, type)
if getElementData(plr,"player:license:pj"..type.."") ~= 1 then
outputChatBox("✘#ffffff Nie posiadasz prawa jazdy kategorii "..type.."", plr, 255, 0, 0, true)
return true
end
local result = exports["pystories-db"]:dbGet("SELECT * FROM pystories_punish WHERE serial=? AND type=? AND active=1 AND time>NOW()", getPlayerSerial(plr), tostring(type))
if result and #result > 0 then
v = result[1]
outputChatBox("✘#ffffff Posiadasz zawieszone prawo jazdy do "..v.time.." za "..v.reason, plr, 255, 0, 0, true)
return true
else
exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE serial=? AND type=? AND active=1 AND time<NOW()", getPlayerSerial(plr), tostring(type))
return false
end
end
function convertNumber ( number )
local formatted = number
while true do
formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')
if ( k==0 ) then
break
end
end
return formatted
end
addEvent("givePlayerMoney", true)
addEventHandler("givePlayerMoney", root, function(value,value2,isjob)
if not tonumber(value) then return end
if not getElementData(...
Siema mam postawiony serwer na server project i w ustawieniach zmieni?em nazw? serwera i ustawi?em has?o , niby zmiany zapisane a nic si? nie zmieni?o nazwa dalej taka sama a has?a brak.
Witam, przyszed?em tym razem z problemem dotycz?cym setvehiclecomponent, a mo?e nawet i nie problemem, ale pytaniem. Ot?? wszystko dzia?a jak powinno, ale chcia?bym ?eby?cie mi troch? przerobili kawa?ek kodu. Ot?? po stworzeniu pojazdu pokazuj? si? wszystkie komponenty jakie s? dodane i nie ukrywajmy, je?li jest ich du?o, wygl?da to troch? niechlujnie je?li wszystkie si? na siebie nak?adaj?. Chcia?bym, aby po pojawieniu si? pojazdu wszystkie dodatkowe komponenty by?y ukryte. P?ki co jest tylko komenda(kt?r? dam ni?ej), kt?ra usuwa dodatkowe i zostawia te podstawowe.
[code]addCommandHandler("alldef", -- for vehicle component
function()
local theVeh = getPedOccupiedVehicle(localPlayer)
if (theVeh) then
setVehicleComponentVisible(theVeh, "roof1", false) -- hides the component
setVehicleComponentVisible(theVeh, "feet1", false) -- hides the component
setVehicleComponentVisible(theVeh, "feet2", false) -- hides the component
setVehicleComponentVisible(theVeh, "spoiler1", false) -- hides the component
setVehicleComponentVisible(theVeh, "spoiler1.2", false) -- hides the component
setVehicleComponentVisible(theVeh, "spoiler2", false) -- hides the component
setVehicleComponentVisible(theVeh, "spoiler3", false) -- hides the component
setVehicleComponentVisible(theVeh, "bumper1", false) -- hides the component
setVehi...
Hej ponownie, mam problem, ot?? chc?, aby przy tych kierunkowskazach by?y w??czone lampy, np. gdy w??czamy prawy kierunkowskaz, prawa lampa miga, a lewa si? ?wieci - i na odwr?t. Pr?bowa?em ustawia? w tych cyferkach.. Ale nie przynosi?o to efekt?w, zazwyczaj psu?em kod. Za pomoc oczywi?cie oraz .
[lua]
leftkey = ","
rightkey = "."
bothkey = "/"
LightState1 = {0}
LightState2 = {0}
BlinkT = {}
BlinkS = {}
function Blinker(thePlayer,mode)
local vehicle = getPedOccupiedVehicle(thePlayer)
if vehicle then
if BlinkT[vehicle] then
killTimer(BlinkT[vehicle])
BlinkT[vehicle] = nil
setVehicleLightState(vehicle,0,LightState1[vehicle])
setVehicleLightState(vehicle,1,LightState2[vehicle])
setVehicleLightState(vehicle,3,0)
setVehicleLightState(vehicle,2,0)
setVehicleOverrideLights(vehicle,0)
else
setVehicleOverrideLights(vehicle,2)
setElementData(vehicle,"asd","asd")
local a,b = getVehicleLightState(vehicle,0),getVehicleLightState(vehicle,1)
LightState1[vehicle] = a
LightState2[vehicle] = b
if mode == leftkey then
setVehicleLightState ( vehicle, 1, 1 )
setVehicleLightState ( vehicle, 2, 1 )
if a == 0 then
BlinkT[vehicle] = setTimer(Blink,250,0,vehicle,1,0,3)
elseif a == 1 then
BlinkT[vehicle] = setTimer(Blink,250,0,vehicle,2,0,3)
end
elseif mode == rightkey then
setVehicleL...
Witam. Mam problem z AC. Zmienilem czas uruchamiania i gaszenia silnika w GM, i wszystko bylo by cacy gdyby nie ''Zosta?e? zbanowany, pow?d: NOP SetVehicleEngine/AirBrk''. Ucze sie przerabiac mapki i jest to honest w wersji 1.1.7. Problem polega na tym ze gdy uruchomie silnik i podczas jazdy go wylacze zaczyna banowac z w/w informacja. Czy jest mozliwosc przestawienia AC tak aby nie gryzl sie z cmd /silnik, ewentualnie jezeli sie nie da tego dostroic to czy jest mozliwosc wylaczenia tej funkcji?
Wydaje mi sie ze to bedzie gdzies tu, aczkolwiek nie jestem pewien.
[code]
forward LicznikPojazd(); //Naprawiony przebieg
public LicznikPojazd()
{
foreach(Player,i)
{
if(GetPlayerState(i)==PLAYER_STATE_DRIVER)
{
VehID=GetPlayerVehicleID(i);
if(GetPlayerSpeed(i)>4&&GetPlayerSpeed(i)<10){ SamochodInfo[VehID][sPrzebieg]+=0.003; }
else if(GetPlayerSpeed(i)>10&&GetPlayerSpeed(i)<50){ SamochodInfo[VehID][sPrzebieg]+=0.006; }
else if(GetPlayerSpeed(i)>50&&GetPlayerSpeed(i)<100){ SamochodInfo[VehID][sPrzebieg]+=0.01; }
else if(GetPlayerSpeed(i)>100&&GetPlayerSpeed(i)<150){ SamochodInfo[VehID][sPrzebieg]+=0.02; }
else if(GetPlayerSpeed(i)>160&&GetPlayerSpeed(i)<200){ SamochodInfo[VehID][sPrzebieg]+=0.04; }
GetVehicleParamsEx(VehID,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine)
{
if(SamochodInfo[VehID][sPaliwoTyp]==1) vPaliwoTxt="Pb";
else if(SamochodInfo[VehID][sPaliwoTyp]==2) vPal...