function tworzenie(plr)
local x,y,z = getElementPosition(plr)
local rx,ry,rz = getElementRotation(plr)
local account = getPlayerAccount(plr)
local sprawdznamiot = getAccountData(account, "sprawdzanie")
local sprawdzpostawione = getElementData(plr, "postawione")
if (account) and not isGuestAccount(account) then
if isPedInVehicle(plr) == false then
if (sprawdznamiot == true) and (sprawdzpostawione == false) then
local obj = createObject(1685, x,y,z-0.3, rx,ry,rz)
outputChatBox("#ff9900Pomy?lnie postawi?e? namiot.",plr, 255, 255, 255, true)
setElementData(plr, "postawione", true)
elseif (sprawdznamiot == false) then
outputChatBox("#ff9900Nie posiadasz namiotu.", plr, 255, 255, 255, true)
elseif isPedInVehicle(plr) == true then
outputChatBox("#ff9900Nie mo?esz znajdowa? si? w poje?dzie.", plr, 255, 255, 255, true)
elseif (sprawdzpostawione == true) then
outputChatBox("#ff9900Nie mo?esz postawi? 2 namiot?w.",plr, 255, 255, 255, true)
end
end
end
end
addCommandHandler("postaw", tworzenie)