Jump to content

John Smith

Members
  • Posts

    656
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by John Smith

  1. it has been a while since i posted a new post in here now i got this code without any errors but music isn't playing though. function onPlayButtonClick() if not guiGridListGetSelectedItem(GUIEditor.gridlist[1]) then outputChatBox("You need to select a song!",255,0,0) end if source == GUIEditor.button[1] then for i,mName in pairs(rowMusic) do local theMusic = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) if mName == theMusic then if fileExists(theMusic..".mp3") then sound = playSound(theMusic..".mp3") guiSetText(GUIEditor.button[1],"Play") else downloadFile(theMusic..".mp3") outputDebugString(tostring(theMusic..".mp3")) outputChatBox("Please stand by while song you requested is downloading.",255,0,0) setElementData(localPlayer,"state","Downloading\n "..theMusic) exports.loading:startLoading() end end end end end addEventHandler("onClientGUIClick",root,onPlayButtonClick) anybody knows what's the cause?
  2. i am trying to play a song which was selected in gridlist but failing in doing so rowMusic = { "Ke$ha - We R Who We R", "Eric Saade - Popular", "Loreen - Euphoria" } -- some hidden code in here which isnt needed here function onPlayButtonClick() if not guiGridListGetSelectedItem(GUIEditor.gridlist[1]) then outputChatBox("You need to select a song!",255,0,0) end if source == GUIEditor.button[1] then for i,mName in pairs(rowMusic) do local theMusic = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) if mName == theMusic then if fileExists(theMusic) then sound = playSound(theMusic) guiSetText(GUIEditor.button[1],"Play") else downloadFile(theMusic) outputChatBox("Please stand by while song you requested is downloading.",255,0,0) end end end end end addEventHandler("onClientGUIClick",root,onPlayButtonClick) theMusic (which i selected) was Ke$ha - We R Who We R and when i used outputDebugString to get that string as wiki says filepath must be a string,but already is a string so why isn't it working? or do i need to do something like this? theMusic = """..theMusic..""" -- should(?) become "Ke$ha - We R Who We R" aka filepath Any help is appreaciated
  3. i cant find where on your forum to write this about so i will write it down here sorry umm so when i write on chat its double messaging(default and this one) is that a bug or im missing something what i had to do? its always saying im a guest even when i login logout multiple times(not sure if feature or bug) also when u try to spam the script is trying to call gtwtopbar or something via exports but the resource isnt included so it points out the errors in debugscript and as a suggestion, i would like to suggest to add some smileys but like images, it would be pretty cool and i apologize if above things arent bugs but my mistakes, i havent really read through whole readme.md file on github
  4. i would like to do something like a hud with advanced health or whatever bar so lets say one green little line is in an image of size 16x16 pixels i got a basic example how i would make this local sw,sh = guiGetScreenSize() function drawPlayerHealth() local pHealth = getElementHealth(localPlayer) for i = tonumber(pHealth) do dxDrawImage(sw/2,sh/2,16,16,"test.png") end end addEventHandler("onClientRender",root,drawPlayerHealth) it would probably draw the required number of images for my health depending on my health points in a number however all of those images would be on same spot how could i move them depending on how much images are there?
  5. hello i got my own nametag system and it works similiar to the wiki example of nametag above ped's bone position however when calculating lots of variables 60 times per second it causes lots of cpu usage using alternative(timers) to update ped bone positions and element positions is not my choice because it would look laggy is there alternative how i could do these things(e.g calculate somethings position) to make it as smooth as onClientRender?
  6. That wouldnt always work unfortunately as lag occurs very often during recording However maybe theres some filesystem module for mta out there which would allow to get the list of client's process list but i really dont know as i never used modules nor i know much about mta ones
  7. Congratulations to: Bunchie (25), Rodriguez (21), MrBrutus (21), ahosuryoyo (20), grasmanek94 (20), daniel28159 (15)
  8. hi function customDamage(attacker,weapon,bodypart,loss) if not attacker then outputDebugString("player got damage,no attacker") return end if weapon == 38 or weapon == 35 or weapon == 36 then killPed(source,attacker,bodypart,false) outputDebugString("weapon was 38 or 36 or 35 and player got killed.") end end addEventHandler("onPlayerDamage",root,customDamage) this thing doesnt work at all i tried also making similiar thingy on client side and didnt work as well anyone knows why?
  9. Oheres an example ped1 = createPed(190,0,0,2) addEventHandler("onClientPedDamage",root,function() if source == ped1 then cancelEvent() end end) I wrote this from my phone
  10. banPlayer(source,false,false,true,"Console","Tunisia is Banned.",0)
  11. is resource in acl group admin?
  12. I SHALL DECLARE THIS AS THEEEEEE 69TH PAAAAGEEE!
  13. No viewtopic.php?f=148&t=77161 Stop thinking it won't, it will decrease performence. You don't care right? See performence browser. if you'd have some experience you'd know how to decrease that flaw to minimum.
  14. Thats why u can analyze a file on virustotal before executing it to see if its a malware or not
  15. Or he could just use event onClientWeaponFire and extract hit positions from there.
  16. Lol actually i deleted my account from Insane-hosting and went to Vortex it's better and have no lag Not like Insane Minimum ping is 200 for all players and i have internet speed 4 MB ! If you'd have brain you'd know that while u was using insane hosting your server was located in USA. You could have taken a server in france and there would be no lag as egypt is closer to france than usa
  17. Thats half edited ceaser's hud on community and half stolen grafuroam hud And you are saying you made this?rofl
  18. this kind of discussions is why people leave MTA.
  19. The same code |-Zares-| posted before three days. They all stole it from grafuroam and cloned servers with names like *name*-roam( his nick is maxiroam in here as well) So yea its leaked script
×
×
  • Create New...