-
Posts
656 -
Joined
-
Last visited
-
Days Won
2
Everything posted by John Smith
-
please help me someone this is driving me crazy
-
i have done some tests and confirmed that spaces are not the problem @iiyama @gallardo excuse me but i dont want to use those function(s) i haven't yet used them and its harder than downloadFile and i just want to do it like this way because there isnt any reason why to complicate all this when it's easy with downloadFile by "investigating" i have found no clue of this problem in my server it would always fail to download(even when i have turned off all custom resource), even though some other resources like my custom downloader can download things perfectly fine. So, my knowledge of mta and lua itself ends in here, and i am stuck without knowing what to do and how to fix the problem. In my local server it downloads perfectly fine even if file has name fioefj32f o2f23.r.-2.,32,.-23.,4"#"&%$#$%#$.txt and it has no custom resources
-
post debugscript 3 errors
-
1.it just keeps returning that download has failed for forever 2. "Ke$ha - We R Who We R.mp3" download="false" /> "Eric Saade - Popular.mp3" download="false" /> "Loreen - Euphoria.mp3" download="false" /> 3. -- originally when i click a button else -- if music file doesn't exist then downloadFile(tostring(theMusic)..".mp3") -- becomes a correct string wwith .mp3 on the end which becomes string filepath -- if file download fails, it activates this downloadFile(fname) -- filepath is fname
-
function handleSongDownload(fname,state) if getElementType(source) == "resource" and getResourceName(getThisResource()) == "musicpanel" then if state then setElementData(localPlayer,"state","Music Download Finished. ") outputDebugString("download finished "..tostring(state)) setTimer(function() exports.loading:stopLoading() setElementData(localPlayer,"state","Playing") end,5000,1) else downloadFile(fname) outputDebugString("download failed of "..tostring(fname).." restarting...") setElementData(localPlayer,"state","Trouble in Music Download.\nRestarting...") end end end addEventHandler("onClientFileDownloadComplete",root,handleSongDownload)
-
it is already a string
-
-- theMusic returns this theMusic = Loreen - Euphoria -- an example -- how i use it theMusic..".mp3" -- becomes Loreen - Euphoria.mp3 and yet it doesn't download the file at all, i dont know why
-
it starts downloading and onClientFileDownloadComplete or whatever says that download has failed, and it keeps restarting though the filepath is perfectly fine written please help
-
There. I have also added comments in the script which mistakes you have done. function savePlayerData () -- those events use other arguments such as weapon and such in the function so you have used weapon as the player which doesnt make any sense, remember, source of events is a player, read through wiki local playeraccount = getPlayerAccount(source) if (playeraccount) then local isPlayerInClass = getPlayerTeam(source) if ( ( isPlayerInClass ) and not isGuestAccount( account ) ) then setAccountData(playeraccount, "save.Player.Class", getTeamName( isPlayerInClass )) end end end addEventHandler("onPlayerQuit", root, savePlayerData); addEventHandler("onPlayerLogout", root, savePlayerData); addEventHandler("onPlayerWasted", root, savePlayerData); function loadPlayerData ()-- same like line 2 in this function local playeraccount = getPlayerAccount(source) -- same thing here as line 2 if (playeraccount) then local isPedInClass = getAccountData (playeraccount, "save.Player.Class") if ( ( isPedInClass ) and getTeamFromName( isPedInClass ) ) then setPlayerTeam(source, getTeamFromName( isPedInClass )) end end end addEventHandler("onPlayerQuit", root, loadPlayerData) addEventHandler("onPlayerLogout", root, loadPlayerData) addEventHandler("onPlayerWasted", root, loadPlayerData) addEventHandler ("onPlayerLogin",root, function() loadStats( getPlayerAccount(source), source) -- you need to pass source(a player in this case) to function so that you can define the player in completely another function end ) addEventHandler ("onPlayerQuit",root, function() saveStats( getPlayerAccount(thePlayer), source) -- same like line 28 end ) addEventHandler ("onPlayerLogout",root, function() saveStats( getPlayerAccount(thePlayer), source)-- same like line 28 end ) addEventHandler ("onPlayerWasted",root, function() loadStats( getPlayerAccount(source), source) -- player who died is source, and not thePlayer. read wiki through end ) function saveStats( Acc, thePlayer ) for i = 69 , 79 do setAccountData(thePlayer, "stat."..i , getPedStat(thePlayer,i)) end end function loadStats(Acc, thePlayer ) for i = 69 , 79 do setPedStat(thePlayer, i, getAccountData(Acc, "stat."..i)) end end
-
is there such event? i need to know how to know when player has stopped aiming thanks
-
actually he has to put source or thePlayer instead of source, because (i'm guessing) that he wants to trigger that first function with source element and thePlayer as well when calling the function example local playeraccount = getPlayerAccount(source) or getPlayerAccount(thePlayer)
-
Incorrect. I've tried. When you try to join a server, you are automatically kicked. I think it is because all VMs share the same serial. Using VMs makes you have a new serial which makes you able to evade bans so server owners disable virtual machines on their server
-
How about /delaccount accountname
-
search for 'webchat' on community
-
Dont you think that i have read this before?
-
it has already been decided that multi theft auto won't appear on Android(at least MTA SA won't) though MTA V would be really nice if developers want to keep this project alive(people won't play mta sa forever,will they?)
-
That race is outdated
-
i have used that alternative before but it doesnt look natural and/or smooth isnt updatePostion set to false supposed to freeze animation's position by itself?
-
register an account then select category new issues and then click on text 'report issue'
-
please help
-
please help
-
addEventHandler("onClientResourceStart", resourceRoot, function() for i, v in ipairs(getElementsByType("vehicle")) do local vehicleID = getElementModel ( v ) engineRestoreModel ( vehicleID ) end end)
-
I have tried to edit freeroam's code, the setPedAnimation syntax and added few more arguments and put updatePosition argument to false, but anims still change coordinate positions i am trying to disable movement when using anims when an animation finishes in freeroam, new one starts because its looped and then it moves to player as more it loops please help if you understand what i said
-
addEventHandler("onClientResourceStart", resourceRoot, function() for i, v in ipairs(getElementsByType("vehicle")) do local vehicleID = getVehicleModelFromName ( v ) engineRestoreModel ( vehicleID ) end end)