SA-MP Forums Archive
[Include] pLoading v1.0 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] pLoading v1.0 (/showthread.php?tid=643070)



pLoading v1.0 - PeterLinkson - 12.10.2017

Suggestions for use
  • When loading the map, exclusively the streamer
    » In addition to hiding the imperfections of the map loading, you can use the callback OnPlayerLoadingEnd
    » To spawn again, because most of the time the player ends up falling under the object.

  • When executing Loop in a large array
    » Hide the small delay

  • By uploading an account
    » When pulling all account information, maybe a little delay

  • When Small Bugs Occur
    » Example: Trying to give Spawn while being in spectate causes a small bug, causing the player to start flying
    » Infinitely, you can hide for a few seconds until you probably fix it.


  • When Waiting for a Timer to follow the script
    » Some servers use too many Timers to keep up with the story, and some end up slowing down a bit

  • Embellishment
Imagem

Video
Information
Command: /sounds
  • Change the music while loading the bar, in game
public OnPlayerLoadingStart(playerid)
  • Called when start loading
public OnPlayerLoadingEnd(playerid)
  • Called when finished loading
native ShowPlayerLoading(playerid, Float:time)
  • Shows the loading screen
  • time: It takes so many seconds to load the bar
native HidePlayerLoading(playerid)
  • hide the loading screen
Credits
» Samp» Samp Team
» Progress2 Include » Toribio/Southclaw
» Audio Plugin» Incognito
» Script/Include» PeterLinkson
» Loading Original» Rockstar North
Download



Re: pLoading v1.0 - Freaksken - 13.10.2017

I was actually considering something like this for my SP Mission project, because SA-MP doesn't provide a feature to preload (some part of) the map in the background, without interrupting the player.
Currently you have 2 options to (partially) resolve this:Both interrupt the player and are therefore not really an option.

However, explicitely making the player aware that something is loading in the background looks so much cleaner.
Anyway, I haven't looked at the code, but the idea is nice!