-
Posts
1,105 -
Joined
-
Last visited
Everything posted by Aibo
-
Suggestion for the community site
Aibo replied to Deagle's topic in Site/Forum/Discord/Mantis/Wiki related
it wasn't stopped, more like stalled. you know not a huge lot of people care about it at all -
your own site is broken. none of the links work and contact page throws 404 error.
-
Suggestion for the community site
Aibo replied to Deagle's topic in Site/Forum/Discord/Mantis/Wiki related
nothing happened because nobody is working on the current community site. so this was acknowledged for (actually it was already in) the new version, which is in (slow) development. -
Панель Ди-джея [99% compleated] Thanks to all!
Aibo replied to PSPNoobster's topic in Помощь / Отчеты об ошибках
1. isElementWithinMarker 2. triggerServerEvent > triggerClientEvent 3. guiSetText 4. stopSound/destroyElement -
function fixCar(player) if getPedSkin(player) == 50 and isPedInVehicle(player) then local vehicle = getPedOccupiedVehicle(player) if getElementHealth(vehicle) < 80 then fixVehicle(vehicle) givePlayerMoney(player, math.random(10, 100)) else outputChatBox("`Эта машина не нуждается в ремонте...", player, 0, 213, 0) end end end addCommandHandler("x", fixCar)
-
md5 is not encryption.
-
change skin to Classic. i wouldnt say its "cant be seen" totally, but yeah, its lower conrast than the old one.
-
yet you've decided to post it here as a tutorial? good grief.
-
first thing you should've done is output the values you're trying to compare, because it is obvious that something is wrong there. -- before if (getElementData ( playercar, "owner" ) == getElementData ( source, "playerid" )) then -- you should do something like outputChatBox("Car owner value: "..tostring(getElementData ( playercar, "owner" ))..", playerid value: "..tostring(getElementData ( source, "playerid" ))) or outputDebugString if debugging is on. see what is in those values, if they are the same (numbers? idk what playerid is), maybe one of the numbers is not a number, but a string.
-
well that't what i meant by "mine is different". it's not a bug, it's supposed to work that way. since you've used both 'up' and 'down' keybinds yourself, i assumed that is how you wanted it to work. well anyway, if you want switching: local hiding = false function hideVehicles(key, state) hiding = not hiding for _, player in ipairs(getElementsByType('player')) do if player ~= localPlayer then setElementDimension(getPedOccupiedVehicle(player), hiding and 1 or 0) setElementDimension(player, hiding and 1 or 0) end end outputChatBox(hiding and "[iNFO]: Currently Hiding Vehicles." or "[iNFO]: Currently Showing Vehicles.") end bindKey('F1', 'down', hideVehicles)
-
ага. апдейт кстати, что-то я не подумал вообще: -- clientside function outputPlayerList() outputChatBox("Players online: "..table.concat(getElementsByType("player"), ", ")) end addEventHandler("onClientResourceStart", resourceRoot, outputPlayerList) -- serverside function outputPlayerList() outputChatBox("Players online: "..table.concat(getElementsByType("player"), ", "), source) end addEventHandler("onPlayerJoin", root, outputPlayerList)
-
im amazed it even works with missing ends for first if/else in both functions.
-
local hiding = false addEventHandler("onClientResourceStart", resourceRoot, function() bindKey('F1', 'down', hideVehicles) bindKey('F1', 'up', hideVehicles) end ) function hideVehicles(key, state) if (hiding and state == 'down') or (not hiding and state == 'up') then return false end hiding = not hiding for _, player in ipairs(getElementsByType('player')) do if player ~= localPlayer then setElementDimension(getPedOccupiedVehicle(player), hiding and 1 or 0) setElementDimension(player, hiding and 1 or 0) end end outputChatBox(hiding and "[iNFO]: Currently Hiding Vehicles." or "[iNFO]: Currently Showing Vehicles.") end PS: meh , already posted. well mine is a little different
-
local screenWidth, screenHeight = guiGetScreenSize() addEventHandler("onClientRender", root, function() local time = getRealTime() dxDrawText(string.format("%02d:%02d", time.hour, time.minute), screenWidth - 1160, 920, screenWidth - 110, 200, tocolor(0, 159, 255, 255), 1.5, "Arial", "center", "top", false, false, false) end ) also you should really fix your positioning (screenWidth - 1160 is not the way, people with 1024 or 800 screen width wont see anything). if you want it to be on the left side, use positive pixel offset from the left side, which is 0. same with height. 920 pixels is way too far, for example i run mta at 1280x720, i wont see that. people with 1024x768 resolution also wont see that. and you'll be amazed how many people play at 800x600.
-
-- clientside function outputPlayerList() local list = "You" for i, player in ipairs(getElementsByType("player")) do if player ~= localPlayer then list = list..", "..getPlayerName(player) end end outputChatBox("Players online: "..list) end addEventHandler("onClientResourceStart", resourceRoot, outputPlayerList) -- serverside (по идее не будет ждать, пока что-то там загрузится) function outputPlayerList() local list = "You" for i, player in ipairs(getElementsByType("player")) do if player ~= source then list = list..", "..getPlayerName(player) end end outputChatBox("Players online: "..list, source) end addEventHandler("onPlayerJoin", root, outputPlayerList)
-
"else" is not obligatory. and you dont need "return" for a loop to work. also you can exit the loop using "break", though im not sure if that is what you want
-
i wonder, why noone cares about: --Copyright ©, Jesseunit --Please, do not Re-distribute
-
rotation parameters in moveObject function are relative. so if you don't want to rotate your object - dont use them, or put 0,0,0.
-
create it clientside and use onClientMarkerHit event.