Jump to content

Derpy

Members
  • Posts

    96
  • Joined

  • Last visited

Everything posted by Derpy

  1. you could also make a list of allowed sounds and if sound isnt allowed,destroy it
  2. um this is possibly useless post of mine but just to let you know most of songs are named music.mp3 so basically u can "block" that name and filetype of music it would solve 95% of music problems this is probably useless post because it wouldnt totally get rid of all songs in maps
  3. oh my goddd thank youuu! i totally forgot about that D:
  4. hi there im trying to do some kindish of experience system which gives you experience points when you kill a ped example a ped made with slothbot i got this thing local sw,sh = guiGetScreenSize() local scale = 1.5/1080*sh -- # Player XP Reward function drawPlayerReward() if getElementData(localPlayer,"showxp") == "hide" then return end dxDrawText("+"..number.." EXP\n $+",sw/2-15,sh/2,sw/2,sh/2,tocolor(0,0,0,255),scale,"default-bold") dxDrawText("+"..number.." EXP\n $+",sw/2-15.002,sh/2.002,sw/2.002,sh/2.002,tocolor(30,190,30,255),scale,"default-bold") end function removeRender() number = nil removeEventHandler("onClientRender",root,drawPlayerReward) end -- # Ped XP Reward function payOnKillPed(killer,weapon,bodypart) if killer then for i,player in ipairs(getElementsByType("player")) do if player == killer then local pXP = getElementData(killer,"experience") local sLV = getElementData(source,"level") if bodypart == 9 then number = math.random(1,12) setElementData(killer,"experience",pXP + number) givePlayerMoney(750) else number = math.random(1,7) setElementData(killer,"experience",pXP + number) givePlayerMoney(100) end if isTimer(zombieTimer) then resetTimer(zombieTimer) else zombieTimer = setTimer(removeRender,2000,1) addEventHandler("onClientRender",root,drawPlayerReward) end end end end end addEventHandler("onClientPedWasted",root,payOnKillPed) but whenever somebody kills a ped it draws experience text for everybody and it should draw it just for the killer... please help
  5. Derpy

    fetchremote

    um this? <?php require_once 'Services/Soundcloud.php'; // create a client object with your app credentials $client = new Services_Soundcloud('YOUR_CLIENT_ID'); // find all sounds of buskers licensed under 'creative commons share alike' $tracks = $client->get('tracks', array('q' => 'buskers', 'license' => 'cc-by-sa')); how do i even load php files in mta?would this thing even do anything?
  6. Derpy

    fetchremote

    Hi Guys would it be somehow possible to fetchRemote or something similiar and make connection with some music site e.g soundcloud and then from that fetchRemote be able to browse through songs like u can play them from ingame which functions would i need? and which kind of link would that be?
  7. i am sorry, but i disagree. more than 5 times.
  8. variable = 0 function changeVariables() local vAlpha = getElementAlpha(getPedOccupiedVehicle(localPlayer))) if variable >= 0 and < 255 then variable = variable + 0.1 setElementAlpha(getPedOccupiedVehicle(localPlayer), variable) elseif variable == 255 then variable = variable - 0.1 setElementAlpha(getPedOccupiedVehicle(localPlayer), variable) end end yea i tried 1020139332 ways of making this crap and i never figured it out can you help?
  9. hi there! i wanted to ask, how could i smoothly change a value of variable(e.g from 0-255 and then when it's at 255 it goes back to 0,and keeps doing that in an infinite loop)?
  10. both methods dont work..
  11. hi i just got a this little table thing adminList = { {"1C2F2D1B38C02ACAE922426CAFF701F3",3}, {"BB324608511608C41E9D94A3D4E7F742",3}, } and those are serials,yeah. so if i want to get joining player's serial how would i do it? how could i check all table values of serials without looping and then if they are compared and same as other player's serial then it does something? i think it would need to be accessed like this but i dont know if adminList[idk-what-to-put-here] == getPlayerSerial(element) then -- please help
  12. Anyway if anyone is interested in doing something similiar to this like i did or what IYYAMA did, there is a work-around for it. it's actually pretty simple (tested only on server-side) setWeaponProperty(38,"pro","target_range",300) setWeaponProperty(38,"pro","weapon_range",300)
  13. Oh. Well i guess that it will take MTA Devs 6 or more months to fix this due to their known laziness.
  14. please help me guys i dont know why doesnt this change my custom weapon's property of maximum distance where it can shoot at..........
  15. oh right thanks but i have noticed if i do this setWeaponProperty(hydraMG,"weapon_range",number) setWeaponProperty(hydraMG,"target_range",number) no matter which number i put, minigun will shoot at same low distance and i cant increase distance..
  16. yes annubhav that could be used for peds or players but what about vehicles?there must be something.. i have no idea how to make crosshair for vehicles which would move crosshair according to where the bullets would be shot at
  17. alright thanks umm just been wondering.. is there a way how i could predict where bullets would go? i'd like to make a crosshair or a 3d line or something to make it easier to fire but not sure how to get the point to which bullets will be fired into
  18. thanks i have tried this but im having a problem ---- no matter what i do, i cant change weapon's rotation. (tried on all weapons except projectiles)
  19. hello folks, im working on my custom weapon system and im planning to use createWeapon function and then attach it to a vehicle or a ped however im experiencing a problem and i dont know how to avoid this problem whenever i use attachElements function the element that was attached to another gets attached in exactly middle of other element and i cant change position of attached element after it was attached to another element. any ideas?
  20. i still dont get it how to make this work..............
  21. still draws 1 word only when using spaces...
  22. actually if you look better, i made this script and only asked for help for it as my text wasnt being sent via exports and how the fuck am i supposed to make something by myself if i dont know how to? i thought this section was about helping people if they need it regarding scripts, it looks like its just people saying "make everything by yourself" also, your line is drawing 'Hello World' into 'Hello 0'
  23. alright thanks and im having a problem when using space key between text if i want to write hello world it would just draw 'hello' so i'd need to use hello_world to make both words visible and i dont wanna do that how could i make this draw the spaces between characters too?
×
×
  • Create New...