[Include] pLoading v1.0
#1

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
Reply
#2

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:
  • set the player's position
  • use spectate and set the player's camera
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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)