SA-MP Forums Archive
[Tool/Web/Other] jS Web Based Model Viewer (SA-MP REFERENCE) - 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: Tools and Files (https://sampforum.blast.hk/forumdisplay.php?fid=82)
+---- Thread: [Tool/Web/Other] jS Web Based Model Viewer (SA-MP REFERENCE) (/showthread.php?tid=510508)



jS Web Based Model Viewer (SA-MP REFERENCE) - Shoulen - 01.05.2014

Hello,

What this does is allows you to run either a skin or vehicle ID in to a function and it will display the relative image. (Javascript)

I was bored and so I stole the model images from the SA-MP Wiki and wrote a very small jS file that allows you to simply call the function
Code:
Model_getURL(ID)
and it will return the URI from the "Incs" folder (Where the images are held.) To the relative image.

I included a very small example file (The index.html file) to demonstrate how it works.
I'm not active on SA-MP at all any more but I felt like playing around and making something small and simple like this.
If you have any suggestions feel free to post them.

Download Link:
RAR
ZIP

I might release a web based include at a later stage.
Thanks.

Kind Regards

Shoulen

P.S. No mirror please.


Re: jS Web Based Model Viewer (SA-MP REFERENCE) - Luis- - 01.05.2014

Pictures would be nice!


Re: jS Web Based Model Viewer (SA-MP REFERENCE) - NewerthRoleplay - 01.05.2014

I'm almost positive adfly links are not allowed, however if you want to see what the example page does.. Demo
Edit:
Quote:
Originally Posted by Rules
Note that "links that benefit you" includes pay-per-click links and advert click-throughs (adf.ly etc), use direct links instead.



Re: jS Web Based Model Viewer (SA-MP REFERENCE) - Luis- - 01.05.2014

I suggest adding the ID's next to the pictures.


Re: jS Web Based Model Viewer (SA-MP REFERENCE) - Shoulen - 01.05.2014

Quote:
Originally Posted by NewerthRoleplay
View Post
I'm almost positive adfly links are not allowed, however if you want to see what the example page does.. Demo
Edit:
No problem, I've changed the ad.fly links to the standard download ones.
Note that the demo will probably cause a bit of lag as it's a giant client-side loop. Since it is utilizing Javascript I strongly suggest against using too many concurrent images. (That is, spamming the function.) However, as per the example file, it generates all available images including unavailable ones of IDs that do not exist.

Quote:
Originally Posted by Luis-
View Post
I suggest adding the ID's next to the pictures.
I don't see the need as it is meant for those wanting to develop a UCP or whatever with skin pictures and as such it could be unnecessary for clients to see the IDs.