SA-MP Forums Archive
[Include] PLoading.inc 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.inc v1.0 (/showthread.php?tid=251484)



PLoading.inc v1.0 - Phanto90 - 27.04.2011


[INC]PLoading by Phanto
Version: 1.0


P.S. Sorry for the screens, they show an Italian features ("Attendere"). In this script i changed it with "Loading", so don't worry about screens :P

Description:
Some guys need a loading system and so i made it.
It is useful in many aspects (for example loading after a teleport that needs
some time to load the object around it, or maybe some action (for example on my
server i use this when a player get some drink or go for some freeweights in a
gym.
However hope you will like it :P
It's not too much extended as function (I had no time to develop anymore...)


System:
•Loading system
•You can choose color and loading time
•The player get freezed during loading
•Functional & nice system
Goto screens!

How to use?:
•Download and save the file as PLoading.inc
•Put PLoading.inc in your include directory
•#include <PLoading> in your gamemode or fs or whatever.
•Inserit PLoadingInit(); in OnGameModeInit
•Use the function LoadingForPlayer(playerid,time,color)

Functions:
•LoadingForPlayer(playerid,time,color)
Note: Time must be in milliseconds

Known bug:
•No one for now.

Hoping you will enjoy my work! Best Regards Phanto

Download:
->Download PLoading.inc<-



Re: PLoading.inc - Markx - 27.04.2011

Looks nice


Re: PLoading.inc - Ash. - 27.04.2011

Quote:
Originally Posted by Phanto90
View Post
Known bug:
•Do not create loading at the same time for the same player
Nice, however the above sounds like a big bug that needs fixing! Otherwise, what is the use if i want to send 2 players to the same place at the same time?


Re: PLoading.inc - ev0lution - 27.04.2011

Quote:
Originally Posted by funky1234
View Post
Nice, however the above sounds like a big bug that needs fixing! Otherwise, what is the use if i want to send 2 players to the same place at the same time?
Bug quoted as "same time for the same player" and you're asking about separate players. Alright then.


Re: PLoading.inc - Phanto90 - 27.04.2011

For different player there is no problem. Well actually it is easy to fix by adding a return when a player is loading if another loading is requested for him
Fixed :P


Re: PLoading.inc - Ash. - 27.04.2011

Quote:
Originally Posted by ev0lutionnn
View Post
Bug quoted as "same time for the same player" and you're asking about separate players. Alright then.
Quote:
Originally Posted by Phanto90
View Post
For different player there is no problem. Well actually it is easy to fix by adding a return when a player is loading if another loading is requested for him
Okay okay, i'm tired! My bad - Why dont you set a secondary timer (or do it in the one that you must already run) and create a variable that you can edit (eg
pawn Code:
new bool:Loading[MAX_PLAYERS];
) which you can edit when the original command is run: (eg Loading[playerid] = true and then check when the command is run again if Loading = true. if it doesn, proceed with the loading, otherwise throw an error. Obviously you would need to reset loading[playerid] back to false in the timer.

Just a thought.
+ My bad, about the above, i genuinely didn't read that right /facepalm.


Re: PLoading.inc v1.0 - Phanto90 - 27.04.2011

No problem, the variable was present yet. I added only a return if the player was loading, that's all
Fixed that minor bug.


Re: PLoading.inc v1.0 - elledioi90 - 27.04.2011

Nice


Re: PLoading.inc v1.0 - Phanto90 - 27.04.2011

Quote:
Originally Posted by elledioi90
View Post
Nice
Thanks, also if it is not complete
Maybe i would add some function recall... don't know LoL


Re: PLoading.inc v1.0 - GaGlets(R) - 27.04.2011

that bar looks ugly. Try to make it wider or decrease height.