Ayush Rathore

  • Content Count

  • Joined

  • Last visited

  • Days Won


Ayush Rathore last won the day on March 11 2017

Ayush Rathore had the most liked content!

Community Reputation

48 Good


About Ayush Rathore

  • Rank
  • Birthday April 27


  • Gang
  • Location
  • Occupation
    Killing People
  • Interests

Recent Profile Visitors

1,243 profile views
  1. After this you have to draw that render target also like this for index, info in ipairs(blips) do dxSetRenderTarget(MiniMap["RenderTarget"], true) local bx = info.x local by = info.y local actualDist = getDistanceBetweenPoints2D(playerX, playerY, bx, by) local dist = actualDist/(worldMaxSize/((worldWidth+worldHeight)/2)) local rot = findRotation(bx, by, playerX, playerY)-camZ local blipX, blipY = getPointFromDistanceRotation( (MiniMap_x+MiniMap["width"]+MiniMap_x)/2, (MiniMap_y+MiniMap_y+MiniMap["height"])/2, math.min(dist, math.sqrt((MiniMap_y+MiniMap_y+MiniMap["height"])/2-MiniMap_y^2 + MiniMap_x+MiniMap["width"]- (MiniMap_x+MiniMap["width"]+MiniMap_x)/2^2)), rot ) local blipX = math.max(MiniMap_x, math.min(MiniMap_x+MiniMap["width"], blipX)) local blipY = math.max(MiniMap_y, math.min(MiniMap_y+MiniMap["height"], blipY)) local color = 255 dxDrawImage(blipX - blipSize/2, blipY - blipSize/2, blipSize, blipSize, "blips/".. info.blipID ..".png",0,0,0,tocolor(255,255,255,255)) dxSetRenderTarget() end dxDrawImage(MiniMap_x,MiniMap_y,MiniMap["width"],MiniMap["height"], MiniMap["RenderTarget"],0,0,0,tocolor(255,255,255,255)) And also you have a typo in dxDrawImage in tocolor. I fixed it.
  2. try this local KumarhaneTable = { markerPos = { {2241.845,1618.0186,1005.3,"cylinder", 1, 0, 0, 255, 255}, {2241.0264,1615.9229,1005.3,"cylinder", 1, 0, 0, 255, 255}, {2231.0354,1618.2883,1005.3,"cylinder", 1, 0, 0, 255, 255}, {2230.1758,1615.9615,1005.3,"cylinder", 1, 0, 0, 255, 255}, {2230.1707,1596.1257,1005.3,"cylinder", 1, 0, 0, 255, 255}, {2230.1282,1590.5557,1005.3,"cylinder", 1, 0, 0, 255, 255}, {2241.9907,1590.5559,1005.3,"cylinder", 1, 0, 0, 255, 255}, {2241.9663,1596.1257,1005.3,"cylinder", 1, 0, 0, 255, 255} }, deger = 10000000, hesap = getAccount("mert") } --[[local kumarhanecubo = createColCuboid(2179.8726,1659.6299,11.046875,17,38,5) function kumarhanecubohit(hitElement, matchingDimension) if (isElement(hitElement)) and (getElementType (hitElement) == "player") then setTimer(function() if getElementData(hitElement,"GuvenliBolge")~=true then triggerClientEvent (hitElement, "enableGodMode", hitElement) toggleControl (hitElement, "fire", false) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", false) setElementData(hitElement, "GuvenliBolge", true) end end,500,1) end end addEventHandler ("onColShapeHit", kumarhanecubo,kumarhanecubohit) function kumarhanecuboleave(leaveElement, matchingDimension) if (getElementType (leaveElement) == "player") then triggerClientEvent (leaveElement, "disableGodMode", leaveElement) toggleControl (leaveElement, "fire", true) toggleControl (leaveElement, "next_weapon", true) toggleControl (leaveElement, "previous_weapon", true) toggleControl (leaveElement, "aim_weapon", true) toggleControl (leaveElement, "vehicle_fire", true) setElementData(leaveElement, "GuvenliBolge", false) end end addEventHandler ("onColShapeLeave", kumarhanecubo,kumarhanecuboleave)--]] addEventHandler("onResourceStart",resourceRoot,function() for i, loc in ipairs(KumarhaneTable.markerPos) do local marker = createMarker(unpack(KumarhaneTable.markerPos[i])) setElementDimension(marker,62000) setElementInterior(marker,1) addEventHandler("onMarkerHit",marker,onMarkerHitForKumar) end createBlip(2192.1455,1677.2106,12.303028, 52, 1, 0, 0, 0,255,0,200 ) end) addCommandHandler("kumarhanetesting00",function() setAccountData(KumarhaneTable.hesap,"Sahip","Satılık") setAccountData(KumarhaneTable.hesap,"Zaman","Bilinmiyor") setAccountData(KumarhaneTable.hesap,"Ciro","Bilinmiyor") end) function onMarkerHitForKumar(player,md) if getElementType ( player ) == "player" and md then triggerClientEvent(player, "RuletPanel", getRootElement(getThisResource())) end end kumarhanepickup = createPickup (2194.8066,1668.5844,12.367188, 3, 1274) addEventHandler("onPickupHit", kumarhanepickup, function(player) if getElementType ( player ) ~= "player" then return end cancelEvent() local zaman = getAccountData(KumarhaneTable.hesap,"Zaman") or 0 local sahip = getAccountData(KumarhaneTable.hesap,"Sahip") local ciro = getAccountData(KumarhaneTable.hesap,"Ciro") or 0 local sahipmi = getAccountName(getPlayerAccount(player)) if zaman ~= "Bilinmiyor" then zaman = secoundsToDays(tonumber(zaman)-getRealTime().timestamp) end if ciro == "Bilinmiyor" then ciro = 0 end if sahip == sahipmi then triggerClientEvent(player, "KumarhanePanel", getRootElement(getThisResource()),sahip,zaman,ciro,true) else triggerClientEvent(player, "KumarhanePanel", getRootElement(getThisResource()),sahip,zaman,ciro,false) end end) function KumarhaneSatinAl() local sahip = getAccountData(KumarhaneTable.hesap,"Sahip") if sahip == "Satılık" then local para = getPlayerMoney(source) if para >= KumarhaneTable.deger then takePlayerMoney(source,KumarhaneTable.deger) setAccountData(KumarhaneTable.hesap,"Zaman",getRealTime().timestamp+86400*7) setAccountData(KumarhaneTable.hesap,"Sahip",getAccountName(getPlayerAccount(source))) setAccountData(KumarhaneTable.hesap,"Ciro",0) outputChatBox("#ffff00"..getPlayerName(source).." #ff7f00Adlı Oyuncu Kumarhaneyi 1 Haftalığına Kiraladı",root,255,0,255,true) end else outputChatBox("Kumarhane Daha Önceden Kiralandı",source,255,0,0,true) end end addEvent("KumarhaneSatinAl", true) addEventHandler("KumarhaneSatinAl", getRootElement(getThisResource()),KumarhaneSatinAl) function KumarhaneCiro(miktar,type) local ciro = getAccountData(KumarhaneTable.hesap,"Ciro") if ciro=="Bilinmiyor" then if type==true then setAccountData(KumarhaneTable.hesap,"Ciro",miktar) else setAccountData(KumarhaneTable.hesap,"Ciro",0-miktar) end else if type==true then setAccountData(KumarhaneTable.hesap,"Ciro",ciro+miktar) else setAccountData(KumarhaneTable.hesap,"Ciro",ciro-miktar) end end end addEvent("KumarhaneCiro", true) addEventHandler("KumarhaneCiro", getRootElement(getThisResource()),KumarhaneCiro) function KumarhaneGiveMoney(money) givePlayerMoney(source,money) end addEvent("KumarhaneGiveMoney", true) addEventHandler("KumarhaneGiveMoney", getRootElement(getThisResource()),KumarhaneGiveMoney) function KumarhaneTakeMoney(money) takePlayerMoney(source,money) end addEvent("KumarhaneTakeMoney", true) addEventHandler("KumarhaneTakeMoney", getRootElement(getThisResource()),KumarhaneTakeMoney) function KumarhaneCiroCek(miktar) local ciro = getAccountData(KumarhaneTable.hesap,"Ciro") local sahip = getAccountData(KumarhaneTable.hesap,"Sahip") local accountname = getAccountName(getPlayerAccount(source)) if ciro~="Bilinmiyor" then if accountname == sahip then if miktar <= ciro then setAccountData(KumarhaneTable.hesap,"Ciro",ciro-miktar) givePlayerMoney(source,miktar) triggerClientEvent(source, "KumarhanePanelGuncelle", getRootElement(getThisResource()),ciro-miktar) end end end end addEvent("KumarhaneCiroCek", true) addEventHandler("KumarhaneCiroCek", getRootElement(getThisResource()),KumarhaneCiroCek) setTimer(function() local zaman = getAccountData(KumarhaneTable.hesap,"Zaman") local sahip = getAccountData(KumarhaneTable.hesap,"Sahip") if sahip ~= "Satılık" then if zaman then if zaman < getRealTime().timestamp then setAccountData(KumarhaneTable.hesap,"Sahip","Satılık") setAccountData(KumarhaneTable.hesap,"Zaman","Bilinmiyor") setAccountData(KumarhaneTable.hesap,"Ciro","Bilinmiyor") outputChatBox("#00ffffKumarhane Satışa Çıktı Gidip Kiralayabilirsin (F6 > Kumarhane)",root,255,255,0,true) end end end end,15*60000,0) function secoundsToDays(secound) if secound then local value,state if secound >= 86400 then value = math.floor(secound/86400) if secound - (value*86400) > (60*60) then value = value.." gün "..math.floor((secound - (value*86400))/(60*60)).." saat" else value = value.." gün" end state = 1 else value = math.floor(secound/(60*60)).." saat" state = 2 end return value else return false end end Hope it corrected the error.
  3. Can you please elaborate more as your problem seems to be big. 😀
  4. FFS map loader only loads client side scripts and if you have made scripts which are server sided it wont work. ( My brother made a map long time ago and he also faced the same problem like yours ). I hope the answer gave you a clarity. 😀
  5. Using @Overkillz script Make a folder in resource directory named antiafk make three files: afk_c.lua, afk_s.lua, meta.xml in afk_s.lua paste: function kickPlayerFromServer() kickPlayer (source) outputChatBox(getPlayerName(source).." #ffffffhas been kicked by ANTI-AFK BOT",root,255,255,255,true) end addEvent("onkickPlayerFromServer",true) addEventHandler("onkickPlayerFromServer",getRootElement(),kickPlayerFromServer) in afk_c.lua paste: local afkTime = 30 --In Minutes local antiAFKkeys = {"accelerate", "vehicle_left", "vehicle_right", "brake_reverse"} --Check out more keys at https://wiki.multitheftauto.com/wiki/Key_names kickerTimer = setTimer(function() triggerServerEvent("onkickPlayerFromServer",localPlayer) end,afkTime*1000*60,1) function afkReset() resetTimer(kickerTimer) end do for i,key in ipairs(antiAFKkeys) do bindKey ( key, "down", afkReset ) end end in meta.xml paste this: <meta> <info author="OVERKILLZ" type="script" name="ANTI-AFK" /> <script src="afk_c.lua" type="client" cache="false" /> <script src="afk_s.lua" type="server" /> </meta> Now go to your server window and type refresh or refreshall and then type start antiafk
  6. https://github.com/Bonsai11/Multigamemode this resource might help you as it deals with loading map script files for specific player ( only client sided but might give you an idea on how to do it). CCS_wrapper This resources handles the loading of map scripts. Only clientside scripts are supported. CSS_wrapper is what you are looking for !
  7. In my opinion you can attach this table to the resource using setElementData(getResourceRootElement(getThisResource()),"texts",texts,false) -- keep this table client side and then you can get this table from anywhere on the server using getElementData(getResourceRootElement(getResourceFromName("resource")),"texts") -- client side and i think it will take less CPU but more ram.
  8. First go to your mta sa directory by right clicking on short cut and clicking open file location and then open server/mods/deathmatch/resources/ Make a new folder named eab. In this folder make three files meta.xml, c.lua, s.lua. In c.lua paste in s.lua paste Now in meta.xml <meta> <info author="AlirezaPlus" description="Expire after blow" version="1.5" type="script" /> <script src="c.lua" type="client"/> <script src="s.lua" type="server"/> </meta> Now go to this server gui window and type start eab. This is how you will do it. 😉
  9. https://community.multitheftauto.com/index.php?p=resources&s=details&id=347 This resource might help you. 😉
  10. Client Side: addEventHandler("onClientVehicleExplode", getRootElement(), function() destroyElement(source) end) Server Side: function deleteVehicleOnBurst() destroyElement(source) end addEventHandler("onVehicleExplode", getRootElement(), deleteVehicleOnBurst) This should do the trick. 😉
  11. In my opinion you should read the guidelines before posting. I cant understand anything please tell more.
  12. Hi, I have a stable running MTA client in ubuntu 16.04 but when I join a server the HTML pages aren't loading why? I was joining the ffs-gaming server which uses HTML page for login. To recheck I joined in my own server and started web browser resource but still, nothing happened! Thanks in advance!
  13. This link might help you to accomplish your task 😀.
  14. Thanks for the reply but i did installed win7+ version from mtasa.com. I don't know what i did wrong would you please tell me me step by step how to install it. This line is for everyone please tell me me step by step how to install mtasa in Ubuntu 16.04 Thanks in advance!