Jump to content

Daniels69

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by Daniels69

  1. Hello , lately i was making something like an house system. and i stopped at this warning. which i can't really solve , or my lua experience is too small. it appears that the code below doesn't seem to get the housemark variable.. and that's why the warning comes , and the script doesn't really work any more , any ideas how to solve it? Thanks CODE: function addhouses(thePlayer,command,arg) local x,y,z = getElementPosition(thePlayer) local r,g,b = 255,255,0 housemark = createMarker ( x , y, z+1, "arrow", 1.5, r, g, b, 170 ) if (housemark) then outputDebugString("house created") setElementData(housemark,"mtasa-house",true) setElementData(housemark,"mtasa-housename",arg) -- if getElementData(house,"mtasa-housesold") == false end end addCommandHandler("addhouse",addhouses) function househit(player) if getElementType( player ) == 'player' and not getPedOccupiedVehicle( player ) then if not isGuestAccount( getPlayerAccount( player ) ) then --some stuff happens here else outputChatBox( 'You must be logged in', player, 255, 51, 36 ); end; end; end addEventHandler("onMarkerHit",housemark,househit) ERROR: WARNING: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil]
  2. Hey there. I have couple questions about setelementdata and getlementdata. Basically what i need is. How do i get the player with the biggest elementdata which was set by script? For e.x On player kill somebody it gives him score like, setElementData(player , murders+1) and how do i get the player with the biggest data? Any suggestions please.
  3. Daniels69

    DX Help!

    Hello dear mtasa community users. I'm wondering , how do i make so that lenght/width of dxdrawrectangle is the text which is draw inside of it?
  4. Then how do i fight against a hackers who use the "galaretka" it creates a file in your local mods folder. i thought i could check if the file exists , and if it exists that means hes cheating.
  5. Hello dear mtasa community. I have a question. Am i able to search for a file , in an other player mta mods folder? In hes downloaded mods , from other servers. Just for checking if the file exists. i would really appreciate if you call me the function. thank you
×
×
  • Create New...