Wysłany: 2016-03-13, 19:54
EseJax
Wiek: 31 Na forum: 4085 dni Posty: 67
Nick w MP: Toffy.
Piwa : 982
Zwracam si? ponownie o pomoc, napisa?em komende /iledostane na m?j z?om ale czat zostaje po prostu zaspamowany wiadomo?ciami, wysy?a tyle wiadomo?ci ile mam pojazd?w wpisanych w tabeli.
function iledostanehajsu ( plr )
for _ , v in pairs ( zlom ) do
local vehicle = getPedOccupiedVehicle ( plr )
if not getElementData ( vehicle , "vehicle:id" ) then return end
if not getElementData ( plr , "player:uid" ) then return end
if not vehicle then outputChatBox ( "Nie jeste? w ?adnym poje?dzie" , plr , 255 , 255 , 255 ) return end
if isElementWithinMarker ( plr , mzlom ) then
if tonumber ( getElementData ( vehicle , "vehicle:ownedPlayer" )) ~= tonumber ( getElementData ( plr , "player:uid" )) then outputChatBox ( "* Nie jeste? w?a?cicielem pojazdu." , plr , 255 , 0 , 0 ) return end
local matma = v [ 3 ]
local matma2 = matma / 3
local matma3 = matma2
outputChatBox ( "Za pojazd " .. getVehicleName ( vehicle ).. " mo?esz otrzyma? " .. matma3 .. "PLN" , plr , 255 , 255 , 255 )
end
end
end
addCommandHandler ( "iledostane" , iledostanehajsu )
Za pomoc piffko i repka
Wysłany: 2016-03-18, 22:10
DJglizdek
Uczeń LUA
Wiek: 24 Na forum: 4168 dni Posty: 75
Nick w MP: DJglizdek
Piwa : 5
function iledostanehajsu ( plr )
for _ , v in pairs ( zlom ) do
local vehicle = getPedOccupiedVehicle ( plr )
if not getElementData ( vehicle , "vehicle:id" ) then return end
if not getElementData ( plr , "player:uid" ) then return end
if not vehicle then outputChatBox ( "Nie jeste? w ?adnym poje?dzie" , plr , 255 , 255 , 255 ) return end
if isElementWithinMarker ( plr , mzlom ) then
if tonumber ( getElementData ( vehicle , "vehicle:ownedPlayer" )) ~= tonumber ( getElementData ( plr , "player:uid" )) then outputChatBox ( "* Nie jeste? w?a?cicielem pojazdu." , plr , 255 , 0 , 0 ) return end
local matma = v [ 3 ]
local matma2 = matma / 3
local matma3 = matma2
end
outputChatBox ( "Za pojazd " .. getVehicleName ( vehicle ).. " mo?esz otrzyma? " .. matma3 .. "PLN" , plr , 255 , 255 , 255 )
end
end
addCommandHandler ( "iledostane" , iledostanehajsu )
Nie jestem pewny czy b?dzie dzia?a? bo mia?em spor? przerw? od LUA ju?:P
Wysłany: 2016-03-18, 22:41
EseJax
Wiek: 31 Na forum: 4085 dni Posty: 67
Nick w MP: Toffy.
Piwa : 982
Mam rozumie? ?e to ?art?
Po co mam zamyka? to:
for _ , v in pairs ( zlom ) do
Skoro z tego pr?buje dane wczyta??.. GJ, nie powiem.
Czekam na dalsz? pomoc.
Wysłany: 2016-03-19, 09:14
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
Troch? dziwnie napisane kod, ale takie co? powinno dzia?a?:
function iledostanehajsu ( plr )
for _ , v in pairs ( zlom ) do
local vehicle = getPedOccupiedVehicle ( plr )
if not getElementData ( vehicle , "vehicle:id" ) then return end
if not getElementData ( plr , "player:uid" ) then return end
if v == vehicle then
if not vehicle then outputChatBox ( "Nie jeste? w ?adnym poje?dzie" , plr , 255 , 255 , 255 ) return end
if isElementWithinMarker ( plr , mzlom ) then
if tonumber ( getElementData ( vehicle , "vehicle:ownedPlayer" )) ~= tonumber ( getElementData ( plr , "player:uid" )) then outputChatBox ( "* Nie jeste? w?a?cicielem pojazdu." , plr , 255 , 0 , 0 ) return end
local matma = v [ 3 ]
local matma2 = matma / 3
local matma3 = matma2
outputChatBox ( "Za pojazd " .. getVehicleName ( vehicle ).. " mo?esz otrzyma? " .. matma3 .. "PLN" , plr , 255 , 255 , 255 )
end
end
end
end
addCommandHandler ( "iledostane" , iledostanehajsu )
Tagi: wiadomości :: złom
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: