Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Fuzzie
1
Snippet Showroom / Degrees to Radian and Radian to Degrees
« on January 24th, 2015, 12:45 PM »
Just a small snippet for those who don't know how to use radians. You don't have to give me credits for anything just use it as you wish.

Code: [Select]
function DegtoRad( degree ){
return degree * ( PI/ 180 );
}

function RadtoDeg( radian ){
return radian * ( 180 / PI );
}
2
Script Showroom / Fuzzie's Account System v3
« on January 24th, 2015, 08:00 AM »
Fuzzie's Account System v3


Ever since 0.4 came out, I knew I had to update my account system that I made for the 0.3z R2 Squirrel server. I also knew that I had to do more than just edit a few lines of code. I had to create an entire new one to support server owners who wants to use the MySQL plugin. I tried to make the difference between both variants as small as possible although several external factors such as connection speed may cause varying experience.



SQLite Variant

Nothing much was changed from the previous version.

Required Plugins: Squirrel, SQLite and Hashing

This zip archive contains the SQLite variant (fas_v3_sqlite.nut), a sample SQL query text file, and a sample script.

Download via MediaFire



MySQL Variant

Specifically made for server owners and coders who uses a MySQL database.

Required Plugins: Squirrel, MySQL and Hashing

This zip archive contains the MySQL variant (fas_v3_mysql.nut), a sample SQL query text file, and a sample script.

Download via MediaFire

Note: When connecting to a MySQL database that is not located locally (localhost), you may need to whitelist your server IP to allow it to remotely access your database. Click here for more info.



Both of these variants have the same functions with the same parameters

PlayerClass(playerName, dbGlobal)
PlayerClass.Join(player)
PlayerClass.Update(player, dbGlobal)
PlayerClass.Register(player, password, dbGlobal)
PlayerClass.Login(player, password, dbGlobal)

*dbGlobal is an SQLite or MySQL database pointer. Refer to the sample script (main.nut) for further information.



If you found any bugs, feel free to post it and I will try to fix as soon as possible.

Happy coding!
3
Support / Vehicle.SetGhost (and to a certain extent, Vehicle.GetGhost)
« on January 11th, 2015, 07:29 AM »
What happened to Vehicle.SetGhost? It's not in the wiki but it is in the source code. Does it also have anything to do with making this possible? If no, then how do I achieve what storm did and what Vehicle.SetGhost was suppose to do?
4
Snippet Showroom / Alternative Settings Script r1
« on December 27th, 2014, 03:10 AM »
Alternative Settings Script
revision 1


Don't like using the server.cfg and the squirrel .conf file? Here's an alternative for you! This script is a re-write of the Squirrel 0.3z server configuration file to a Squirrel script. Remember, this is just an alternative. The choice is up to you.

Installation is simple. All you need is the script which can be downloaded from the link below and the Squirrel Plugin. Then include this script in the callback onScriptLoad(). If everything is done right, it should work.

Code: [Select]
function onScriptLoad(){
dofile( "settings.nut" );
LoadSettings();
}

Happy Coding!

Download Link

Note: Several things can't be moved over to the script, eg: Port, so they have to be done in the server.cfg file.