Jump to content

psyduck

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by psyduck

  1. i want to write WoW like targeting and i dont know how to make it good my idea is something like that i shot a player/ped/element and i get its id (onPlayerDamage?) and store it somewhere (setElementData?) attaches arrow its id will be available to other functions and if other element is shooted it deataches arrow and removes target and sets new one i was messing around with getPedTarget and other methods but it just was crapp function playerDamage_text ( attacker, weapon, bodypart, loss ) --when a player is damaged local target = getPedTarget ( source ) outputChatBox ( "dmg "..getPlayerName(attacker).." "..getPlayerName(source), getRootElement (), 255, 170, 0 ) setElementData ( source, "tempdata.target", getPlayerName(source) ) local targettest =getElementData( source, "tempdata.target" ) outputChatBox("test target"..targettest) end addEventHandler ( "onPlayerDamage", getRootElement (), playerDamage_text ) function skillTemp(thePlayer, cmd) local value = getElementData( thePlayer, "tempdata.target" ) local player = getPlayerFromName (value) outputChatBox("test target"..value) setPedOnFire (player, true) end addCommandHandler("dg", skillTemp) anybody have some protips how to write it right?
  2. psyduck

    MTA on WINE,

    Hi I have problem with mta on wine, player keeps walking without pressing any keys what to do?
  3. im trying to make dayz-like bot spawning but i know my code is gaberge function napierdalaczbotow (source) outputChatBox("spawn on") - function napierdalacz ( ) local x,y,z = getElementPosition (source) local rot= 90 local skin=math.random(220) local interior=0 local dimension= 0 local team = nil local weapon=1 local mode= "chasing" local modesubject=source bot1 = call (getResourceFromName("slothbot"), "spawnBot", x+math.random(20), y+math.random(20), z, rot, skin, interior, dimension, team, weapon, mode, modesubject) bot2 = call (getResourceFromName("slothbot"), "spawnBot", x-math.random(20), y+math.random(30), z, rot, skin, interior, dimension, team, 6, mode, modesubject) setPedHeadless(bot1, true) end setTimer ( napierdalacz, 30000, 0 ) end addCommandHandler("botstart", napierdalaczbotow) is there any better way to do this?
  4. witam mam problem wynikający z mojego nieobeznania sie z LUA ale nie moge sobie z tym poradzic kolejny raz chodzi o to ze chce podpalić wszytskich którzy bedą w zasiegu poza sobą samym i nie wiem jak to zrobic bo brakuje mi c++'owego "różny od" function immo(thePlayer, cmd) local element = "player" local radius = 50 local x, y, z = getElementPosition(thePlayer) local colshape = createColSphere(tonumber(x), tonumber(y), tonumber(z), tonumber(radius)) for index, value in ipairs(getElementsWithinColShape(colshape, element )) do outputChatBox("player: "..getPlayerName(value), thePlayer) outputChatBox("for: "..getPlayerName(value), thePlayer) setPedOnFire ( value, true ) end end destroyElement(colshape) end addCommandHandler("dg", immo)
  5. hi im working of sort like PvE mode but the way im doing this is bad, i got markers all over map and when player leaves the marker it spawn zombies but the way its done innmta dayz is better but i dont know how to do this
  6. niektóre skiny są w folderze i wystarczy tylko podmienic pliki ale np army skin wykorzystuje skin z gta i nie wiem jak wsadzic zamiast niego wlasne dff i txd, jak to zrobic?
×
×
  • Create New...