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: fotoradar
1. Fotoradar zabiera kase dla pasazera
Witam, posiadam skrypt na fotoradar i wszystko dzia?a opr?cz jednej rzeczy a mianowicie gdy przekrocz? pr?dko?? to zabiera pieni?dze kierowcy i pasa?erowi. Chcia?bym ustawi? aby mandat dostawa? tylko kierowca. Prosz? o pomoc. Poni?ej wklejam kod. Dzi?kuje za pomoc.

Po stronie CLIENTA:

[lua]--[[
author: Asthma.
(c) 2020 <-- fvck this year
]]

local sx, sy = guiGetScreenSize();
local zoom = 1
local baseX = 1920
local minZoom = 2

if sx < baseX then
zoom = math.min(minZoom, baseX/sx);
end


function scaleX(type, value)
if type == 'center' then
return math.floor(sx/2 - value/zoom)
elseif type == 'left' then
return math.floor(sx - value/zoom)
elseif type == 'right' then
return math.floor(value/zoom)
end
end

function scaleY(type, value)
if type == 'center' then
return math.floor(sy/2 - value/zoom)
elseif type == 'top' then
return math.floor(value/zoom)
elseif type == 'down' then
return math.floor(sy - value/zoom)
end
end

local txd = engineLoadTXD ("foto.txd");
engineImportTXD (txd, 16101 )
local dff = engineLoadDFF ("foto.dff");
engineReplaceModel (dff, 16101 )

_table = {};

local takenPhoto = nil

--[[
przyklad
{x,y,z,rx,ry,rz,zasiegFotoradary,dopuszczalnaPredkosc}
]]

local points = {
{ -2711.51, 312.86, 2.34,0,0,0,7,maxVelocity=50},
{-2598.63379, -490.13394, 73.4849,0,0,0,7,maxVelocity=30...
2. Skrypt na fotoradar daje kazdemu mandat
Czesc, ostatnio wykombinowa?em skrypt na fotoradar, niby wszystko jest ok, ale mandat wystawiany jest kazdemu, kto jedzie >50 km/h i nie znajduje si? w markerze. Za pomoc oczywi?cie stawiam piwsko

Kod:

local marker = createMarker(160.03,-214.05,1.44-0.9, "cylinder", 4.25, 255, 255, 0, 170 )
local marker2 = createMarker(153.90,-209.29,1.43-0.9, "cylinder", 4.25, 255, 255, 0, 170 )

function predkosc(xd)
local car = getPedOccupiedVehicle(getLocalPlayer())
local sx, sy, sz = getElementVelocity(car)
local speed = math.ceil(((sx^2+sy^2+sz^2)^(0.5)) * 161)

if speed >= 50 then
outputChatBox("przekroczono predkosc o "..(speed-50).. "km/h!", 255, 255, 255, true)
end
end
addEventHandler("onClientMarkerHit", marker, predkosc)
3. Fotoradar
Witam, pisz? zas?b na Fotoradary mam problem gdy obliczam pr?dko?? kt?r? gracz przekroczy? w ten spos?b
local oblicz 50 predkosc 

to w outpu'cie wywala mi t? pr?dko?? na minusie w ten spos?b
outputChatBox("przekroczy?e? o -12km/h")

gdzie le?y problem? za pomoc rep i piwko
4. Dodawanie gwiazdek fotoradar
Witam otoz chcialem zrobic ?e jak mamy 1 gwiazdke i predkosc od 70 do 85 km/h to nie daje gwiazdki a jak wyzej to daje.. problem w tym ?e w db3 gwiazdki nie daje a w hudzie dodaje. Oto kod:
if predkosc 70 and predkosc 85 then
    
if wantedLvl == 0 then
            setPlayerWantedLevel 
hitwantedLvl+)
            
outputDebugString("Nie Dopuszczalna! Mandat: "..kara2.. " Dodaje gwiazdke: "..wantedLvl0045255)
    else
            
outputDebugString("Nie Dopuszczalna! Mandat: "..kara2.. " Nie dodaje gwiazdki"0045255)
end
5. [SKRYPT] Reczny fotoradar
Cze??.

http://pastebin.com/jLRaFf8Q

Mo?e kto? sprawdzi? czy to dzia?a?

Wejdzicie na serwer i wpiszcie /aparat. Zacznijcie nim celowa? w innego gracza b?d?cego w poje?dzie.


Szkoda, ?e SAMP nie podzia?a na gta ze steam...
6. [INNE] Fotoradar
Witam ot?z mam fotoradary dynamiczne lecz jest problem bo najpierw zabiera pieni?dze a p??niej oddaje mo?e mi kto? pom?c
7. [INNE] Fotoradar :)
Witajcie mam taki kod fotoradaru:

Kod:

new sex;

if(strcmp(cmd, "/fotoradar_on", true) == 0)
{
TextDrawShowForPlayer(playerid,Fotoradar[1]);
TextDrawShowForPlayer(playerid,Fotoradar[2]);
TextDrawShowForPlayer(playerid,Fotoradar1[playerid]);

sex = SetTimerEx("FotoradarPolicja",100,true,"d",playerid);
return 1;
}


if(strcmp(cmd, "/fotoradar_off", true) == 0)
{
KillTimer(sex);
TextDrawHideForPlayer(playerid,Fotoradar[1]);
TextDrawHideForPlayer(playerid,Fotoradar[2]);
TextDrawHideForPlayer(playerid,Fotoradar1[playerid]);
return 1;
}

forward FotoradarPolicja(playerid);
public FotoradarPolicja(playerid)
{
for(new i=0,p=GetMaxPlayers(); i<p; i++)
{
if(GetDistanceBetweenPlayers(playerid,i)<80)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
if(i != playerid)
{
new string[256];
format(string,sizeof string,"Kierowca: %s~n~Jedzie: %d km/h",PlayerName(i),GetPlayerSpeed(i));
TextDrawSetString(Fotoradar1[i],string);
}
}
}
}
return 1;
}


I jest taki problem ?e on nie dzia?a pisze:

"Kierowca %s
Jedzie %d km/h"

chocia? przy mnie gracze je?d?? :(
8. [INNE] Fotoradar
Witam posiada kto? albo pomo?e wyci?? z mapy xyz fotoradar r?czny.
Ten z komendami /mierz i /skonczmierzyc.