Jump to content

Aibo

Retired Staff
  • Posts

    1,105
  • Joined

  • Last visited

Everything posted by Aibo

  1. Aibo

    House icon

    well anyway, i've added the pickup changing stuff to KIHC script. also replaced all deprecated stuff and fixed /unrent which was calling the wrong function.
  2. i've looked into meta.xml of vehicles shop: <file src="Png/SENTINEL.png" type="client" /> <file src="Png/PRIMO.png" /> <file src="Png/STRETCH.png" /> <file src="Png/ADMIRAL.png" /> <file src="Png/ALPHA.png" /> <file src="Png/AMBULAN.png" /> <file src="Png/ANDROMADA.png" /> <file src="Png/ARTICT1.png" /> <file src="Png/ARTICT2.png" /> ... well maybe server cant find it cause it's marked as client?
  3. Aibo

    House icon

    createHouseXX function is called only from createDebugHouse, loadHouses uses createHouse. anyway, this'll only make blue (well actually green, cause you messed up the id's ) icons when "owned" houses are created, not when someone buys it. as for setHouseOwner: function setHouseOwner( house , name ) saveData_kihc( house , "owner" , name ) saveData_kihc( name , "house" , house ) end not much there. setElementModel is not working for pickups. well, wiki says objects/peds/vehicles only, and i've tried, you can only getElementModel from pickup, but not set it. so i guess you'll have to replace the whole pickup element. though i may be wrong *)
  4. and you have an error in setElementData, Deaths value goes as a key, and value is empty. should be setElementData(source, "Deaths", Deaths), like with setAccountdata. addEventHandler("onPlayerQuit", getRootElement(), function() local playeraccount = getPlayerAccount(source) if playeraccount then local Deaths = getElementData(source, "Deaths") if Deaths then setAccountData(playeraccount, "Deaths", Deaths) end end end ) addEventHandler("onPlayerLogin", getRootElement(), function() local playeraccount = getPlayerAccount(source) if playeraccount then local Deaths = getAccountData(playeraccount, "Deaths") if Deaths then setElementData(source, "Deaths", Deaths) end end end )
  5. its onVehicleRespawn, not OnVehicleRespawn. everything is case-sensitive.
  6. here, this moves moving objects on the map like this one (simple elevator going up-down): <object id="testobject" model="3115" interior="0" dimension="0" posX="3446.6684570313" posY="-1914.6517333984" posZ="1.2000885009766" rotX="0" rotY="0" rotZ="0" moving="true" movTime="5000" movX="3446.6684570313" movY="-1914.6517333984" movZ="13.75008392334" /> function moveTo(obj, movX, movY, movZ, movTime, posX, posY, posZ) local x, y, z = getElementPosition(obj) if (tostring(z) ~= tostring(movZ)) or (tostring(y) ~= tostring(movY)) or (tostring(x) ~= tostring(movX)) then moveObject(obj, movTime, movX, movY, movZ) else moveObject(obj, movTime, posX, posY, posZ) end end addCommandHandler("movetest", function () for key,obj in ipairs(getElementsByType("object")) do if getElementData(obj, "moving") then local posX = getElementData(obj, "posX") local posY = getElementData(obj, "posY") local posZ = getElementData(obj, "posZ") local movX = getElementData(obj, "movX") local movY = getElementData(obj, "movY") local movZ = getElementData(obj, "movZ") local movTime = getElementData(obj, "movTime") moveTo(obj, movX, movY, movZ, movTime, posX, posY, posZ) setTimer(moveTo, movTime+1000, 0, obj, movX, movY, movZ, movTime, posX, posY, posZ) end end end ) i had to put tostring() in moveTo function, cause for some reason Lua thinks 13.75008392334 never equal 13.75008392334, even if z and movZ are the same number and i've tried tonumber() everything, still the same. ofc maybe i was just missing something there.
  7. everything moves fine, this'll move all objects: function moveAll(ms, byX, byY, byZ) for i,theObject in ipairs(getElementsByType('object')) do local x, y, z = getElementPosition(theObject) x, y, z = x + byX, y + byY, z + byZ moveObject(theObject, ms, x, y, z) end end and what are you trying to achieve with getElementData?
  8. as a quick solution: open meta.xml of race resource and add this setting: <setting name="*adminskin" value="197" friendlyname="Admin skin" group="_Advanced" accept="0-288" desc="Setting of skin to be used by admins." /> then open race_server.lua and change this (somewhere around line 438, mine is edited): if g_MapOptions.skins == 'cj' then spawnPlayer(player, x + 4, y, z, 0, 0) to this: if isPlayerInACLGroup(player, g_GameOptions.admingroup) then spawnPlayer(player, x + 4, y, z, 0, get("adminskin")) elseif g_MapOptions.skins == 'cj' then spawnPlayer(player, x + 4, y, z, 0, 0) now in race resource settings you can set skin ID to use for players whose groups listed in race "admin group" setting. just dont forget that not all 0-288 skins are working (since its a quick solution, i havent added any checks there ) https://wiki.multitheftauto.com/wiki/Character_Skins
  9. hm. some time ago i have edited lil_Toady's trace script to work thru 2ip.ru for DDC server just like this (since dnsstuff/completewhois blocked access). im a designer, not a scripter, and just tried to make things work. dunno where Sanzor got it, and why he removed the !pmt command tho. guess he took only the "sockread" part.
  10. i guess something like this: elseif ($3 == !level) mta.text $1 $mta.nick($1,%a) $+ 's Level: $iif(($prs.level($1,%a) == 1), FOS, $prs.level($1,%a)) alias admincount { var %a = 0, %b = None while (%a < %loop) { if ($mta.nick($1,%a) != $null) { if ($prs.level($1,%a) > 0) { if (%b == None) %b = $mta.nick($1,%a) $+ ( $+ $iif(($prs.level($1,%a) == 1), FOS, $prs.level($1,%a)) $+ ) else %b = %b $+ , $mta.nick($1,%a) $+ ( $+ $iif(($prs.level($1,%a) == 1), FOS, $prs.level($1,%a)) $+ ) } } !inc %a } mta.text $1 Current Admins: %b $+ . }
×
×
  • Create New...