SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Tools and Files (https://forum.sa-mp.com/forumdisplay.php?f=82)
-   -   [Tool/Web/Other] Server Signature builder && Player's signature builder with real time stats (https://forum.sa-mp.com/showthread.php?t=643169)

BroZeus 14/10/2017 07:26 PM

Server Signature builder && Player's signature builder with real time stats
 
Introduction
These tools were made by me back in 2014/15 and I released the server signature builder, didn't release player's signature builder though, but as I was a newb to web dev at the time I released it, it had a lots of bugs and didn't get much attention. So recently I fixed major bugs and got it working properly, looking at the code I wrote back then I think the design can be improved a lot but I don't have much time, so here it is. They work well with chrome didn't test with firefox and I am pretty sure they won't work with Edge/IE.

Both of these tools share same core so there is no point in releasing them in two different threads.

Features
  • Drag-drop interference for easily designing the signatures.
  • Option to use custom fonts. *
  • Option to use custom font colors.
  • Option to add outline/stroke to text.
  • You can either use a solid color or a custom picture as a background, has the option to upload or use image by URL. **
  • Additional images can be added too via URL or by uploading. **

* Fonts are uploaded to the server to the '/gd_fonts/' directory by default.
** Images are not uploaded to server, they are uploaded to imgur.com

Please note that without background, the text has rugged edges in the output signature and looks very bad so make sure you use a background!

Server Signature Builder

Link to working tool.

Demo/Usage Tutorial:

https://i.gyazo.com/be5a82b232ed7470...40f8874a98.png

Server Signature Builder's Source

Player Signature Builder

Here is the link for the tool deployed to work with one of the servers: http://exmserv.me/signature/builder.php
When you finalize the signature, you will be prompted to enter a username, enter any general username, for example, enter "test", to see the end result.

Things to do to make it work for your server:
1. Make an API that outputs player statistics in JSON format.

2. Open the file builder.php and go to line number 115, you will see an HTML list there. Players drag and drop their statistics from this list. Add/remove/modify the items in the list.

3. Open the file signature.php and go to line number 9, put the URL to the API made in step 1 in this line.

4. Open the file signature.php and go to line number 140, you will see switch-case statements that will be matching the list that you saw in step 2 do the same changes here that you did on that list, also change the keys of variable $stats to match the keys of the JSON object from your API.

5. Open the file /js/main.js and go to line number 381 replace the URL with your API URL from step 1. Now, modify the logic on line 383 to match the logic when a non-registered name is used with your user API, for example in this case when an invalid name is used with the API, the API outputs nothing so I checked if its output data's length was less than 1.

Player Signature Builder's Source

External libraries used

X337 18/10/2017 05:10 PM

Re: Server Signature builder && Player's signature builder with real time stats
 
Useful, good work.

Adzdon 28/10/2017 10:36 AM

Re: Server Signature builder && Player's signature builder with real time stats
 
support https

ApoziX 23/03/2020 08:48 AM

Re: Server Signature builder && Player's signature builder with real time stats
 
You know how to put also player skin on the signature?


All times are GMT. The time now is 08:56 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.